From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <43E2CF02.7060008@surferz.net> Date: Thu, 2 Feb 2006 22:33:22 -0500 From: Marina Brown User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Van Jacobsen's network stack restructure References: <4f9b14f1f51c8780568bd394ad4c8918@quanstro.net> <20060203014226.GA979@cs.helsinki.fi> In-Reply-To: <20060203014226.GA979@cs.helsinki.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: f134d1d4-ead0-11e9-9d60-3106f5b1d025 Aki M Nyrhinen wrote: >On Thu, Feb 02, 2006 at 05:43:49PM +0000, quanstro@quanstro.net wrote: > > >>On Thu Feb 2 11:57:10 CST 2006, forsyth@vitanuova.com wrote: >> >> >>>yes, i supposed it could be something along those lines but i didn't make my point clear. >>>if it is along those lines, it breaks something that even sockets didn't break. >>>at the moment, i get a file descriptor that i can pass to anything that does read and write. >>> >>> >>definately not true on linux. udp and netlink sockets would be a counter example. >> >> > >sorry, are you claiming that the attached program (horror.c) does not >work on (some) linux? > > > Works on my ubantu linux box and a freebsd 5.2.1 box i have. -- Marina Brown >this is what in my understanding VJ's stuff would break. > > Aki > > > >------------------------------------------------------------------------ > > >#include >#include >#include > >int >main(void) >{ > int fd; > struct sockaddr_in sa; > sa.sin_family = AF_INET; > sa.sin_addr.s_addr = htonl(0x7F000001); > sa.sin_port = htons(5555); > switch(fork()){ > case 0: > fd = socket(PF_INET, SOCK_DGRAM, 0); > bind(fd, (struct sockaddr*)&sa, sizeof sa); > dup2(fd, 0); > execl("/bin/cat", "cat", NULL); > default: > fd = socket(PF_INET, SOCK_DGRAM, 0); > connect(fd, (struct sockaddr*)&sa, sizeof sa); > dup2(fd, 1); > execl("/bin/cat", "cat", NULL); > } > return 0; >} > > >