X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnode.h;h=33bac25649cddbdb5597493360bc6334a319cbcf;hb=5dec7459d9920c930bdfb3ac0f2a3740a6247ec0;hp=5761e4d747e5544c2d5189fdaed074eaa597ac12;hpb=01eaeb3c9fa60ae9c6e5b866acd9baef79622d99;p=meshlink diff --git a/src/node.h b/src/node.h index 5761e4d7..33bac256 100644 --- a/src/node.h +++ b/src/node.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_NODE_H +#define MESHLINK_NODE_H + /* node.h -- header for node.c - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen 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 __MESHLINK_NODE_H__ -#define __MESHLINK_NODE_H__ - #include "event.h" #include "sockaddr.h" #include "sptps.h" @@ -73,23 +73,11 @@ typedef struct node_t { time_t last_connect_try; time_t last_successfull_connection; - 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 */ - 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; @@ -101,7 +89,7 @@ typedef struct node_t { extern void init_nodes(struct meshlink_handle *mesh); extern void exit_nodes(struct meshlink_handle *mesh); -extern node_t *new_node(void) __attribute__ ((__malloc__)); +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 *); @@ -109,4 +97,4 @@ 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 *); -#endif /* __MESHLINK_NODE_H__ */ +#endif