Date: Wed, 22 Mar 95 10:14:10 MST From: terry@cs.weber.edu (Terry Lambert) To: dave@odyssey.ucc.ie (David B. O'Byrne) Cc: questions@FreeBSD.org Subject: Re: REQUEST: is there a udp equivalent to 'socks' for FreeBSD 1.x ? Message-ID: <9503221714.AA10913@cs.weber.edu> In-Reply-To: <9503220937.AA16439@odyssey.ucc.ie> from "David B. O'Byrne" at Mar 22, 95 09:37:14 am
next in thread | previous in thread | raw e-mail | index | archive | help
> I read the code and they mention udp-relay for the equivalent functionality > for udp packets. > > I downloaded and tried building this but am blocked as it needs 'poll.h' > whatever that is ! > > has anyone ported it/ know if its impossible/have an alternative ? The poll() callis the System 5 version of select(). It allows you to check if input is pending on a set of multiple descriptors, and if not, go on to other things (or wait until it is pending). This keeps you from issueing a blocking read on an fd where I/O is not present and having I/O become available elsewhere meanwhile and have to wait. If you reformatted the argument list to poll() so it looked like what select() needed, then you would probably have a working program. Linux also wants select(0, so it would have a wide audience. Note that if the poll() is being used to provide a timeout for no input after a certain period of time instead of simply blocking until data is available on one descriptor or another, that timeout in poll() is in 10ms increments; you will have to adjust the select() timeout arguments accordingly. Nore also that the man page for select() says that the time remaining in a timeout may be updated so that it can't be reused without being reinitialized in potential future implementations. Well, Linux does update the structure contents, so make sure you reinit any timeouts each time you call select(). Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503221714.AA10913>