int line;
} config_t;
-extern splay_tree_t *config_tree;
+extern struct splay_tree_t *config_tree;
extern int pinginterval;
extern int pingtimeout;
extern int maxtimeout;
extern bool bypass_security;
-extern void init_configuration(splay_tree_t **);
-extern void exit_configuration(splay_tree_t **);
+extern void init_configuration(struct splay_tree_t **);
+extern void exit_configuration(struct splay_tree_t **);
extern config_t *new_config(void) __attribute__ ((__malloc__));
extern void free_config(config_t *);
-extern void config_add(splay_tree_t *, config_t *);
-extern config_t *lookup_config(splay_tree_t *, char *);
-extern config_t *lookup_config_next(splay_tree_t *, const config_t *);
+extern void config_add(struct splay_tree_t *, config_t *);
+extern config_t *lookup_config(struct splay_tree_t *, char *);
+extern config_t *lookup_config_next(struct splay_tree_t *, const config_t *);
extern bool get_config_bool(const config_t *, bool *);
extern bool get_config_int(const config_t *, int *);
extern bool get_config_string(const config_t *, char **);
extern bool get_config_address(const config_t *, struct addrinfo **);
extern config_t *parse_config_line(char *, const char *, int);
-extern bool read_config_file(splay_tree_t *, const char *);
-extern void read_config_options(splay_tree_t *, const char *);
+extern bool read_config_file(struct splay_tree_t *, const char *);
+extern void read_config_options(struct splay_tree_t *, const char *);
extern bool read_server_config(void);
-extern bool read_host_config(splay_tree_t *, const char *);
+extern bool read_host_config(struct splay_tree_t *, const char *);
extern bool append_config_file(const char *, const char *, const char *);
#endif /* __TINC_CONF_H__ */
struct edge_t *reverse; /* edge in the opposite direction, if available */
} edge_t;
-extern splay_tree_t *edge_weight_tree; /* Tree with all known edges sorted on weight */
+extern struct splay_tree_t *edge_weight_tree; /* Tree with all known edges sorted on weight */
extern void init_edges(void);
extern void exit_edges(void);
extern edge_t *new_edge(void) __attribute__ ((__malloc__));
extern void free_edge(edge_t *);
-extern splay_tree_t *new_edge_tree(void) __attribute__ ((__malloc__));
-extern void free_edge_tree(splay_tree_t *);
+extern struct splay_tree_t *new_edge_tree(void) __attribute__ ((__malloc__));
+extern void free_edge_tree(struct splay_tree_t *);
extern void edge_add(edge_t *);
extern void edge_del(edge_t *);
extern edge_t *lookup_edge(struct node_t *, struct node_t *);
int flags;
io_cb_t cb;
void *data;
- splay_node_t node;
+ struct splay_node_t node;
} io_t;
typedef struct timeout_t {
struct timeval tv;
timeout_cb_t cb;
void *data;
- splay_node_t node;
+ struct splay_node_t node;
} timeout_t;
typedef struct signal_t {
int signum;
signal_cb_t cb;
void *data;
- splay_node_t node;
+ struct splay_node_t node;
} signal_t;
extern struct timeval now;
pthread_t thread;
listen_socket_t listen_socket[MAXSOCKETS];
- node_t *myself;
+ struct node_t *myself;
- splay_tree_t *config;
- splay_tree_t *edges;
- splay_tree_t *nodes;
+ struct splay_tree_t *config;
+ struct splay_tree_t *edges;
+ struct splay_tree_t *nodes;
- list_t *outgoing_connections;
+ struct list_t *outgoing_connections;
};
/// A handle for a MeshLink node.
} packet_type_t;
typedef struct listen_socket_t {
- io_t tcp;
- io_t udp;
+ struct io_t tcp;
+ struct io_t udp;
sockaddr_t sa;
bool bindto;
} listen_socket_t;
typedef struct outgoing_t {
char *name;
int timeout;
- splay_tree_t *config_tree;
+ struct splay_tree_t *config_tree;
struct config_t *cfg;
struct addrinfo *ai;
struct addrinfo *aip;
extern int setup_vpn_in_socket(const sockaddr_t *);
extern bool send_sptps_data(void *handle, uint8_t type, const char *data, size_t len);
extern bool receive_sptps_record(void *handle, uint8_t type, const char *data, uint16_t len);
-extern void send_packet(struct node_t *, vpn_packet_t *);
+extern void send_packet(struct node_t *, struct vpn_packet_t *);
extern void receive_tcppacket(struct connection_t *, const char *, int);
-extern void broadcast_packet(const struct node_t *, vpn_packet_t *);
+extern void broadcast_packet(const struct node_t *, struct vpn_packet_t *);
extern char *get_name(void);
extern bool setup_myself_reloadable(void);
extern bool setup_network(void);
struct edge_t *prevedge; /* nearest node from him to us */
struct node_t *via; /* next hop for UDP packets */
- splay_tree_t *edge_tree; /* Edges with this node as one of the endpoints */
+ 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) */
} node_t;
extern struct node_t *myself;
-extern splay_tree_t *node_tree;
+extern struct splay_tree_t *node_tree;
extern void init_nodes(void);
extern void exit_nodes(void);