summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h7
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
301typedef struct { 303typedef 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 */
380Networking_Core *new_networking(IP ip, uint16_t port); 383Networking_Core *new_networking(Logger *log, IP ip, uint16_t port);
381Networking_Core *new_networking_ex(IP ip, uint16_t port_from, uint16_t port_to, unsigned int *error); 384Networking_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). */
384void kill_networking(Networking_Core *net); 387void kill_networking(Networking_Core *net);