We also talked about inetd, the networking master daemon. You should glance at its configuration file /etc/inetd.conf to see what's there. I mentioned using fcntl to make I/O on a descriptor be non-blocking. This is done using the F_SETFL flag to set the O_NDELAY or the O_NONBLOCK flag. The latter is the POSIX-compliant way, so is preferred. I also talked about using select(3c) to wait until I/O is possible. This is done for accept(3N) as well as for read(2)ing and write(2)ing.
N.B. Solaris prefers the use of poll(2). select(3c) is built on top of this. On some BSD-derived systems, only select is available. poll is part of the XPG4 standard.
To build netd, netdata, and net_redir on solaris, the command that you'll have to run is
cc -o netd netd.c -lnsl -lsocket cc -o netdata netdata.c -lnsl -lsocket cc -o net_redir net_redir.c -lnsl -lsocketafter downloading these C files and the comp_environ.h header file. Note that an earlier version of netdata.c needs to have an #include directive changed so it will pick up comp_environ.h.
firstname.lastname@example.org, last updated