Avoid memmove() for legacy UDP packets.

This commit is contained in:
Guus Sliepen 2014-12-08 00:44:38 +01:00
parent c2319e90b1
commit 263d990382
2 changed files with 25 additions and 22 deletions

View file

@ -87,12 +87,18 @@ typedef union sockaddr_t {
typedef struct vpn_packet_t {
length_t len; /* the actual number of bytes in the `data' field */
int priority; /* priority or TOS */
node_id_t dstid; /* node ID of the final recipient */
node_id_t srcid; /* node ID of the original sender */
uint8_t seqno[4]; /* 32 bits sequence number (network byte order of course) */
uint32_t seqno; /* 32 bits sequence number (network byte order of course) */
uint8_t data[MAXSIZE];
} vpn_packet_t;
typedef struct sptps_packet_t {
length_t len; /* the actual number of bytes in the `data' field */
int priority; /* priority or TOS */
node_id_t dstid; /* node ID of the final recipient */
node_id_t srcid; /* node ID of the original sender */
char data[MAXSIZE];
} sptps_packet_t;
/* Packet types when using SPTPS */
#define PKT_COMPRESSED 1