User: Password:
|
|
Subscribe / Log in / New account

Namespace file descriptors

Namespace file descriptors

Posted Jul 22, 2011 4:49 UTC (Fri) by ebiederm (subscriber, #35028)
Parent article: Namespace file descriptors

There were some small changes between when this article was written and when socketat was merged.

- socketat was dropped from the patchset. It can be implemented race free in userspace and there are not yet enough userspace applications to care.

- setns had it's aguments slightly changes and swapped. setns is now
int setns(int fd, int nstype);
Where nstype is a clone flag, instead of the original overly clever
ascii encoded in an integer without using a define.

Eric


(Log in to post comments)

Namespace file descriptors

Posted Jul 22, 2011 12:26 UTC (Fri) by razb (guest, #43424) [Link]

can you share an example with a code ?

Namespace file descriptors

Posted Jul 27, 2011 16:31 UTC (Wed) by renzo (guest, #77450) [Link]

I think it would be simpler for programmers to have network stacks on the file system as special files.

I proposed this approach two years ago at FOSDEM. msocket is similar
to socketat but it has a pathname instead of a file descriptor as its
first argument.
If the network stacks were special files, sysadm may provide more than one
stack to the users, each application can decide which stack to use.
A "default" stack can be defined for backwards compatibility: the "socket" syscall uses the default stack.

for details see: http://wiki.virtualsquare.org/wiki/index.php/Multi_stack_...

and: http://archive.fosdem.org/2009/schedule/events/ipn_msockets

renzo

Namespace file descriptors

Posted Oct 2, 2011 16:20 UTC (Sun) by uriel (guest, #20754) [Link]

Plan 9 always used a file system interface to its network stack, and you could mount multiple ip stacks, and remote network stacks, and 'virtual network stacks' (eg., providing tunneling to a remote non-plan9 system using sshnet).

See:

http://doc.cat-v.org/plan_9/4th_edition/papers/net/
http://man.cat-v.org/plan_9/3/ip

Namespace file descriptors

Posted Jul 27, 2011 19:15 UTC (Wed) by chip (subscriber, #8258) [Link]

How can it be race-free?


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds