Statistics
| Branch: | Revision:

grapes / include / peer.h @ master

History | View | Annotate | Download (679 Bytes)

1 809588ce CsabaKiraly
/**
2
 * @file:   peer.h
3 b9e0d721 MarcoBiazzini
 * @brief Peer structure definition.
4 809588ce CsabaKiraly
 * @author: Alessandro Russo <russo@disi.unitn.it>
5 b79c8e3a Luca Baldesi
 * @author: Luca Baldesi <luca.baldesi@unitn.it>
6 809588ce CsabaKiraly
 *
7
 */
8
9
#ifndef _PEER_H
10
#define        _PEER_H
11
12
#include <sys/time.h>
13
14
struct peer {
15 0c6efcd5 Luca Baldesi
    /* Peer identifier, the nodeid associated with the peer */
16
    struct nodeID *id;
17
18
    /* Peer creation time */
19
    struct timeval creation_timestamp; 
20
21
    /* User defined data to be broadcasted in the network */
22
    void * metadata; 
23
24
    /* User defined data not to be sent over the network */
25
    void * user_data;
26 809588ce CsabaKiraly
};
27
28 b79c8e3a Luca Baldesi
typedef void (*peer_deinit_f)(struct peer *p);
29
typedef void (*peer_init_f)(struct peer *p);
30 809588ce CsabaKiraly
31
#endif        /* _PEER_H */