TCP seq and ack numbers

131 views
Skip to first unread message

les

unread,
Jun 7, 2015, 10:28:52 PM6/7/15
to lib...@googlegroups.com
Hi,

I'm encountering some interesting behavior regarding the TCP seq and ack numbers.

I am trying to manually set initial sequence numbers --
I would like to set the sequence number for SYN and SYNACK packets manually using the setter TCP::seq(uint32_t) and TCP::ack_seq(uint32_t) functions.
However, after checking the packets sent through wireshark, the SYN packets always revert back to seq=0, and SYNACK packets to seq = 0, ack = 1, no matter
what values I place into the setter functions.


Is there something I'm not including? Or is this expected behavior from the library? Or is this perhaps interference from the kernel?
Any advice or help would be greatly appreciated.

Thanks!

Matias Fontanini

unread,
Jun 7, 2015, 10:43:00 PM6/7/15
to lib...@googlegroups.com, yummop...@gmail.com
That's probably wireshark. By default it will show sequence numbers relative to the first sequence number used by the client/server, same thing for ack numbers. If you go to the preferences menu -> protocols -> TCP, there's an option, "relative sequece numbers". Try unchecking that, it should work.

Marta Moreton

unread,
Oct 2, 2017, 3:58:44 AM10/2/17
to libtins
I'm facing a similar issue. I'm using Tins::PacketWriter to generate pcap files, but all messages appear with seq=0. Is there a way to give them a value for it so wireshark is able to represent them?

I also tried using UDP, but wireshark doesn't identify them as Diameter messages.

Can I use SCTP?

Thanks in advance!

Cheers,
Marta

Matias Fontanini

unread,
Oct 2, 2017, 9:44:42 AM10/2/17
to libtins
Did you try disabling relative sequence numbers as suggested in my previous response?

--
You received this message because you are subscribed to the Google Groups "libtins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libtins+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marta Moreton

unread,
Oct 10, 2017, 5:46:44 AM10/10/17
to libtins
I finally set the sequence number for each message and it worked

thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to libtins+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages