diff options
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index 97927299..1cd1c999 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <libc.h> | 29 | #include <libc.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #include "logger.h" | ||
33 | |||
32 | #include <stdlib.h> | 34 | #include <stdlib.h> |
33 | #include <stdio.h> | 35 | #include <stdio.h> |
34 | #include <stdint.h> | 36 | #include <stdint.h> |
@@ -299,6 +301,7 @@ typedef struct { | |||
299 | } Packet_Handles; | 301 | } Packet_Handles; |
300 | 302 | ||
301 | typedef struct { | 303 | typedef struct { |
304 | Logger *log; | ||
302 | Packet_Handles packethandlers[256]; | 305 | Packet_Handles packethandlers[256]; |
303 | 306 | ||
304 | sa_family_t family; | 307 | sa_family_t family; |
@@ -377,8 +380,8 @@ void networking_poll(Networking_Core *net, void *userdata); | |||
377 | * | 380 | * |
378 | * If error is non NULL it is set to 0 if no issues, 1 if socket related error, 2 if other. | 381 | * If error is non NULL it is set to 0 if no issues, 1 if socket related error, 2 if other. |
379 | */ | 382 | */ |
380 | Networking_Core *new_networking(IP ip, uint16_t port); | 383 | Networking_Core *new_networking(Logger *log, IP ip, uint16_t port); |
381 | Networking_Core *new_networking_ex(IP ip, uint16_t port_from, uint16_t port_to, unsigned int *error); | 384 | Networking_Core *new_networking_ex(Logger *log, IP ip, uint16_t port_from, uint16_t port_to, unsigned int *error); |
382 | 385 | ||
383 | /* Function to cleanup networking stuff (doesn't do much right now). */ | 386 | /* Function to cleanup networking stuff (doesn't do much right now). */ |
384 | void kill_networking(Networking_Core *net); | 387 | void kill_networking(Networking_Core *net); |