forward_packet_table.h 594 Bytes
Newer Older
1
2
3
#ifndef PRRT_FORWARD_PACKET_TABLE_H
#define PRRT_FORWARD_PACKET_TABLE_H

4
#include <stdint.h>
5

6
7
#define FORWARD_PACKET_TABLE_LENGTH 2048  // sequence number space is 2**16 and we have 32 bit so: 2048

8
typedef struct {
9
    uint32_t data[FORWARD_PACKET_TABLE_LENGTH];
10
    uint16_t start;
11
12
13
14
15

} PrrtForwardPacketTable;

int PrrtForwardPacketTable_create(PrrtForwardPacketTable* fpt_prt);

16
int PrrtForwardPacketTable_test_set_is_number_relevant(PrrtForwardPacketTable *fpt_ptr, uint16_t seqno);
17

18
19
20
int PrrtForwardPacketTable_destroy(PrrtForwardPacketTable* fpt_prt);

#endif //PRRT_FORWARD_PACKET_TABLE_H