Description of Packet structure.
More...
#include "crc.h"
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Description of Packet structure.
Definition in file packet.h.
◆ Packet
A Packet structure. New Packets can be created using the packet_new function.
- See also
- packet_new
◆ CRC_calculate()
unsigned int CRC_calculate |
( |
Packet * |
data | ) |
|
Calculate CRC and attach to end of Packet structure.
- Returns
- 8 byte CRC value.
Definition at line 3 of file packet.c.
◆ CRC_verify()
Verify CRC
- Returns
- -1 if CRC verification fails.
Definition at line 7 of file packet.c.
◆ free_packet()
void free_packet |
( |
Packet * |
data | ) |
|
Cleans and destroys packet. Call when a packet has been sent or received.
Definition at line 16 of file packet.c.
◆ serialize_Packet()
void serialize_Packet |
( |
Packet * |
data | ) |
|
Serializes a Packet for sending/receiving.