Sponsored Content
Full Discussion: Ports
Top Forums UNIX for Advanced & Expert Users Ports Post 302315546 by Neo on Tuesday 12th of May 2009 04:42:53 PM
Old 05-12-2009
Quote:
Originally Posted by rsheikh
Someone said it is not necessary to have it registered to use it.
I agree with this. I have never found it to be the case that a port, a nice name and the protocol must be in /etc/services for a process to bind to a port.

A process can bind to a port, if it has permissions, without opening /etc/services.

... at least this has always been my experience.

Having said that, it certainly does not hurt to add your requirements to /etc/services, but I don't think that will solve your problem; hence I agree with the "someone" in the quote above.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ports

how can i check to see if my mail ports are open (port 110 for incoming and 25 for outgoing)? I want to do this because i am having a problem sending email out. If one of the ports has a problem, how can i open it? Thanks in advance! (9 Replies)
Discussion started by: djatwork
9 Replies

2. UNIX for Dummies Questions & Answers

Ports

How To Close ports,for example finger port 79?? :confused: :confused: :confused: 10x (6 Replies)
Discussion started by: Yaki
6 Replies

3. UNIX for Dummies Questions & Answers

Ports

I know i can look in the /etc/services file to look at referenced port numbers, but is there a command that will list the current ports being used? (i.e. what is the application does not have an entry in the services files :confused: ) (2 Replies)
Discussion started by: Ralf
2 Replies

4. IP Networking

ports???

Ok, I've been working in the IT field for about 3 years now and I never fully understood the concept of ip ports. I just started a new job that uses Solaris and today it kinda clicked in my head and I want to know if I'm right or wrong. Does each ip address have multiple ports. because we... (4 Replies)
Discussion started by: eloquent99
4 Replies

5. IP Networking

Ports

What are some good sites that list all TPC/UDP ports? ~thanks (3 Replies)
Discussion started by: ireeneek
3 Replies

6. UNIX for Dummies Questions & Answers

Ports...

Hello UNIX people... This is my first foray into the UNIX world so go easy on me... I have a client who has hired me to do some work on his windows stuff, BUT it just so happens his UNIX server started giving him problems... He is running SCO Open Server 5.0.6 The TTY ports won't... (5 Replies)
Discussion started by: TechKnow
5 Replies

7. HP-UX

Ports

Can any one tell the command for which process are running on a perticular port (1 Reply)
Discussion started by: zsujith
1 Replies

8. Solaris

regarding ports

Hi , I need one help... Is there any command on solaris 10 to free the ports. For e.g I used netstat -na| grep 8080 it displays either it is listening or established.. i want to free the ports... Anyone please help me on this... Thanks, Shanmuga (2 Replies)
Discussion started by: shanshine
2 Replies

9. Solaris

ports

Hi, If for example i try to start tomcat in a solaris server and get errors related to address already in use, how can I know if this port is really used for another process? If someone can point any documentation it will be very helpfull. Thanks! :rolleyes: (9 Replies)
Discussion started by: ffpradella
9 Replies

10. UNIX for Dummies Questions & Answers

ports

When the netstat -an command is run on current unix machine, it seems that there's an excessive amount of ports established (roughly 600). How can I tell what each of these ports are being used for? (1 Reply)
Discussion started by: lastchance551
1 Replies
GETSERVENT(3N)															    GETSERVENT(3N)

NAME
getservent, getservbyport, getservbyname, setservent, endservent - get service entry SYNOPSIS
#include <netdb.h> struct servent *getservent() struct servent *getservbyname(name, proto) char *name, *proto; struct servent *getservbyport(port, proto) int port; char *proto; setservent(stayopen) int stayopen endservent() DESCRIPTION
Getservent, getservbyname, and getservbyport each return a pointer to an object with the following structure containing the broken-out fields of a line in the network services data base, /etc/services. struct servent { char *s_name; /* official name of service */ char **s_aliases; /* alias list */ int s_port; /* port service resides at */ char *s_proto; /* protocol to use */ }; The members of this structure are: s_name The official name of the service. s_aliases A zero terminated list of alternate names for the service. s_port The port number at which the service resides. Port numbers are returned in network byte order. s_proto The name of the protocol to use when contacting the service. Getservent reads the next line of the file, opening the file if necessary. Setservent opens and rewinds the file. If the stayopen flag is non-zero, the net data base will not be closed after each call to get- servbyname or .IR getservbyport . Endservent closes the file. Getservbyname and getservbyport sequentially search from the beginning of the file until a matching protocol name or port number is found, or until EOF is encountered. If a protocol name is also supplied (non-NULL), searches must also match the protocol. FILES
/etc/services SEE ALSO
getprotoent(3N), services(5) DIAGNOSTICS
Null pointer(0) returned on EOF or error. BUGS
All information is contained in a static area so it must be copied if it is to be saved. Expecting port numbers to fit in a 32 bit quan- tity is probably naive. 4.2 Berkeley Distribution May 19, 1986 GETSERVENT(3N)
All times are GMT -4. The time now is 04:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy