What Is Inetd Services

  • 18 Jan, 2012

    Not all services are started at boot time by running a server application. Eg. you won't usually see a process running for the finger service like you do for the smtp service. Many are handled by the InterNet Daemon inetd(1M). This is a generic service configured by the file inetd.conf(4).[2:35pm julian] page /etc/inetd.conf# $Author: reggers $# $Date: 1997/05/02 20:17:16 $## Internet server configuration databaseftp stream tcp nowait root /usr/etc/ftpd ftpdtelnet stream tcp nowait root /usr/etc/telnetd telnetdshell stream tcp nowait root /usr/etc/rshd rshdlogin stream tcp nowait root /usr/etc/rlogind rlogindexec stream tcp nowait root /usr/etc/rexecd rexecduucpd stream tcp nowait root /usr/etc/uucpd uucpdfinger stream tcp nowait nobody /usr/etc/fingerd fingerdetc...whois stream tcp nowait nobody /usr/lib/whois/whoisd whoisdetc...Inetd Comments:For each service listed in /etc/inetd.conf the inetd(1M) process, and that is a process is started at boot time, executes the socket(3N), bind(3N), listen(3N) and accept(3N) calls as discussed above. Inetd also handles many of the daemon issues (signal handling, set process group and controlling tty) which we've studiously avoided.The inetd(1M) process spawns the appropriate server application (with fork(2) and exec(2)) when a client connects to the service port. The daemon continues to listen for further connections to the service while the spawned child process handles the request which just came in.The server application (ie. the child spawned by inetd(1M)) is started with stdin and stdout connected to the remote host.port of the client process which made the connection. Any input/output by the server appliation on stdin/stdout are sent/received by the client application. You have Inter Process Communication (or IPC)!This means, any application written to use stdin/stdout can be a server application. Writing a server application should therefore be fairly simple.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.