Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tcp/port

Status
Not open for further replies.

lognet

Technical User
Jan 1, 2007
3
0
0
IT
hello everyone
ihave a sunos system my question is:
who can i give a tcp/port number to a program,
because i have an aplication than needs a static number

thanks for help
 
thanks salem
my application is not local,
so i have a program executed in the sunos , and another in a pc ,so i have to get the program of the sunos with a tcp port us the Well Known Ports.
so what i do: i add a port number to /etc/services but no thing
thanks
 
/etc/services (and other files) just tells the inetd which program to run to handle that port when an incoming request is received. But check with your local manual pages for precise details. Editing these files usually requires root privileges.

These should point to your server program.

> with a tcp port us the Well Known Ports.
Most of the well-known ports are already assigned.

Pick one in the user area, then tell the author / user of the PC program to use that port number in the initial request from the client program to the server program.

--
 
what ido is :
i add this line to /etc/services

witout 50000/tcp
than i tell the pc to use the port 50000


is it what you say ?


thank you
 
Yes, now read about your inetd program, and how it needs to associate that port/protocol with your program.


--
 
You only need to configure the inetd.conf & services files when you want inetd to fire off your server. If you run it as a daemon, you can avoid modifying them and just have your server bind to your port at start up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top