]> git.meshlink.io Git - meshlink/blobdiff - src/net.h
Enforce spaces around operators.
[meshlink] / src / net.h
index 2f3a93aca93593274fcc713192d0f9ead21d1380..fa34dcf7eaa2faf6f87fcfdfb46c8508bc138e7e 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -1,6 +1,9 @@
+#ifndef MESHLINK_NET_H
+#define MESHLINK_NET_H
+
 /*
     net.h -- header for net.c
-    Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
+    Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -17,9 +20,6 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef __TINC_NET_H__
-#define __TINC_NET_H__
-
 #include "event.h"
 #include "sockaddr.h"
 
@@ -37,8 +37,8 @@
 
 typedef struct vpn_packet_t {
        struct {
-               unsigned int probe:1;
-               unsigned int tcp:1;
+               unsigned int probe: 1;
+               unsigned int tcp: 1;
        };
        uint16_t len;           /* the actual number of bytes in the `data' field */
        uint8_t data[MAXSIZE];
@@ -63,19 +63,19 @@ typedef struct outgoing_t {
        int timeout;
        struct splay_tree_t *config_tree;
        struct config_t *cfg;
-       struct addrinfo *ai;
+       struct addrinfo *ai; // addresses from config files
        struct addrinfo *aip;
+       struct addrinfo *nai; // addresses known via other online nodes (use free_known_addresses())
        timeout_t ev;
+       struct meshlink_handle *mesh;
 } outgoing_t;
 
 extern int maxoutbufsize;
 extern int addressfamily;
-extern unsigned replaywin;
 
 extern int keylifetime;
 extern int max_connection_burst;
 extern bool do_prune;
-extern int autoconnect;
 
 /* Yes, very strange placement indeed, but otherwise the typedefs get all tangled up */
 #include "connection.h"
@@ -104,6 +104,7 @@ extern int main_loop(struct meshlink_handle *mesh);
 extern void terminate_connection(struct meshlink_handle *mesh, struct connection_t *, bool);
 extern bool node_read_ecdsa_public_key(struct meshlink_handle *mesh, struct node_t *);
 extern bool read_ecdsa_public_key(struct meshlink_handle *mesh, struct connection_t *);
+extern bool read_ecdsa_private_key(struct meshlink_handle *mesh);
 extern void send_mtu_probe(struct meshlink_handle *mesh, struct node_t *);
 extern void handle_meta_connection_data(struct meshlink_handle *mesh, struct connection_t *);
 extern void retry(struct meshlink_handle *mesh);
@@ -114,4 +115,4 @@ extern void retry(struct meshlink_handle *mesh);
 extern CRITICAL_SECTION mutex;
 #endif
 
-#endif /* __TINC_NET_H__ */
+#endif