summaryrefslogtreecommitdiff
path: root/keyexchange/isakmpd-20041012/anytun_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyexchange/isakmpd-20041012/anytun_key.c')
-rw-r--r--keyexchange/isakmpd-20041012/anytun_key.c24
1 files changed, 17 insertions, 7 deletions
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;
}