super super daemon inetd question ..

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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 .




Re: super super daemon inetd question ..
Quoted text here. Click to load it

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


Quoted text here. Click to load it

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

Re: super super daemon inetd question ..
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    

Quoted text here. Click to load it


Re: super super daemon inetd question ..
Quoted text here. Click to load it





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

http://www.linuxvalley.it/encyclopedia/ldp/manpage/man5/inetd.conf.5.php

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.

Quoted text here. Click to load it

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


Quoted text here. Click to load it




Site Timeline