9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ape sockets and plan9
@ 2010-12-25  5:06 Fernan Bolando
  2010-12-25 17:04 ` Steve Simon
  0 siblings, 1 reply; 13+ messages in thread
From: Fernan Bolando @ 2010-12-25  5:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi all

what is involved in using APE sockets. Anybody can point me to a
documentation or sample code?

running the sample code in http://www.linuxhowtos.org/data/6/server.c

gives me the following error.
term% ./serv
ERROR, no port provided
term% ./serv 4000
ERROR on accept: Invalid argument

I am not sure where to look for documentation. the ape paper doesnt
seem have much detail.

thanks
fernan



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-25  5:06 [9fans] ape sockets and plan9 Fernan Bolando
@ 2010-12-25 17:04 ` Steve Simon
  2010-12-25 19:41   ` Bakul Shah
  0 siblings, 1 reply; 13+ messages in thread
From: Steve Simon @ 2010-12-25 17:04 UTC (permalink / raw)
  To: fernanbolando, 9fans

I think this is an artifact of 9vx (not 100% sure though),
try running 9fx as root on your unix box - though that would more
likely solve problems if the port number was < 1024.

-Steve



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-25 17:04 ` Steve Simon
@ 2010-12-25 19:41   ` Bakul Shah
  2010-12-28 13:23     ` Fernan Bolando
  0 siblings, 1 reply; 13+ messages in thread
From: Bakul Shah @ 2010-12-25 19:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sat, 25 Dec 2010 17:04:01 GMT "Steve Simon" <steve@quintile.net>  wrote:
> I think this is an artifact of 9vx (not 100% sure though),

Indeed. Programs under 9vx can make outgoing connections but
can't accept incoming ones because it doesn't really create a
virtual machine -- 9vx makes the connections on behalf of the
program. IIRC there was some additional code to add a proper
ethernet device (via tap or pcap filtering) but I've never
played with it.  This program works under p9/qemu because
qemu creates a proper VM (I then bridge its tap device with
the underlying machine's phys ethernet).

> try running 9fx as root on your unix box - though that would more
> likely solve problems if the port number was < 1024.

Yes. Here it is a different cause.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-25 19:41   ` Bakul Shah
@ 2010-12-28 13:23     ` Fernan Bolando
  2010-12-28 16:34       ` erik quanstrom
  0 siblings, 1 reply; 13+ messages in thread
From: Fernan Bolando @ 2010-12-28 13:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Sun, Dec 26, 2010 at 3:41 AM, Bakul Shah <bakul+plan9@bitblocks.com> wrote:
> On Sat, 25 Dec 2010 17:04:01 GMT "Steve Simon" <steve@quintile.net>  wrote:
>> I think this is an artifact of 9vx (not 100% sure though),
>
> Indeed. Programs under 9vx can make outgoing connections but
> can't accept incoming ones because it doesn't really create a
> virtual machine -- 9vx makes the connections on behalf of the
> program. IIRC there was some additional code to add a proper
> ethernet device (via tap or pcap filtering) but I've never
> played with it.  This program works under p9/qemu because
> qemu creates a proper VM (I then bridge its tap device with
> the underlying machine's phys ethernet).
>
>> try running 9fx as root on your unix box - though that would more
>> likely solve problems if the port number was < 1024.
>
> Yes. Here it is a different cause.
>
>
 ape sockets should just work under a real plan9 cpu server?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 13:23     ` Fernan Bolando
@ 2010-12-28 16:34       ` erik quanstrom
  2010-12-28 17:41         ` Devon H. O'Dell
  0 siblings, 1 reply; 13+ messages in thread
From: erik quanstrom @ 2010-12-28 16:34 UTC (permalink / raw)
  To: fernanbolando, 9fans

> On Sun, Dec 26, 2010 at 3:41 AM, Bakul Shah <bakul+plan9@bitblocks.com> wrote:
> > On Sat, 25 Dec 2010 17:04:01 GMT "Steve Simon" <steve@quintile.net>  wrote:
> >> I think this is an artifact of 9vx (not 100% sure though),
> >
> > Indeed. Programs under 9vx can make outgoing connections but
> > can't accept incoming ones because it doesn't really create a
> > virtual machine -- 9vx makes the connections on behalf of the

that's wrong.  9vx can accept connections.

> > program. IIRC there was some additional code to add a proper
> > ethernet device (via tap or pcap filtering) but I've never
> > played with it.  This program works under p9/qemu because

devon o'dell and i did this.  this gives 9vx a full networking
stack, but it generally requires running as root.

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 16:34       ` erik quanstrom
@ 2010-12-28 17:41         ` Devon H. O'Dell
  2010-12-28 18:39           ` Bakul Shah
  0 siblings, 1 reply; 13+ messages in thread
From: Devon H. O'Dell @ 2010-12-28 17:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2010/12/28 erik quanstrom <quanstro@quanstro.net>:
>> On Sun, Dec 26, 2010 at 3:41 AM, Bakul Shah <bakul+plan9@bitblocks.com> wrote:
>> > On Sat, 25 Dec 2010 17:04:01 GMT "Steve Simon" <steve@quintile.net>  wrote:
>> >> I think this is an artifact of 9vx (not 100% sure though),
>> >
>> > Indeed. Programs under 9vx can make outgoing connections but
>> > can't accept incoming ones because it doesn't really create a
>> > virtual machine -- 9vx makes the connections on behalf of the
>
> that's wrong.  9vx can accept connections.
>
>> > program. IIRC there was some additional code to add a proper
>> > ethernet device (via tap or pcap filtering) but I've never
>> > played with it.  This program works under p9/qemu because
>
> devon o'dell and i did this.  this gives 9vx a full networking
> stack, but it generally requires running as root.

yiyus extended this functionality as part of his SoC project last year
and it's working quite nicely and cross-platform. I'm pretty sure the
code is available in both his and Ron's hg repos of 9vx.

--dho

> - erik
>
>



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 17:41         ` Devon H. O'Dell
@ 2010-12-28 18:39           ` Bakul Shah
  2010-12-28 18:50             ` erik quanstrom
  0 siblings, 1 reply; 13+ messages in thread
From: Bakul Shah @ 2010-12-28 18:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, 28 Dec 2010 12:41:09 EST "Devon H. O'Dell" <devon.odell@gmail.com>  wrote:
> 2010/12/28 erik quanstrom <quanstro@quanstro.net>:
> >> On Sun, Dec 26, 2010 at 3:41 AM, Bakul Shah <bakul+plan9@bitblocks.com>
> wrote:
> >> > On Sat, 25 Dec 2010 17:04:01 GMT "Steve Simon" <steve@quintile.net>
> wrote:
> >> >> I think this is an artifact of 9vx (not 100% sure though),
> >> >
> >> > Indeed. Programs under 9vx can make outgoing connections but
> >> > can't accept incoming ones because it doesn't really create a
> >> > virtual machine -- 9vx makes the connections on behalf of the
> >
> > that's wrong. 9vx can accept connections.


The original didn't. The version @ hg.pdos.csail.mit.edu
still doesn't.  If you use Ron's repo you don't get the ether
device by default.

It is confusing to have different versions sharing the same
name.  It would be better if this branch of 9vx is either
renamed or merged with Russ's.

> >> > program. IIRC there was some additional code to add a proper
> >> > ethernet device (via tap or pcap filtering) but I've never
> >> > played with it. This program works under p9/qemu because
> >
> > devon o'dell and i did this. this gives 9vx a full networking
> > stack, but it generally requires running as root.
>
> yiyus extended this functionality as part of his SoC project last year
> and it's working quite nicely and cross-platform. I'm pretty sure the
> code is available in both his and Ron's hg repos of 9vx.

Are there instructions on how to use this?  9vx/README (the
closest thing to a 9vx manpage) doesn't mention or describe
how to use the new options.

Original:
usage: 9vx [-gt] [-r root] [-u user]

yiyus:
usage: 9vx [-gt] [-f inifile | inifields ... ] [-i initarg] [-r localroot] [-u user]

Most people would need additional instructions on how to set
things up on their host machine to use this feature.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 18:39           ` Bakul Shah
@ 2010-12-28 18:50             ` erik quanstrom
  2010-12-28 19:45               ` Bakul Shah
  2010-12-29  4:02               ` ron minnich
  0 siblings, 2 replies; 13+ messages in thread
From: erik quanstrom @ 2010-12-28 18:50 UTC (permalink / raw)
  To: 9fans

> > >> > Indeed. Programs under 9vx can make outgoing connections but
> > >> > can't accept incoming ones because it doesn't really create a
> > >> > virtual machine -- 9vx makes the connections on behalf of the
> > >
> > > that's wrong. 9vx can accept connections.
>
>
> The original didn't. The version @ hg.pdos.csail.mit.edu
> still doesn't.  If you use Ron's repo you don't get the ether
> device by default.

you misunderstand.  regular 9vx without the added
network device can accept tcp or udp connections.
the fact that ape has some breakage must be a different
problem.

> It is confusing to have different versions sharing the same
> name.  It would be better if this branch of 9vx is either
> renamed or merged with Russ's.

i don't know how you solve this.  hg/bitbucket is no panacea.

patches are not always folded in in a timely manner,
regardless of the technology used.  i'm not even sure
how to properly submit fixes to bitbucket hosted stuff
like drawterm.  i think the only option is to fork it.

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 18:50             ` erik quanstrom
@ 2010-12-28 19:45               ` Bakul Shah
  2010-12-29  4:02               ` ron minnich
  1 sibling, 0 replies; 13+ messages in thread
From: Bakul Shah @ 2010-12-28 19:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, 28 Dec 2010 13:50:03 EST erik quanstrom <quanstro@quanstro.net>  wrot
e:
> > > >> > Indeed. Programs under 9vx can make outgoing connections but
> > > >> > can't accept incoming ones because it doesn't really create a
> > > >> > virtual machine -- 9vx makes the connections on behalf of the
> > > >
> > > > that's wrong. 9vx can accept connections.
> >
> >
> > The original didn't. The version @ hg.pdos.csail.mit.edu
> > still doesn't.  If you use Ron's repo you don't get the ether
> > device by default.
>
> you misunderstand.  regular 9vx without the added
> network device can accept tcp or udp connections.
> the fact that ape has some breakage must be a different
> problem.

You are quite right.  I was thinking from a point of view of
VM on QEMU and forgetting that 9vx is "just an ordinary" unix
program that can listen/accept just like any other program
(and shares the same tcp/udp port number space with them).
Thanks for the correction and apologies for confusing people.

> > It is confusing to have different versions sharing the same
> > name.  It would be better if this branch of 9vx is either
> > renamed or merged with Russ's.
>
> i don't know how you solve this.  hg/bitbucket is no panacea.
>
> patches are not always folded in in a timely manner,
> regardless of the technology used.  i'm not even sure
> how to properly submit fixes to bitbucket hosted stuff
> like drawterm.  i think the only option is to fork it.

If there is no hope of a merge then I would rename.  If it is
just a delay....



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-28 18:50             ` erik quanstrom
  2010-12-28 19:45               ` Bakul Shah
@ 2010-12-29  4:02               ` ron minnich
  2011-01-01  1:36                 ` Fernan Bolando
  1 sibling, 1 reply; 13+ messages in thread
From: ron minnich @ 2010-12-29  4:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Sorry, I'm tired, long day, but this discussion is not making sense to
me. I hope I don't make anyone mad at me :-)

9vx can accept connections today, with or without the ether device.
I've used 9vx to export root file systems to ARMs. It's how I
bootstrapped my openrd.

Now, there is this business in Unix called privileged ports. If you
want to export port 564, then you must run 9vx as root. Problem
solved.

Listen1 is quite fun and handy for this kind of tinkering around.
Also, you can trace all the 9vx network activity on many unixes:
strace -etrace=network 9vx etc. etc.
And see where things go sour.

The only issue is that if your 9vx host is using a port (e.g. 22) then
9vx can't export on that port, because the 9vx port space and the host
os port space are shared.

As for 9vx forks on bitbucket: we're all good with hierarchical name
spaces, right? I mean, yiyus/9vx and rminnich/9vx are not the same
thing. I'm not usually in a hurry to pull from yiyus, because I've
felt no urgency to do so, If you want me to try something, let me
know.

Bitbucket has worked very well for me across a lot of projects. So has
hg in general. They're both great, and they work well from Plan 9.
Don't like em? Don't use 'em ;-)

ron



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2010-12-29  4:02               ` ron minnich
@ 2011-01-01  1:36                 ` Fernan Bolando
  2011-01-01 14:59                   ` erik quanstrom
  2011-01-01 15:28                   ` ron minnich
  0 siblings, 2 replies; 13+ messages in thread
From: Fernan Bolando @ 2011-01-01  1:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Dec 29, 2010 at 12:02 PM, ron minnich <rminnich@gmail.com> wrote:

> As for 9vx forks on bitbucket: we're all good with hierarchical name
> spaces, right? I mean, yiyus/9vx and rminnich/9vx are not the same
> thing. I'm not usually in a hurry to pull from yiyus, because I've
> felt no urgency to do so, If you want me to try something, let me
> know.
>
> Bitbucket has worked very well for me across a lot of projects. So has
> hg in general. They're both great, and they work well from Plan 9.
> Don't like em? Don't use 'em ;-)
>

bitbucket is an easy way for me to get at some of the plan9 bleeding edge,
having multiple points of information does tend to confuse me.

Here is my current list of bleeding edge links and how i might describe them
rminnich/9vx --- 9vx with rons fixes
yiyus/9vx --- 9vx with yiyus fixes possibly merged with rons
eriks/9atom --- new sata support and 9load
rminnich/sysiso ----??
quanstro/drawterm ----

contrib - for ports and apps



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2011-01-01  1:36                 ` Fernan Bolando
@ 2011-01-01 14:59                   ` erik quanstrom
  2011-01-01 15:28                   ` ron minnich
  1 sibling, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2011-01-01 14:59 UTC (permalink / raw)
  To: fernanbolando, 9fans

> bitbucket is an easy way for me to get at some of the plan9 bleeding edge,
> having multiple points of information does tend to confuse me.
>
> Here is my current list of bleeding edge links and how i might describe them
> rminnich/9vx --- 9vx with rons fixes
> yiyus/9vx --- 9vx with yiyus fixes possibly merged with rons
> eriks/9atom --- new sata support and 9load

for now the version of 9atom that i'm supporting just an iso
at ftp://ftp.quanstro.net/other/9atom.iso.bz2

> quanstro/drawterm ----

patch queue.

fixes auth with new factotum, compiles on 64-bit osx,
allows images with a scanline >8k, etc.

unfortunately it doesn't compile just now because russ
applied the auth patch.

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [9fans] ape sockets and plan9
  2011-01-01  1:36                 ` Fernan Bolando
  2011-01-01 14:59                   ` erik quanstrom
@ 2011-01-01 15:28                   ` ron minnich
  1 sibling, 0 replies; 13+ messages in thread
From: ron minnich @ 2011-01-01 15:28 UTC (permalink / raw)
  To: fernanbolando, Fans of the OS Plan 9 from Bell Labs

On Fri, Dec 31, 2010 at 5:36 PM, Fernan Bolando <fernanbolando@mailc.net> wrote:

> rminnich/sysiso ----??
>

sysfromiso -- the intent of this is to provide an hg tree that is an
exact copy of /sys/src and inlcude, so you can build a full / from it.

It's interesting to watch the continuing improvements Geoff and others
push into the ARM tree. This kernel is NOT static. At the same time, I
find hg convenient to work with as I have a repo of my own to try my
ideas out on.

ron



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-01-01 15:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-25  5:06 [9fans] ape sockets and plan9 Fernan Bolando
2010-12-25 17:04 ` Steve Simon
2010-12-25 19:41   ` Bakul Shah
2010-12-28 13:23     ` Fernan Bolando
2010-12-28 16:34       ` erik quanstrom
2010-12-28 17:41         ` Devon H. O'Dell
2010-12-28 18:39           ` Bakul Shah
2010-12-28 18:50             ` erik quanstrom
2010-12-28 19:45               ` Bakul Shah
2010-12-29  4:02               ` ron minnich
2011-01-01  1:36                 ` Fernan Bolando
2011-01-01 14:59                   ` erik quanstrom
2011-01-01 15:28                   ` ron minnich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).