projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support new files (node/vertex/device.[ch]) and OpenBSD.
[tinc]
/
src
/
net.h
diff --git
a/src/net.h
b/src/net.h
index
3028300
..
7c17841
100644
(file)
--- a/
src/net.h
+++ b/
src/net.h
@@
-17,7
+17,7
@@
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: net.h,v 1.9.4.
29 2001/03/04 13:59:2
8 guus Exp $
+ $Id: net.h,v 1.9.4.
34 2001/07/21 15:34:1
8 guus Exp $
*/
#ifndef __TINC_NET_H__
*/
#ifndef __TINC_NET_H__
@@
-27,8
+27,9
@@
#include "config.h"
#include "config.h"
-#define MAXSIZE 1700 /* should be a bit more than the MTU for the tapdevice */
+#define MAXSIZE 1700
/* should be a bit more than the MTU for the tapdevice */
#define MTU 1600
#define MTU 1600
+#define SALTLEN 2 /* to spice things up for the NSA... */
#define MAC_ADDR_S "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ADDR_V(x) ((unsigned char*)&(x))[0],((unsigned char*)&(x))[1], \
#define MAC_ADDR_S "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ADDR_V(x) ((unsigned char*)&(x))[0],((unsigned char*)&(x))[1], \
@@
-58,8
+59,6
@@
typedef struct mac_t
typedef unsigned long ipv4_t;
typedef unsigned long ipv4_t;
-typedef ipv4_t ip_t; /* alias for ipv4_t */
-
typedef struct ipv6_t
{
unsigned short x[8];
typedef struct ipv6_t
{
unsigned short x[8];
@@
-70,7
+69,8
@@
typedef unsigned short port_t;
typedef short length_t;
typedef struct vpn_packet_t {
typedef short length_t;
typedef struct vpn_packet_t {
- length_t len; /* the actual number of bytes in the `data' field */
+ length_t len; /* the actual number of bytes in the `data' field */
+ unsigned char salt[SALTLEN]; /* two bytes of randomness */
unsigned char data[MAXSIZE];
} vpn_packet_t;
unsigned char data[MAXSIZE];
} vpn_packet_t;
@@
-98,7
+98,7
@@
extern int total_tap_out;
extern int total_socket_in;
extern int total_socket_out;
extern int total_socket_in;
extern int total_socket_out;
-extern
char *unknown
;
+extern
int seconds_till_retry
;
extern char *request_name[256];
extern char *status_text[10];
extern char *request_name[256];
extern char *status_text[10];
@@
-109,11
+109,13
@@
extern int str2opt(const char *);
extern char *opt2str(int);
extern void send_packet(connection_t *, vpn_packet_t *);
extern void receive_packet(connection_t *, vpn_packet_t *);
extern char *opt2str(int);
extern void send_packet(connection_t *, vpn_packet_t *);
extern void receive_packet(connection_t *, vpn_packet_t *);
+extern void receive_tcppacket(connection_t *, char *, int);
extern void accept_packet(vpn_packet_t *);
extern void accept_packet(vpn_packet_t *);
+extern void broadcast_packet(connection_t *, vpn_packet_t *);
extern int setup_network_connections(void);
extern void close_network_connections(void);
extern void main_loop(void);
extern int setup_network_connections(void);
extern void close_network_connections(void);
extern void main_loop(void);
-extern void terminate_connection(connection_t *);
+extern void terminate_connection(connection_t *
, int
);
extern void flush_queue(connection_t *);
#include <config.h>
extern void flush_queue(connection_t *);
#include <config.h>