struct buffer_t inbuf;
struct buffer_t outbuf;
io_t io; /* input/output event on this metadata connection */
- int tcplen; /* length of incoming TCPpacket */
int allow_request; /* defined if there's only one request possible */
time_t last_ping_time; /* last time we saw some activity from the other end or pinged them */
time_t last_key_renewal; /* last time we renewed the SPTPS key */
}
memcpy(&status->status, &internal->status, sizeof status->status);
- memcpy(&status->address, &internal->address, sizeof status->address);
status->mtu = internal->mtu;
status->minmtu = internal->minmtu;
status->maxmtu = internal->maxmtu;
/// The status of a node.
struct devtool_node_status {
uint32_t status;
- struct sockaddr_storage address;
uint16_t mtu;
uint16_t minmtu;
uint16_t maxmtu;
struct connection_t *connection;
struct outgoing_t *outgoing;
- int connection_burst;
int contradicting_add_edge;
int contradicting_del_edge;
int sleeptime;
- time_t connection_burst_time;
- time_t last_hard_try;
time_t last_unreachable;
timeout_t pingtimer;
timeout_t periodictimer;
uint64_t prng_state[4];
uint32_t session_id;
- int next_pit;
- int pits[10];
-
// Infrequently used callbacks
meshlink_node_status_cb_t node_status_cb;
meshlink_node_status_cb_t meta_status_cb;
return true;
}
- /* Are we receiving a TCPpacket? */
-
- if(c->tcplen) {
- abort(); // TODO: get rid of tcplen altogether
- }
-
/* Change newline to null byte, just like non-SPTPS requests */
if(request[length - 1] == '\n') {
utcp_exit(n->utcp);
- sockaddrfree(&n->address);
-
ecdsa_free(n->ecdsa);
sptps_stop(&n->sptps);
dev_class_t devclass;
// Used for packet I/O
- int sock; /* Socket to use for outgoing UDP packets */
uint32_t session_id; /* Unique ID for this node's currently running process */
sptps_t sptps;
- sockaddr_t address; /* his real (internet) ip to send UDP packets to */
struct utcp *utcp;
char *canonical_address; /* The canonical address of this node, if known */
sockaddr_t recent[MAX_RECENT]; /* Recently seen addresses */
- sockaddr_t catta_address; /* Latest address seen by Catta */
struct node_t *nexthop; /* nearest node from us to him */
} node_t;