diff options
Diffstat (limited to 'keyexchange/isakmpd-20041012')
-rw-r--r-- | keyexchange/isakmpd-20041012/.depend | 8 | ||||
-rw-r--r-- | keyexchange/isakmpd-20041012/anytun_key.c | 26 | ||||
-rw-r--r-- | keyexchange/isakmpd-20041012/pf_key_v2.h | 1 |
3 files changed, 23 insertions, 12 deletions
diff --git a/keyexchange/isakmpd-20041012/.depend b/keyexchange/isakmpd-20041012/.depend index 6af7a05..5b7d69b 100644 --- a/keyexchange/isakmpd-20041012/.depend +++ b/keyexchange/isakmpd-20041012/.depend @@ -258,12 +258,14 @@ virtual.o: virtual.c /usr/include/openssl/err.h conf.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 \ - sysdep.h \ + pf_key_v2.h sysdep.h \ /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/sysdep-os.h \ cert.h conf.h exchange.h exchange_num.h constants.h isakmp.h \ isakmp_fld.h field.h isakmp_num.h ipsec.h ipsec_doi.h ipsec_fld.h \ - ipsec_num.h isakmp_cfg.h key.h log.h pf_key_v2.h sa.h timer.h \ - transport.h message.h util.h + ipsec_num.h isakmp_cfg.h key.h log.h sa.h timer.h transport.h message.h \ + util.h pf_key_v2.c \ + /home/otti/anytun/keyexchange/isakmpd-20041012/sysdep/linux/bitstring.h \ + policy.h udp_encap.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 60047e3..f5f651b 100644 --- a/keyexchange/isakmpd-20041012/anytun_key.c +++ b/keyexchange/isakmpd-20041012/anytun_key.c @@ -1,4 +1,5 @@ #include "anytun_key.h" +#include "pf_key_v2.h" #include <sys/types.h> #include <sys/ioctl.h> #include <sys/queue.h> @@ -23,17 +24,18 @@ #include <sys/socket.h> #include <netdb.h> - +#include "pf_key_v2.c" int anytun_key_socket; void anytun_key_connection_check(char * conn) { + pf_key_v2_connection_check(conn); } int anytun_key_delete_spi(struct sa *sa, struct proto *proto, int incoming) { -return 0; +return pf_key_v2_delete_spi(sa, proto, incoming); } int anytun_key_enable_sa(struct sa *sa, struct sa *isakmp_sa) @@ -84,7 +86,7 @@ int anytun_key_enable_sa(struct sa *sa, struct sa *isakmp_sa) //}; -return 0; +return pf_key_v2_enable_sa(sa, isakmp_sa); } //int anytun_key_enable_spi(in_addr_t, in_addr_t, in_addr_t, @@ -95,36 +97,42 @@ return 0; struct sa_kinfo * anytun_key_get_kernel_sa(u_int8_t *spi, size_t spi_sz, u_int8_t proto, struct sockaddr *dst) { - return 0; + return pf_key_v2_get_kernel_sa(spi, spi_sz, proto, + dst); } 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; + //*sz = 4; /* XXX should be random instead I think. */ - return strdup ("\x12\x34\x56\x78"); + //return strdup ("\x12\x34\x56\x78"); + return pf_key_v2_get_spi(sz, proto, src, + dst, seq); } int anytun_key_group_spis(struct sa *sa, struct proto *proto1, struct proto *proto2, int incoming) { -return 0; +return pf_key_v2_group_spis(sa, proto1, + proto2, incoming); } void anytun_key_handler(int fd) { + pf_key_v2_handler(fd); } int anytun_key_open(void) { -return 0; +return pf_key_v2_open(); } int anytun_key_set_spi(struct sa *sa, struct proto *proto, int incoming, struct sa *isakmp_sa) { -return 0; +return pf_key_v2_set_spi(sa, proto, incoming, + isakmp_sa); } diff --git a/keyexchange/isakmpd-20041012/pf_key_v2.h b/keyexchange/isakmpd-20041012/pf_key_v2.h index 8eaed1a..008a5f6 100644 --- a/keyexchange/isakmpd-20041012/pf_key_v2.h +++ b/keyexchange/isakmpd-20041012/pf_key_v2.h @@ -34,6 +34,7 @@ #include <sys/types.h> #include <sys/queue.h> +#include <arpa/inet.h> struct proto; struct sa; |