super super daemon inetd question ..

Hi

I would like to write a server app suports many protocols (TCP UDP Telnet ..) and add it to inetd.conf launched by super daemon .

How should I write the inetd.conf , is ok to write like below ?

telnet stream tcp nowait root /sbin/app

How about raw TCP and UDP , should they add into configuration file use any description ?

Thank you .

Reply to
kid
Loading thread data ...

Shouldn't it be: app stream tcp nowait root /sbin/app ?

No, just use functions to read/write raw data from/to standard io

Reply to
anon

Hi if my app wants to handle both TCP and UDP ports , should I write 2 lines ?

app stream tcp nowait root /sbin/app app dgram udp nowait root /sbin/app

Is it possible ?

anon

Reply to
kid1972tw

There is a missing parameter at the end of the line. This is documented in the man page for inetd.conf

formatting link

The last last parameters are command line arguments for the program, _including_ the name of the program as the first parameter e.g.

app stream tcp nowait root /sbin/app /sbin/app -v

You shoudl also check out the tcpd wrapper that can be used to configure access to the app by allowing/disallowing access by IP address etc.

The other thing to note is that you get a separate invocation of /sbin/app for each incoming TCP connection - which may or may not be what you want.

The main reasons for having services started by inetd (or xinetd) are...

- they are not running by default, leaving resources for other programs

- you can use tcpd for extra security

- easy of writing, you don't need to know much about handling networking connections. You write your application to just read from standard input and write to standard output and inetd does the rest. You can even write your application in a scripting language like bash, or perl.

You can not do raw TCP/UDP this way. Why do you need to do _RAW_ udp/tcp?

Reply to
Jim Jackson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.