where '''PACKETBUF_SIZE''' is the maximum size of a packet including header and '''PACKETBUF_HDR_SIZE''' is the size of the header of a packet. '''packetbuf''' points to the  array that stores the packet data. Note the conversion from '''uint16_t''' array structure to a '''uint8_t''' array structure. The reason behind using '''uint8_t''' format is that  it can store a character(8 bit), therefore each entry of the array can be used to store a character. The size of the buffer is PACKETBUF_SIZE + PACKETBUF_HDR_SIZE + 2.
 
where '''PACKETBUF_SIZE''' is the maximum size of a packet including header and '''PACKETBUF_HDR_SIZE''' is the size of the header of a packet. '''packetbuf''' points to the  array that stores the packet data. Note the conversion from '''uint16_t''' array structure to a '''uint8_t''' array structure. The reason behind using '''uint8_t''' format is that  it can store a character(8 bit), therefore each entry of the array can be used to store a character. The size of the buffer is PACKETBUF_SIZE + PACKETBUF_HDR_SIZE + 2.
   Exception encountered, of type "Error"