TCP State Diagram

When debugging a TCP server I get following lsof output( original values replaced by my_program, my_host, 11.22.33.44 )

.........

my_program 14514 wap 7u IPv4 0x300019d7200 0t0 TCP *:8080

(LISTEN)

.....

my_program 14514 wap 49u IPv4 0x30005d966e0 0t156 TCP my_host:8080->11.22.33.44:4915 (BOUND)

..........

my_program 14514 wap 122u IPv4 0x30005d974a0 0t37349 TCP

my_host::*->12.23.34.45:* (IDLE)

The BOUND state is not present on the original TCP state diagram( RFC )( the same is also for IDLE state ); is mentioned in Sun's man for netstat as

BOUND ready to connect or listen.

However, neither from these options suit this case. The program is a server, has already a socket accepting the connections( descriptor #7, LISTEN ). The 'BOUND' socket #49 has also a valid remote address component( 11.22.33.44:4915 ), which means that the peer has at least sent a SYN segment. Therefore, my question is, what really can mean this 'BOUND' case.

Another question - what does the socket #122 in 'IDLE' state? As to the sun's manpage,

IDLE Idle, opened but not bound.

But in this case both local and remote addresses( not ports ) are present. Does it mean that the socket has received an RST segment?

Thanks in advance

[1334 byte] By [victor_judin] at [2007-11-25 23:36:03]
# 1

You're definitely playing in a realm above me. :-) I've written a few TCP server apps, but never had to dig into the TCP states to debug problems (lucky me).

Anyway, here are some books that I've used extensively:

1. Advanced Programming in the UNIX environment

by W. Richard Stevens

2. Unix Network Programming by W. Richard Stevens

3. Douglas Comer has written numerous books on TCP/IP and

client/server programming

Also, try posting this question to the "Kernel" or "Driver Development" forums. Chances are you'll find someone who could answer this for you.

Sorry I couldn't give you a real answer,

Roger S.

Jo_nage at 2007-7-5 18:20:26 > top of Java-index,General,Talk to the Sysop...