projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Changed list routines to give it the same look'n'feel as the rbl and
[tinc]
/
src
/
connection.h
diff --git
a/src/connection.h
b/src/connection.h
index
6039894
..
195cb1b
100644
(file)
--- a/
src/connection.h
+++ b/
src/connection.h
@@
-17,13
+17,13
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: connection.h,v 1.1.2.
2 2000/11/20 22:13:03
guus Exp $
+ $Id: connection.h,v 1.1.2.
4 2001/01/05 23:53:49
guus Exp $
*/
#ifndef __TINC_CONNECTION_H__
#define __TINC_CONNECTION_H__
*/
#ifndef __TINC_CONNECTION_H__
#define __TINC_CONNECTION_H__
-#include <
rbl
.h>
+#include <
avl_tree
.h>
#include "config.h"
#include "config.h"
@@
-66,8
+66,8
@@
typedef struct connection_t {
char *name; /* name of this connection */
ipv4_t address; /* his real (internet) ip */
char *hostname; /* the hostname of its real ip */
char *name; /* name of this connection */
ipv4_t address; /* his real (internet) ip */
char *hostname; /* the hostname of its real ip */
- short unsigned int port; /* his portnumber */
int protocol_version; /* used protocol */
int protocol_version; /* used protocol */
+ short unsigned int port; /* port number for UDP traffic */
long unsigned int options; /* options turned on for this connection */
int flags; /* his flags */
long unsigned int options; /* options turned on for this connection */
int flags; /* his flags */
@@
-100,20
+100,22
@@
typedef struct connection_t {
struct connection_t *nexthop; /* nearest meta-hop in this direction */
struct connection_t *nexthop; /* nearest meta-hop in this direction */
-
rbltree_t *subnet_tree;
/* Pointer to a tree of subnets belonging to this connection */
+
avl_tree_t *subnet_tree;
/* Pointer to a tree of subnets belonging to this connection */
struct config_t *config; /* Pointer to configuration tree belonging to this host */
} connection_t;
struct config_t *config; /* Pointer to configuration tree belonging to this host */
} connection_t;
-extern
rbl
tree_t *connection_tree;
+extern
avl_
tree_t *connection_tree;
extern connection_t *myself;
extern void init_connections(void);
extern connection_t *new_connection(void);
extern void free_connection(connection_t *);
extern connection_t *myself;
extern void init_connections(void);
extern connection_t *new_connection(void);
extern void free_connection(connection_t *);
+extern void id_add(connection_t *);
extern void connection_add(connection_t *);
extern void connection_del(connection_t *);
extern connection_t *lookup_id(char *);
extern void connection_add(connection_t *);
extern void connection_del(connection_t *);
extern connection_t *lookup_id(char *);
+extern connection_t *lookup_connection(ipv4_t, short unsigned int);
extern void dump_connection_list(void);
extern int read_host_config(connection_t *);
extern void destroy_connection_tree(void);
extern void dump_connection_list(void);
extern int read_host_config(connection_t *);
extern void destroy_connection_tree(void);