Re: [9fans] APE and listen(2B)

2008-12-04 Thread lucio
>> secondly, "reveal" is meant to drop into background, accepting >> connections on TCP/4523 where it replies with the concatenation of the >> originating IPv4 address and port number. > > is there a reason for not using listen(8)? all that is needed is a > script in /bin/service/tcp4523 nearly i

Re: [9fans] APE and listen(2B)

2008-11-28 Thread Skip Tavakkolian
> secondly, "reveal" is meant to drop into background, accepting > connections on TCP/4523 where it replies with the concatenation of the > originating IPv4 address and port number. is there a reason for not using listen(8)? all that is needed is a script in /bin/service/tcp4523 nearly identical

Re: [9fans] APE and listen(2B)

2008-11-27 Thread erik quanstrom
> On Thu, Nov 27, 2008 at 1:35 PM, <[EMAIL PROTECTED]> wrote: >> Now, (a) I'm hoping someone can compile reveal.c (pcc -o reveal >> -D_POSIX_SOURCES -D_BSD_EXTENSION reveal.c -lbsd) in a pristine APE >> environment and prove to me that it works unmodified or, (b) somebody >> can give me some point

Re: [9fans] APE and listen(2B)

2008-11-27 Thread lucio
> the real solution involves reference counting. but in your case, > not forking would make more sense. in fact, if you wanted > to start reveal from listen(1), you could dispense with the > for(;;) and the fork. Of course, but the point is to implement a Posix utility under APE, specially as th

Re: [9fans] APE and listen(2B)

2008-11-27 Thread lucio
> After removing the (socklen_t*) typecast... > # pcc -o reveal -D_POSIX_SOURCE -D_BSD_EXTENSION reveal.c -lbsd > # ./reveal > ERRNO: 12 > socket accept: Invalid argument The precise error I get as well. Thank you for confirming. I'd forgotten that one of the reasons for doing this was to add "

Re: [9fans] APE and listen(2B)

2008-11-26 Thread sqweek
On Thu, Nov 27, 2008 at 1:35 PM, <[EMAIL PROTECTED]> wrote: > Now, (a) I'm hoping someone can compile reveal.c (pcc -o reveal > -D_POSIX_SOURCES -D_BSD_EXTENSION reveal.c -lbsd) in a pristine APE > environment and prove to me that it works unmodified or, (b) somebody > can give me some pointers on

[9fans] APE and listen(2B)

2008-11-26 Thread lucio
(... where the 'B' suffix is intended to mean "BSD") I would mail 9trouble, but I'm sure I have the wrong end of the stick here, as seems to be too frequently the case, so let me ask for some sanity checking. The attached program (reveal) is a toy I use under NetBSD to disclose the originating IP