bpf_skb_utils.h: add missing include to fix build against newer kernel headers
[project/unetd.git] / host.h
diff --git a/host.h b/host.h
index 5eed71175784fb8729dd4763ad3046294d909edc..56d359c7e0580aa9df5243c6bc7ce29c97487416 100644 (file)
--- a/host.h
+++ b/host.h
@@ -5,6 +5,14 @@
 #ifndef __UNETD_HOST_H
 #define __UNETD_HOST_H
 
+enum peer_endpoint_type {
+       ENDPOINT_TYPE_STATIC,
+       ENDPOINT_TYPE_PEX,
+       ENDPOINT_TYPE_ENDPOINT_NOTIFY,
+       ENDPOINT_TYPE_ENDPOINT_PORT_NOTIFY,
+       __ENDPOINT_TYPE_MAX,
+};
+
 struct network_peer {
        struct vlist_node node;
        uint8_t key[CURVE25519_KEY_SIZE];
@@ -15,6 +23,7 @@ struct network_peer {
        int port;
        int pex_port;
        bool dynamic;
+       bool indirect;
 
        struct {
                int connect_attempt;
@@ -25,12 +34,15 @@ struct network_peer {
                union network_addr local_ep_addr;
                union network_endpoint endpoint;
 
-               union network_endpoint next_endpoint;
+               uint8_t next_endpoint_idx;
+               union network_endpoint next_endpoint[__ENDPOINT_TYPE_MAX];
                uint64_t last_ep_update;
 
                uint64_t rx_bytes;
                uint64_t last_handshake;
                uint64_t last_request;
+               uint64_t last_query_sent;
+
                int idle;
                int num_net_queries;
        } state;