Thông tin

Tác giả Olivier Bonaventure
Hạn chót Không có hạn chót
Giới hạn nộp bài 3 bài nộp

Đăng nhập

[TRTP] Identify acknowledgement packets

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|T|   Win   |       Length (16 bits)        |    Seqnum     |
|p e|R|   dow   |                               |               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            CRC1                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Payload (max 512 bytes)                    |
|                                                               |
|                             ...                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        CRC2 (optional)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

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


Identify the packets that are of type PTYPE_ACK
The two high order bits of the first byte of the header indicate the packet type. Four packet types are defined in this protocol:
  • PTYPE_FEC (value 0, i.e. 00 in binary) corresponds to FEC packets
  • PTYPE_DATA (value 1, i.e. 01 in binary) corresponds to data packets
  • PTYPE_ACK (value 2, i.e. 10 in binary) corresponds to positive acknowledgements
  • PTYPE_NACK (value 3, i.e. 11 in binary) corresponds to positive acknowledgements

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