1 #ifndef __RABIN_BLK_LIST_H
2 #define __RABIN_BLK_LIST_H
3 
4 #include "../burp.h"
5 #include "blk.h"
6 
7 struct blist
8 {
9 	struct blk *head;
10 	struct blk *tail;
11 // On the server, keep track of the next blk to send to the champ chooser.
12 	struct blk *blk_for_champ_chooser;
13 // On the server, keep track of the last blk received from the champ chooser.
14 	struct blk *blk_from_champ_chooser;
15 // On the client, keep track of last blk requested by the server.
16 	struct blk *last_requested;
17 // On the client, keep track of last data sent by the client.
18 	struct blk *last_sent;
19 // On the champ chooser, keep track of where to deduplicate from next.
20 	struct blk *blk_to_dedup;
21 	uint64_t last_index;
22 };
23 
24 extern struct blist *blist_alloc(void);
25 extern void blist_free(struct blist **blist);
26 extern void blist_add_blk(struct blist *blist, struct blk *blk);
27 
28 #endif
29