diff options
author | irungentoo <irungentoo@gmail.com> | 2015-01-01 21:30:42 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-01-01 21:30:42 -0500 |
commit | 93a998d15a983614de680dfe1f690f59f777698f (patch) | |
tree | 2b3f719aacc73266ec133a816d3f7668888f1c2d /toxcore/network.h | |
parent | 3328127f186377018c5ccadc8b33a66661f423dd (diff) |
Code cleanups.
Moved some functions to onion.c.
Fixed possible portability issues.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index 49d51d20..15e1c0a4 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -246,18 +246,6 @@ void ip_copy(IP *target, const IP *source); | |||
246 | /* copies an ip_port structure */ | 246 | /* copies an ip_port structure */ |
247 | void ipport_copy(IP_Port *target, const IP_Port *source); | 247 | void ipport_copy(IP_Port *target, const IP_Port *source); |
248 | 248 | ||
249 | |||
250 | /* packs IP into data, writes SIZE_IP bytes to data */ | ||
251 | void ip_pack(uint8_t *data, const IP *source); | ||
252 | /* unpacks IP from data, reads SIZE_IP bytes from data | ||
253 | return 0 on success, -1 on failure. */ | ||
254 | int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size); | ||
255 | /* packs IP_Port into data, writes SIZE_IPPORT bytes to data */ | ||
256 | void ipport_pack(uint8_t *data, const IP_Port *source); | ||
257 | /* unpacks IP_Port from data, reads SIZE_IPPORT bytes to data | ||
258 | return 0 on success, -1 on failure. */ | ||
259 | int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data_size); | ||
260 | |||
261 | /* | 249 | /* |
262 | * addr_resolve(): | 250 | * addr_resolve(): |
263 | * uses getaddrinfo to resolve an address into an IP address | 251 | * uses getaddrinfo to resolve an address into an IP address |