inetd is a super daemon which listens on all ports configured in /etc/inetd.conf (first column).
When a connection attempt is made to one of these ports inetd starts the application which is also configured

inetd is a super daemon which listens on all ports configured in /etc/inetd.conf (first column).
When a connection attempt is made to one of these ports inetd starts the application which is also configured in /etc/inetd.conf (2nd and subsequent columns).
inetd is started at boot time.

There is a more recent version of inetd called xinetd. The configuration file (with a different format) is /etc/xinetd.conf.

inetd listens on a series of ports and takes care of the corresponding network operations in behalf of other programs

when a new TCP connection arrives on a specific port, it accepts the connection, and starts an instance of the program associated with that port to handle the corresponding client (remote user)

incoming data on the child socket is sent to the standard input of the program, and any output from the program is send over that same socket

udp (or raw) is handled in a similar way without the "accept" step. there is support for spawning a new instance for evry new packet (or "session") or just hand over any new packet to a single instance

there are several goals :
- the program does not need to implement network operation
- the program does not need to run when there is no connected client
- the program can work with privileged ports while running with non-root privileges
- plenty of additional features such as generic timeouts and monitoring, access control by ip or time period need to be implemented a single time and configured using the same syntax for all demons using inetd

btw, not many programs use inetd (or xinetd) anymore

you'll find tools such as faucet (comes with netpipes) that also take care of network operations on behalf of other programs, with different features

If I may add, with systemd arriving in all major linux distros inetd and xinetd will be finally obsolete. Systemd itself can listen on a port and start the corresponding service. It can so so with any daemon listening on a network port.

0

Featured Post

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

I have been running these systems for a few years now and I am just very happy with them. I just wanted to share the manual that I have created for upgrades and other things. Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…

Learn several ways to interact with files and get file information from the bash shell.
ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…

Learn how to get help with Linux/Unix bash shell commands.
Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…