Environment
As per my understanding Network layer
is responsible for reassembly of fragmented datagrams and then it supplies the reassembled data to upper Transport layer
.
I have collected packet traces using libpcap
and i want to reassemble fragmented packets at layer 3 on my own.
This link says that i need fragment flag, fragment offset, identification number and buffer value for reassembly of segments.
Question
At the arrival of first segment how to know what should be size of buffer to be initialized for complete reassembly of datagram.
Thanks.