Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xinetd or any other suggestion



On Sun, Apr 10, 2005 at 03:28:00PM -0400, Anand Rao wrote:
> hi ,
>  I have a text based interactive application that I need to run on a 
> port. 
> 
> I had read some articles regarding the usage  of  xinet or  inetd for 
> this purpose .. any Good pointers or  suggestions to start  on this ?

Since you have the application already, the easiest thing to do
is to use something which will translate from stdio to TCP
sockets.

One such is tcpserver, part of the ucspi-tcp package. 
http://cr.yp.to/ucspi-tcp/tcpserver.html

Another is netcat: http://netcat.sourceforge.net/

As you have mentioned, inetd can also do this. For inetd, add a
line to inetd.conf in this format:

<service_name> <sock_type> <proto> <flags> <user> <server_path> <args>

service_name is a port number defined in /etc/services. You can
add your own to this; I recommend a number over 1024.

sock_type is almost certainly stream
proto will almost certainly be tcp
the only flag you will want is "nowait"
user is the user who will run the program
server_path is the complete path to the executable
args are any arguments you need to pass.

Don't run anything as root.

-dsr-




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org