X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnode.h;h=6e48f3b3f797691cfaf06742f82a47c099f5d9bf;hp=9c49a799222db745821445027eee603c70088718;hb=67df7fb7e1c9eefe4bbc920fdc68b595ef28abd9;hpb=de78d79db84c486afcc353884ec1770866beb653 diff --git a/src/node.h b/src/node.h index 9c49a799..6e48f3b3 100644 --- a/src/node.h +++ b/src/node.h @@ -29,14 +29,17 @@ #include "list.h" #include "subnet.h" -typedef struct node_status_t { - int active:1; /* 1 if active.. */ - int validkey:1; /* 1 if we currently have a valid key for him */ - int waitingforkey:1; /* 1 if we already sent out a request */ - int visited:1; /* 1 if this node has been visited by one of the graph algorithms */ - int reachable:1; /* 1 if this node is reachable in the graph */ - int indirect:1; /* 1 if this node is not directly reachable by us */ - int unused:26; +typedef union node_status_t { + struct { + int unused_active:1; /* 1 if active (not used for nodes) */ + int validkey:1; /* 1 if we currently have a valid key for him */ + int waitingforkey:1; /* 1 if we already sent out a request */ + int visited:1; /* 1 if this node has been visited by one of the graph algorithms */ + int reachable:1; /* 1 if this node is reachable in the graph */ + int indirect:1; /* 1 if this node is not directly reachable by us */ + int unused:26; + }; + uint32_t value; } node_status_t; typedef struct node_t { @@ -58,8 +61,6 @@ typedef struct node_t { int compression; /* Compressionlevel, 0 = no compression */ - list_t *queue; /* Queue for packets awaiting to be encrypted */ - struct node_t *nexthop; /* nearest node from us to him */ struct node_t *via; /* next hop for UDP packets */