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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default protocol for a service running via xinetd

Status
Not open for further replies.

goBoating

Programmer
Feb 8, 2000
1,606
0
0
US
Hello All,

I'm trying to write a little code that determines the protocol being used by a given service that is running via xinetd.

I first look in the /etc/xinetd.d/-serviceName- files for an explicitly configured protocol. If not found, I check the main xinetd.conf file.

Frequently, there is no mention of a protocol in either place. So, I thought I'd check the '/etc/services' file. But, that most often lists at least two protocols (tcp and udp) for each service.

The reading I've done says that if the xinetd config files don't specify a protocol, then the default for the service is used.

The ultimate question: how do I determine the default protocol for a given service?



'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
I should clarify, the service may not be running. I guess the question is how does xinetd know what protocol to use for a give service?

If there are both 'udp' and 'tcp' entries in /etc/services, does xinetd use both?



'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
It appears that in most cases, the 'protocol' can be inferred from the 'socket-type'. If the socket-type is stream, protocol will be tcp. If socket-type is dgram, protocol will be udp.


'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top