Statistics
| Branch: | Revision:

grapes / som / net_helper.h @ c642734a

History | View | Annotate | Download (700 Bytes)

1 651ed37d Luca
struct nodeID;
2 480921a6 Luca Abeni
3 651ed37d Luca
struct nodeID *nodeid_dup(const struct nodeID *s);
4
int nodeid_equal(const struct nodeID *s1, const struct nodeID *s2);
5 480921a6 Luca Abeni
6 b576198c Luca Abeni
struct nodeID *create_node(const char *IPaddr, int port);
7
struct nodeID *net_helper_init(const char *IPaddr, int port);
8
int send_to_peer(const struct nodeID *from, const struct nodeID *to, const uint8_t *buffer_ptr, int buffer_size);
9
int recv_from_peer(const struct nodeID *local, struct nodeID **remote, uint8_t *buffer_ptr, int buffer_size);
10 480921a6 Luca Abeni
11 b576198c Luca Abeni
int wait4data(const struct nodeID *n, struct timeval tout);
12 651ed37d Luca
13
const char *node_addr(const struct nodeID *s);
14
struct nodeID *nodeid_undump(const uint8_t *b, int *len);
15
int nodeid_dump(uint8_t *b, const struct nodeID *s);