deliveredPacketTable.h 960 Bytes
Newer Older
1
2
3
4
5
6
7
#ifndef PRRT_DELIVERED_PACKET_TABLE_H
#define PRRT_DELIVERED_PACKET_TABLE_H

#include <stdint.h>
#include <stdbool.h>
#include "../packet.h"
#include "../../util/bitmap.h"
Andreas Schmidt's avatar
Andreas Schmidt committed
8
#include "../types/lossStatistics.h"
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

typedef struct {
    prrtSequenceNumber_t start;
    Bitmap* bitmap;
} PrrtDeliveredPacketTable;

PrrtDeliveredPacketTable * PrrtDeliveredPacketTable_create(void);
bool PrrtDeliveredPacketTable_destroy(PrrtDeliveredPacketTable *t);

bool PrrtDeliveredPacketTable_test_set_is_number_relevant(PrrtDeliveredPacketTable *t, prrtSequenceNumber_t seqno);

bool PrrtDeliveredPacketTable_test_is_block_relevant(PrrtDeliveredPacketTable *t,
                                                     prrtSequenceNumber_t start,
                                                     prrtSequenceNumber_t length);

void PrrtDeliveredPacketTable_forward_start(PrrtDeliveredPacketTable *fpt_ptr, prrtSequenceNumber_t new_start);

Andreas Schmidt's avatar
Andreas Schmidt committed
26

27
#endif //PRRT_DELIVERED_PACKET_TABLE_H