In my networking course, I studied that there are 11 tcp states, They are as follows:
- Closed
- Listen
- Syn_Sent
- Syn_Rcvd
- Established
- Fin_Wait_1
- Fin_Wait_2
- Closing
- Time_Wait
- Last_Ack
- Close_Wait
I don't know exactly how many of these states are actually implemented in Linux Kernel Network Architecture.
I want to write a program using system calls which can capture all these states which are implemented in Linux Kernel.
Actually i want to use socket programming and system calls for just capturing these states like :
whenever I do netstat -taupen | grep tcp , I want to see all these connection's states in the State column for the same tcp connection at different times.
Somebody give me some idea on how to program such a code.