I am still looking around for help. Thax alot for the good work from Sang-drax
Now, I have :
u_long SEQ_N // sequence # in a tcp header
I need to extract that from the tcp header having known the packet pointer tcp_ptr;
This is my code :
Well, I am not sure if this would work! Have I done right ? would any one follow the code and tell me if I got the SEQ_N value right ?!1Code:SEQ_N=*tcp_ptr <<8 //extract the 1st byte. *tcp_ptr ++; // goto next byte. SEQ_N=SEQ_N | *tcp_ptr; *tcp_ptr++; // 3rd byte. SEQ_N=SEQ_N | *tcp_ptr; *tcp_ptr++; // 4th byte SEQ_N = SEQ_N | *tcp_ptr; ... ... ..
Apreciated and kind of help.