From owner-freebsd-questions Wed Mar 22 09:20:41 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA10060 for questions-outgoing; Wed, 22 Mar 1995 09:20:41 -0800 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id JAA10054 for ; Wed, 22 Mar 1995 09:20:39 -0800 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA10913; Wed, 22 Mar 95 10:14:10 MST From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9503221714.AA10913@cs.weber.edu> Subject: Re: REQUEST: is there a udp equivalent to 'socks' for FreeBSD 1.x ? To: dave@odyssey.ucc.ie (David B. O'Byrne) Date: Wed, 22 Mar 95 10:14:10 MST Cc: questions@FreeBSD.org In-Reply-To: <9503220937.AA16439@odyssey.ucc.ie> from "David B. O'Byrne" at Mar 22, 95 09:37:14 am X-Mailer: ELM [version 2.4dev PL52] Sender: questions-owner@FreeBSD.org Precedence: bulk > 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.