On Fri, 20 Mar 2009, Fred wrote:
> When performing a netstat the destination TCP port number listed is the
> ephemeral number assigned during accept() calls. The listen()ing socket
> is bind()ed to the original destination TCP port number, of course, yet
> when I perform a netstat I really would perfer seeing what the original
> destination TCP port number was, not what the connection's ephemeral
> destination port number is.
>
> Can anyone think of a way to allow me to see all extant TCP connections
> but have the original listening destination TCP port number displayed?
>
> I was thinking that I could perhaps call bind() on the socket that
> accept() returns -- yikes! -- but that crashed big time as I expected it
> to. It looks to me like it can't be done.
>
> Alternatively I must log debugging information to a text file when
> accept() is called if I want to see a table of connections with the
> listened port number.
>
> Any hint short of suicide is appreciated!
If you listen on a port and a call comes in on that port, it stays on that
port until the connections is sleared. I really do not understand what you
write above.
netstat -naut
shows ACTUAL tcp/udp port numbers in use (active or with a listening
program) at the time the program is run.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|