netstat -a will tell you that.
e
> Can anyone tell me a portable method (i.e. not by reading /proc/net/*)
> for a user process to ascertain what port number the kernel has allocated
> (i.e. the local port number) for a socket connected to a remote host?
> Any help appreciated,
> chris
> --
> Chris Willing Ph: (61-2) 9351 1893 (| 3914)
> Vislab, A28 Fax: (61-2) 9351 1880 (| 7726)
> NSW 2006 Australia http://www.vislab.usyd.edu.au/staff/chris/