M
M
Michael2017-03-08 09:41:41
Computer networks
Michael, 2017-03-08 09:41:41

Golang: TCP reassembly. How to reassemble TCP segments into one packet upon receipt?

I'm trying to recreate the same thing that the EPAN module does in tshark. But on Go.
I am capturing (using libpcap) the segments of a TCP packet. But I don't know how to assemble them into a single package (reassembly).
How can I track that all packages have arrived? How can I glue them in the right order? How can I decrypt payload?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Axian Ltd., 2017-03-08
@AxianLTD

Familiarize yourself with the RFC standards for the TCP protocol and those protocols that you are going to "decrypt". All relevant rfcs can be found for example here https://tools.ietf.org/html/rfc793. See the wireshark sources for examples of how this is done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question