Use actual port in tincd logs / tinc get Port / invitations
[tinc] / src / net.h
index 261d9c3..8e256ce 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -124,6 +124,11 @@ typedef struct outgoing_t {
        timeout_t ev;
 } outgoing_t;
 
+typedef struct ports_t {
+       char *tcp;
+       char *udp;
+} ports_t;
+
 extern list_t outgoing_list;
 
 extern int maxoutbufsize;
@@ -151,7 +156,7 @@ extern bool udp_sndbuf_warnings;
 extern int max_connection_burst;
 extern int fwmark;
 extern bool do_prune;
-extern char *myport;
+extern ports_t myport;
 extern bool device_standby;
 extern bool autoconnect;
 extern bool disablebuggypeers;
@@ -215,7 +220,7 @@ extern void load_all_nodes(void);
 extern void try_tx(struct node_t *n, bool mtu);
 extern void tarpit(int fd);
 
-#ifndef HAVE_MINGW
+#ifndef HAVE_WINDOWS
 #define closesocket(s) close(s)
 #endif