From dbd75e903e7931a3f673df6121a0dedab15c0423 Mon Sep 17 00:00:00 2001 From: "Coren[m]" Date: Mon, 9 Sep 2013 16:12:50 +0200 Subject: network.*: - IPAny_Port: analogous to IP_Port - ipport_equal: moved from DHT.c and adapted DHTc.: - ipport_equal renamed to ip4port_equal --- toxcore/network.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'toxcore/network.h') diff --git a/toxcore/network.h b/toxcore/network.h index 15ca68e3..d52a02ae 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -115,6 +115,22 @@ typedef union { uint8_t uint8[8]; } IP_Port; + +/* will replace IP_Port as soon as the complete infrastructure is in place + * removed the unused union and padding also */ +typedef struct { + IPAny ip; + uint16_t port; +} IPAny_Port; + +/* ipport_equal + * compares two IPAny_Port structures + * unset means unequal + * + * returns 0 when not equal or when uninitialized + */ +int ipport_equal(IPAny_Port *a, IPAny_Port *b); + typedef struct { int16_t family; uint16_t port; -- cgit v1.2.3