Realign comments.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 3 Nov 2017 23:27:51 +0000 (00:27 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 3 Nov 2017 23:27:51 +0000 (00:27 +0100)
src/edge.h
src/fake-getaddrinfo.h
src/logger.h
src/net.h
src/node.h
src/subnet.h

index ef4feefcac2a1c81d1c720406797bc7b585391f7..e2f3b3b79bc92b6f00e848e446d24f25372fc2ab 100644 (file)
@@ -31,14 +31,14 @@ typedef struct edge_t {
        struct node_t *to;
        sockaddr_t address;
 
        struct node_t *to;
        sockaddr_t address;
 
-       uint32_t options;                       /* options turned on for this edge */
-       int weight;                                     /* weight of this edge */
+       uint32_t options;                /* options turned on for this edge */
+       int weight;                      /* weight of this edge */
 
 
-       struct connection_t *connection;        /* connection associated with this edge, if available */
-       struct edge_t *reverse;         /* edge in the opposite direction, if available */
+       struct connection_t *connection; /* connection associated with this edge, if available */
+       struct edge_t *reverse;          /* edge in the opposite direction, if available */
 } edge_t;
 
 } edge_t;
 
-extern avl_tree_t *edge_weight_tree;    /* Tree with all known edges sorted on weight */
+extern avl_tree_t *edge_weight_tree;     /* Tree with all known edges sorted on weight */
 
 extern void init_edges(void);
 extern void exit_edges(void);
 
 extern void init_edges(void);
 extern void exit_edges(void);
index a79a611b132b47303ba84f2bfdb95656863cee23..f10cb8392c59a788a55645f42c92579ba940faba 100644 (file)
 
 #ifndef HAVE_STRUCT_ADDRINFO
 struct addrinfo {
 
 #ifndef HAVE_STRUCT_ADDRINFO
 struct addrinfo {
-       int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME */
-       int     ai_family;      /* PF_xxx */
-       int     ai_socktype;    /* SOCK_xxx */
-       int     ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
-       size_t  ai_addrlen;     /* length of ai_addr */
-       char    *ai_canonname;  /* canonical name for hostname */
-       struct sockaddr *ai_addr;       /* binary address */
-       struct addrinfo *ai_next;       /* next structure in linked list */
+       int     ai_flags;         /* AI_PASSIVE, AI_CANONNAME */
+       int     ai_family;        /* PF_xxx */
+       int     ai_socktype;      /* SOCK_xxx */
+       int     ai_protocol;      /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+       size_t  ai_addrlen;       /* length of ai_addr */
+       char    *ai_canonname;    /* canonical name for hostname */
+       struct sockaddr *ai_addr; /* binary address */
+       struct addrinfo *ai_next; /* next structure in linked list */
 };
 #endif /* !HAVE_STRUCT_ADDRINFO */
 
 };
 #endif /* !HAVE_STRUCT_ADDRINFO */
 
index 1c5d80eec9ef533427f38d37f87c263831d36387..562d3795c914e9289cf2e4b6f04dd3356f263db4 100644 (file)
 */
 
 typedef enum debug_t {
 */
 
 typedef enum debug_t {
-       DEBUG_NOTHING = 0,                      /* Quiet mode, only show starting/stopping of the daemon */
+       DEBUG_NOTHING = 0,        /* Quiet mode, only show starting/stopping of the daemon */
        DEBUG_ALWAYS = 0,
        DEBUG_ALWAYS = 0,
-       DEBUG_CONNECTIONS = 1,          /* Show (dis)connects of other tinc daemons via TCP */
-       DEBUG_ERROR = 2,                        /* Show error messages received from other hosts */
-       DEBUG_STATUS = 2,                       /* Show status messages received from other hosts */
-       DEBUG_PROTOCOL = 3,                     /* Show the requests that are sent/received */
-       DEBUG_META = 4,                         /* Show contents of every request that is sent/received */
-       DEBUG_TRAFFIC = 5,                      /* Show network traffic information */
-       DEBUG_PACKET = 6,                       /* Show contents of each packet that is being sent/received */
-       DEBUG_SCARY_THINGS = 10         /* You have been warned */
+       DEBUG_CONNECTIONS = 1,    /* Show (dis)connects of other tinc daemons via TCP */
+       DEBUG_ERROR = 2,          /* Show error messages received from other hosts */
+       DEBUG_STATUS = 2,         /* Show status messages received from other hosts */
+       DEBUG_PROTOCOL = 3,       /* Show the requests that are sent/received */
+       DEBUG_META = 4,           /* Show contents of every request that is sent/received */
+       DEBUG_TRAFFIC = 5,        /* Show network traffic information */
+       DEBUG_PACKET = 6,         /* Show contents of each packet that is being sent/received */
+       DEBUG_SCARY_THINGS = 10,  /* You have been warned */
 } debug_t;
 
 typedef enum logmode_t {
 } debug_t;
 
 typedef enum logmode_t {
index bb608902267f3c63bc1ad71d847aad9c3e77f746..6290718773c034fe973b395c96ad370581bb5ac8 100644 (file)
--- a/src/net.h
+++ b/src/net.h
 #include "ipv6.h"
 
 #ifdef ENABLE_JUMBOGRAMS
 #include "ipv6.h"
 
 #ifdef ENABLE_JUMBOGRAMS
-#define MTU 9018                                /* 9000 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */
+#define MTU 9018        /* 9000 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */
 #else
 #else
-#define MTU 1518                                /* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */
+#define MTU 1518        /* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */
 #endif
 
 #endif
 
-#define MAXSIZE (MTU + 4 + EVP_MAX_BLOCK_LENGTH + EVP_MAX_MD_SIZE + MTU/64 + 20)        /* MTU + seqno + padding + HMAC + compressor overhead */
-#define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128)    /* Enough room for a request with a MAXSIZEd packet or a 8192 bits RSA key */
+#define MAXSIZE (MTU + 4 + EVP_MAX_BLOCK_LENGTH + EVP_MAX_MD_SIZE + MTU/64 + 20)  /* MTU + seqno + padding + HMAC + compressor overhead */
+#define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128)                     /* Enough room for a request with a MAXSIZEd packet or a 8192 bits RSA key */
 
 
-#define MAXSOCKETS 128                  /* Overkill... */
+#define MAXSOCKETS 128  /* Overkill... */
 
 typedef struct mac_t {
        uint8_t x[6];
 
 typedef struct mac_t {
        uint8_t x[6];
@@ -77,9 +77,9 @@ typedef union sockaddr_t {
 #endif
 
 typedef struct vpn_packet_t {
 #endif
 
 typedef struct vpn_packet_t {
-       length_t len;                           /* the actual number of bytes in the `data' field */
-       int priority;                           /* priority or TOS */
-       uint32_t seqno;                         /* 32 bits sequence number (network byte order of course) */
+       length_t len;           /* the actual number of bytes in the `data' field */
+       int priority;           /* priority or TOS */
+       uint32_t seqno;         /* 32 bits sequence number (network byte order of course) */
        uint8_t data[MAXSIZE];
 } vpn_packet_t;
 
        uint8_t data[MAXSIZE];
 } vpn_packet_t;
 
index 6226ae9ad677eb04bdddee0395476b664b8021e5..c5b7d9f6919603921933321316bb2903931b9ec0 100644 (file)
 #include "subnet.h"
 
 typedef struct node_status_t {
 #include "subnet.h"
 
 typedef struct node_status_t {
-       unsigned int unused_active: 1;                  /* 1 if active (not used for nodes) */
-       unsigned int validkey: 1;                               /* 1 if we currently have a valid key for him */
-       unsigned int unused_waitingforkey: 1;           /* 1 if we already sent out a request */
-       unsigned int visited: 1;                        /* 1 if this node has been visited by one of the graph algorithms */
-       unsigned int reachable: 1;                      /* 1 if this node is reachable in the graph */
-       unsigned int indirect: 1;                               /* 1 if this node is not directly reachable by us */
+       unsigned int unused_active: 1;          /* 1 if active (not used for nodes) */
+       unsigned int validkey: 1;               /* 1 if we currently have a valid key for him */
+       unsigned int unused_waitingforkey: 1;   /* 1 if we already sent out a request */
+       unsigned int visited: 1;                /* 1 if this node has been visited by one of the graph algorithms */
+       unsigned int reachable: 1;              /* 1 if this node is reachable in the graph */
+       unsigned int indirect: 1;               /* 1 if this node is not directly reachable by us */
        unsigned int unused: 26;
 } node_status_t;
 
        unsigned int unused: 26;
 } node_status_t;
 
index c76494318d144d38de73c6fa561b7e76e324d56b..d68677f12e34d40ff2f467685d1f66030f8699c1 100644 (file)
@@ -27,7 +27,7 @@ typedef enum subnet_type_t {
        SUBNET_MAC = 0,
        SUBNET_IPV4,
        SUBNET_IPV6,
        SUBNET_MAC = 0,
        SUBNET_IPV4,
        SUBNET_IPV6,
-       SUBNET_TYPES                            /* Guardian */
+       SUBNET_TYPES,          /* Guardian */
 } subnet_type_t;
 
 typedef struct subnet_mac_t {
 } subnet_type_t;
 
 typedef struct subnet_mac_t {
@@ -47,11 +47,11 @@ typedef struct subnet_ipv6_t {
 #include "node.h"
 
 typedef struct subnet_t {
 #include "node.h"
 
 typedef struct subnet_t {
-       struct node_t *owner;           /* the owner of this subnet */
+       struct node_t *owner;  /* the owner of this subnet */
 
 
-       subnet_type_t type;             /* subnet type (IPv4? IPv6? MAC? something even weirder?) */
-       time_t expires;                 /* expiry time */
-       int weight;                     /* weight (higher value is higher priority) */
+       subnet_type_t type;    /* subnet type (IPv4? IPv6? MAC? something even weirder?) */
+       time_t expires;        /* expiry time */
+       int weight;            /* weight (higher value is higher priority) */
 
        /* And now for the actual subnet: */
 
 
        /* And now for the actual subnet: */