Link to home
Start Free TrialLog in
Avatar of siunix
siunix

asked on

solaris ports usage

hi,
   I notice that application on solaris uses very
high port number, like 35000, when it tries to talk to the server.  I have an application running on port 1461,
when the client send a request to the server,
its destination port is 1461, and the source port
is 45009, which 45009 so big?  Is there a range
of ports that solaris uses?


thanks in advance
Avatar of nebeker
nebeker

Ports go from 0 to 65535.  Anything below 1024 is considered "reserved", and you must be running as root to listen on those ports...
Avatar of siunix

ASKER

why does the apps use big port like 45000?
ASKER CERTIFIED SOLUTION
Avatar of nebeker
nebeker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
developers tend to use socket() call to get a free socket/port for the system, its number is random if not explicitely requested. See man socket, man connect.
That's only true for a client program, of course :)

A server type program wouldn't function very well if the clients didn't know where to find it...
Has your question been answered?  If so, please accept one of the above comments as an answer and close this question.