]> git.meshlink.io Git - meshlink/blobdiff - src/node.h
Use new version of UTCP which also return errors via the poll callback.
[meshlink] / src / node.h
index 427bc83a000907c6f8fb7e65602dd704ab651397..de33da3b89a3809518b0d5bef1cd4b3b95b552d9 100644 (file)
@@ -44,6 +44,7 @@ typedef struct node_t {
        void *priv;
 
        uint32_t options;                       /* options turned on for this node */
+       dev_class_t devclass;
 
        struct meshlink_handle *mesh;           /* The mesh this node belongs to */
 
@@ -69,24 +70,14 @@ typedef struct node_t {
        struct splay_tree_t *edge_tree;                /* Edges with this node as one of the endpoints */
 
        struct connection_t *connection;        /* Connection associated with this node (if a direct connection exists) */
-
-       uint32_t sent_seqno;                    /* Sequence number last sent to this node */
-       uint32_t received_seqno;                /* Sequence number last received from this node */
-       uint32_t received;                      /* Total valid packets received from this node */
-       uint32_t prev_received_seqno;
-       uint32_t prev_received;
-       unsigned char* late;                    /* Bitfield marking late packets */
+       time_t last_connect_try;
+       time_t last_successfull_connection;
 
        uint16_t mtu;                           /* Maximum size of packets to send to this node */
        uint16_t minmtu;                        /* Probed minimum MTU */
        uint16_t maxmtu;                        /* Probed maximum MTU */
        int mtuprobes;                          /* Number of probes */
        timeout_t mtutimeout;                   /* Probe event */
-       struct timeval probe_time;              /* Time the last probe was sent or received */
-       int probe_counter;                      /* Number of probes received since last burst was sent */
-       float rtt;                              /* Last measured round trip time */
-       float bandwidth;                        /* Last measured bandwidth */
-       float packetloss;                       /* Last measured packet loss rate */
 
        struct utcp *utcp;
 
@@ -102,7 +93,7 @@ extern node_t *new_node(void) __attribute__ ((__malloc__));
 extern void free_node(node_t *);
 extern void node_add(struct meshlink_handle *mesh, node_t *);
 extern void node_del(struct meshlink_handle *mesh, node_t *);
-extern node_t *lookup_node(struct meshlink_handle *mesh, char *);
+extern node_t *lookup_node(struct meshlink_handle *mesh, const char *);
 extern node_t *lookup_node_udp(struct meshlink_handle *mesh, const sockaddr_t *);
 extern void update_node_udp(struct meshlink_handle *mesh, node_t *, const sockaddr_t *);