Revision fbc89189 som/net_helper.c
som/net_helper.c | ||
---|---|---|
190 | 190 |
return (memcmp(&s1->addr, &s2->addr, sizeof(struct sockaddr_in)) == 0); |
191 | 191 |
} |
192 | 192 |
|
193 |
int nodeid_dump(uint8_t *b, const struct nodeID *s) |
|
193 |
int nodeid_dump(uint8_t *b, const struct nodeID *s, size_t max_write_size)
|
|
194 | 194 |
{ |
195 |
if (max_write_size < sizeof(struct sockaddr_in)) return -1; |
|
196 |
|
|
195 | 197 |
memcpy(b, &s->addr, sizeof(struct sockaddr_in)); |
196 | 198 |
|
197 | 199 |
return sizeof(struct sockaddr_in); |
Also available in: Unified diff