Statistics
| Branch: | Revision:

grapes / include / net_helper.h @ becf44ff

History | View | Annotate | Download (736 Bytes)

1
struct nodeID;
2

    
3
struct nodeID *nodeid_dup(const struct nodeID *s);
4
int nodeid_equal(const struct nodeID *s1, const struct nodeID *s2);
5

    
6
struct nodeID *create_node(const char *IPaddr, int port);
7
void nodeid_free(struct nodeID *s);
8
struct nodeID *net_helper_init(const char *IPaddr, int port);
9
int send_to_peer(const struct nodeID *from, const struct nodeID *to, const uint8_t *buffer_ptr, int buffer_size);
10
int recv_from_peer(const struct nodeID *local, struct nodeID **remote, uint8_t *buffer_ptr, int buffer_size);
11

    
12
int wait4data(const struct nodeID *n, struct timeval tout);
13

    
14
const char *node_addr(const struct nodeID *s);
15
struct nodeID *nodeid_undump(const uint8_t *b, int *len);
16
int nodeid_dump(uint8_t *b, const struct nodeID *s);