Revision f5e34866

View differences:

chunk_trading.h
1
#ifndef CHUNK_TRADING_H
2
#define CHUNK_TRADING_H
3

  
4
#include <sys/time.h>
5
#include "chunkbuffer.h"
6

  
7

  
8
//Type of signaling message
9
//Request a ChunkIDSet
10
#define MSG_SIG_REQ 0
11
//Diliver a ChunkIDSet (reply to a request)
12
#define MSG_SIG_DEL 1
13
//Offer a ChunkIDSet
14
#define MSG_SIG_OFF 2
15
//Accept a ChunkIDSet (reply to an offer)
16
#define MSG_SIG_ACC 3
17
//Receive the BufferMap
18
#define MSG_SIG_BMOFF 4
19
//Request the BufferMap
20
#define MSG_SIG_BMREQ 5
21

  
22

  
23
struct sig_nal {
24
    char type;//type of signal.
25
    int max_deliver;//Max number of chunks to deliver.
26
    int trans_id;//future use...
27
    int third_peer;//for buffer map exchange from other peers
28
    int future;//future use...
29
} ;
30

  
31

  
32
struct timeval simple_push(struct chunk_buffer *);
33

  
34

  
35

  
36

  
37
#endif

Also available in: Unified diff