X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.h;h=69ca48877b9ff590ab433464c66db44c97ef3ef3;hb=3fc678a8df4d6c057ef9f2c602b86ed106651e68;hp=1b0294bd40ce299b779a2ba7aa9aaa468d5267d9;hpb=11effab85b6b278ccf0ac3ba52a12bbca3e3dcc5;p=tinc diff --git a/src/net.h b/src/net.h index 1b0294bd..69ca4887 100644 --- a/src/net.h +++ b/src/net.h @@ -1,7 +1,7 @@ /* net.h -- header for net.c Copyright (C) 1998-2005 Ivo Timmermans - 2000-2014 Guus Sliepen + 2000-2016 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 @@ -115,6 +115,7 @@ typedef struct listen_socket_t { io_t udp; sockaddr_t sa; bool bindto; + int priority; } listen_socket_t; #include "conf.h" @@ -125,8 +126,9 @@ typedef struct outgoing_t { int timeout; splay_tree_t *config_tree; struct config_t *cfg; - struct addrinfo *ai; + struct addrinfo *ai; // addresses from config files struct addrinfo *aip; + struct addrinfo *kai; // addresses known via other online nodes (use free_known_addresses()) timeout_t ev; } outgoing_t; @@ -191,10 +193,11 @@ extern void handle_new_meta_connection(void *, int); extern void handle_new_unix_connection(void *, int); extern int setup_listen_socket(const sockaddr_t *); extern int setup_vpn_in_socket(const sockaddr_t *); -extern bool send_sptps_data(void *handle, uint8_t type, const void *data, size_t len); +extern bool send_sptps_data(node_t *to, node_t *from, int type, const void *data, size_t len); extern bool receive_sptps_record(void *handle, uint8_t type, const void *data, uint16_t len); extern void send_packet(struct node_t *, vpn_packet_t *); extern void receive_tcppacket(struct connection_t *, const char *, int); +extern bool receive_tcppacket_sptps(struct connection_t *, const char *, int); extern void broadcast_packet(const struct node_t *, vpn_packet_t *); extern char *get_name(void); extern void device_enable(void); @@ -215,7 +218,6 @@ extern void regenerate_key(void); extern void purge(void); extern void retry(void); extern int reload_configuration(void); -extern void load_all_subnets(void); extern void load_all_nodes(void); extern void try_tx(struct node_t *n, bool);