X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Fnode.h;fp=src%2Fnode.h;h=b43c2b46f8e952362f70110d9612b7bfab19eed9;hp=0b6154473a42ab3cd842d4f520ad1673db52a409;hb=04d33be4bd102de67bb6dba5c449e12fea0db4d2;hpb=b0a676988a8da3120e64ef0e1a4ea4c28b1511e1 diff --git a/src/node.h b/lib/node.h similarity index 90% rename from src/node.h rename to lib/node.h index 0b615447..b43c2b46 100644 --- a/src/node.h +++ b/lib/node.h @@ -17,12 +17,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: node.h,v 1.2 2002/04/09 15:26:00 zarq Exp $ + $Id: node.h,v 1.1 2002/04/28 12:46:26 zarq Exp $ */ #ifndef __TINC_NODE_H__ #define __TINC_NODE_H__ +#include + #include #include "subnet.h" @@ -47,11 +49,23 @@ typedef struct node_t { struct node_status_t status; - const EVP_CIPHER *cipher; /* Cipher type for UDP packets */ +#ifdef USE_OPENSSL + const EVP_CIPHER *cipher; /* Cipher type for UDP packets */ +#endif +#ifdef USE_GCRYPT + GCRY_CIPHER_HD cipher; /* Cipher type for UDP packets */ +#endif + char *key; /* Cipher key and iv */ int keylength; /* Cipher key and iv length*/ +#ifdef USE_OPENSSL const EVP_MD *digest; /* Digest type for MAC */ +#endif +#ifdef USE_GCRYPT + GCRY_MD_HD digest; /* Digest type for MAC */ +#endif + int maclength; /* Length of MAC */ int compression; /* Compressionlevel, 0 = no compression */ @@ -69,6 +83,8 @@ typedef struct node_t { unsigned int sent_seqno; /* Sequence number last sent to this node */ unsigned int received_seqno; /* Sequence number last received from this node */ + + void *data; /* Interface details */ } node_t; extern struct node_t *myself;