Information

Author(s) Olivier Bonaventure, Louis Navarre
Deadline No deadline
Submission limit 3 submissions

Tags

Sign in

[TRTP] Find the longest data packet

The packet header of our simple protocol has the following format:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|t y|  Window   |     Length (13 bits)    |       Seqnum        |
|p e| (6 bits)  |                         |      (11 bits)      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            CRC1                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Payload (max 512 bytes)                    |
|                                                               |
|                             ...                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        CRC2 (optional)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

In this exercise, we focus on the type, Length and Seqnum fields of the header


Find the longest data packet based on protocol headers

The Length field is encoded in 13 bits, starting at the second byte, and finishing at bit 20. Remember that this field is encoded in network byte order.

In the hexadecimal representations of the first four bytes of packet headers below, select the one that corresponds to the longest packet.