diff options
Diffstat (limited to 'keyexchange/isakmpd-20041012')
-rw-r--r-- | keyexchange/isakmpd-20041012/.depend | 4 | ||||
-rw-r--r-- | keyexchange/isakmpd-20041012/anytun_key.c | 24 | ||||
-rw-r--r-- | keyexchange/isakmpd-20041012/anytun_key.h | 8 |
3 files changed, 24 insertions, 12 deletions
diff --git a/keyexchange/isakmpd-20041012/.depend b/keyexchange/isakmpd-20041012/.depend index 1b68096..4a6e1fb 100644 --- a/keyexchange/isakmpd-20041012/.depend +++ b/keyexchange/isakmpd-20041012/.depend @@ -257,7 +257,9 @@ virtual.o: virtual.c /usr/include/openssl/err.h conf.h \ constants.h isakmp.h isakmp_fld.h field.h isakmp_num.h log.h \ transport.h message.h virtual.h udp.h util.h udp_encap.h anytun_key.o: anytun_key.c anytun_key.h \ - /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/sys/queue.h + /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/sys/queue.h \ + sysdep.h \ + /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/sysdep-os.h x509.o: x509.c sysdep.h \ /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/sysdep-os.h \ cert.h \ diff --git a/keyexchange/isakmpd-20041012/anytun_key.c b/keyexchange/isakmpd-20041012/anytun_key.c index 966e688..e86fb9a 100644 --- a/keyexchange/isakmpd-20041012/anytun_key.c +++ b/keyexchange/isakmpd-20041012/anytun_key.c @@ -1,10 +1,12 @@ #include "anytun_key.h" #include <sys/types.h> - -struct proto; -struct sa; -struct sockaddr; -struct kernel_sa; +#include <sys/ioctl.h> +#include <sys/queue.h> +#include <sys/socket.h> +#include <sys/time.h> +#include <sys/uio.h> +#include <string.h> +#include "sysdep.h" int anytun_key_socket; @@ -14,10 +16,12 @@ void anytun_key_connection_check(char * conn) int anytun_key_delete_spi(struct sa *sa, struct proto *proto, int incoming) { +return 0; } int anytun_key_enable_sa(struct sa *sa, struct sa *isakmp_sa) { +return 0; } //int anytun_key_enable_spi(in_addr_t, in_addr_t, in_addr_t, @@ -31,14 +35,18 @@ struct sa_kinfo * anytun_key_get_kernel_sa(u_int8_t *spi, size_t spi_sz, u_int8_ return 0; } -u_int8_t *anytun_key_get_spi(ze_t *sz, u_int8_t proto, struct sockaddr *src, - struct sockaddr *dst, u_int32_t seq) +u_int8_t *anytun_key_get_spi(size_t *sz, u_int8_t proto, struct sockaddr *src, + struct sockaddr *dst, u_int32_t seq) { + *sz = 4; + /* XXX should be random instead I think. */ + return strdup ("\x12\x34\x56\x78"); } int anytun_key_group_spis(struct sa *sa, struct proto *proto1, struct proto *proto2, int incoming) { +return 0; } void anytun_key_handler(int fd) @@ -47,11 +55,13 @@ void anytun_key_handler(int fd) int anytun_key_open(void) { +return 0; } int anytun_key_set_spi(struct sa *sa, struct proto *proto, int incoming, struct sa *isakmp_sa) { +return 0; } diff --git a/keyexchange/isakmpd-20041012/anytun_key.h b/keyexchange/isakmpd-20041012/anytun_key.h index e2e23c4..4b0cc68 100644 --- a/keyexchange/isakmpd-20041012/anytun_key.h +++ b/keyexchange/isakmpd-20041012/anytun_key.h @@ -14,11 +14,11 @@ extern int anytun_key_socket; extern void anytun_key_connection_check(char *); extern int anytun_key_delete_spi(struct sa *, struct proto *, int); extern int anytun_key_enable_sa(struct sa *, struct sa *); -extern int anytun_key_enable_spi(in_addr_t, in_addr_t, in_addr_t, - in_addr_t, u_int8_t *, u_int8_t, in_addr_t); +//extern int anytun_key_enable_spi(in_addr_t, in_addr_t, in_addr_t, +// in_addr_t, u_int8_t *, u_int8_t, in_addr_t); extern struct sa_kinfo *anytun_key_get_kernel_sa(u_int8_t *, size_t, u_int8_t, struct sockaddr *); -extern u_int8_t *anytun_key_get_spi(size_t *, u_int8_t, struct sockaddr *, - struct sockaddr *, u_int32_t); +extern u_int8_t *anytun_key_get_spi(size_t *sz, u_int8_t proto, struct sockaddr *src, + struct sockaddr *dst, u_int32_t seq); extern int anytun_key_group_spis(struct sa *, struct proto *, struct proto *, int); extern void anytun_key_handler(int); |