• Uncategorized

About c : Raw-Socket-C-TCP-with-Flags

Question Detail

i need clone a Packet i get with TCPDump in C,With RawSockets, Using iph-> and tcph-> in C.

This is 5 packets of example:

03:49.850665 IP SRCIP.22409 > DSTIP.80: Flags [.], ack 2897, win 274, options [nop,nop,TS val 20513654 ecr 3515597033], length 0
10:03:49.850667 IP SRCIP.22409 > DSTIP.80: Flags [.], ack 4345, win 296, options [nop,nop,TS val 20513654 ecr 3515597033], length 0
10:03:49.850669 IP SRCIP.22409 > DSTIP.80: Flags [.], ack 5793, win 319, options [nop,nop,TS val 20513654 ecr 3515597033], length 0
10:03:49.850671 IP SRCIP.22409 > DSTIP.80: Flags [.], ack 7241, win 342, options [nop,nop,TS val 20513654 ecr 3515597033], length 0
10:03:49.850673 IP SRCIP.22409 > DSTIP.80: Flags [.], ack 8689, win 364, options [nop,nop,TS val 20513654 ecr 3515597033], length 0

And i want to Do that kind of Packets in C, i using sendto() function for send packets, tcph-> and iph->, With int s = socket (PF_INET, SOCK_RAW, IPPROTO_TCP);, My code send SYN Packets with Checksum and anything correct, But i don’t know how make this kind of packets, With that “Options”.

If you need any another information of Code or Anything, Just ask it below.

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.