AN_FD_SETSection: Antinat Programmer's Manual (3)
Index Return to Main Contents
The AN_FD_SET(3) function inserts an Antinat socket into a set of file descriptors. This set of file descriptors can be used with select. Use the AN_FD_ISSET(3) function to determine if a file descriptor is in the set, or AN_FD_CLR(3) to remove the file descriptor from the set. This function should be considered equivalent to the FD_SET(3) macro in your sockets library, except that it is for use with proxy-capable sockets, and supports an extension for determining the highest numbered file descriptor.
s is a socket previously created with an_new_connection(3).
fds is an fd_set socket structure. Consult your platform's documentation for the select function for more information about this structure. It will contain a list of file descriptors suitable for use with the select call.
top is the previous highest numbered file descriptor. Select requires the highest numbered file descriptor in a set. The highest numbered file descriptor will be returned, and this may be larger than the top value if required to accommodate the freshly inserted file descriptor.
Malcolm Smith <email@example.com>
Time: 14:19:44 GMT, January 09, 2005