mirror of
https://github.com/strongswan/strongswan.git
synced 2025-12-15 00:00:26 -05:00
parent
69b58e347e
commit
1da567734f
@ -56,7 +56,7 @@ win*)
|
||||
--enable-constraints --enable-revocation --enable-pem --enable-pkcs1
|
||||
--enable-pkcs8 --enable-x509 --enable-pubkey --enable-acert
|
||||
--enable-eap-tnc --enable-eap-ttls --enable-eap-identity
|
||||
--enable-updown --enable-ext-auth
|
||||
--enable-updown --enable-ext-auth --enable-libipsec
|
||||
--enable-tnccs-20 --enable-imc-attestation --enable-imv-attestation
|
||||
--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc
|
||||
--enable-pki --enable-swanctl --enable-socket-win"
|
||||
|
||||
@ -16,6 +16,10 @@ ipsec_sa_mgr.c ipsec_sa_mgr.h
|
||||
libipsec_la_LIBADD = \
|
||||
$(top_builddir)/src/libstrongswan/libstrongswan.la
|
||||
|
||||
if USE_WINDOWS
|
||||
libipsec_la_LIBADD += -lws2_32
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/libstrongswan
|
||||
|
||||
|
||||
@ -25,7 +25,9 @@
|
||||
#include <bio/bio_reader.h>
|
||||
#include <bio/bio_writer.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
typedef struct private_esp_packet_t private_esp_packet_t;
|
||||
|
||||
|
||||
@ -20,11 +20,40 @@
|
||||
#include <utils/debug.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#ifdef HAVE_NETINET_IP6_H
|
||||
#include <netinet/ip6.h>
|
||||
#endif
|
||||
#else
|
||||
struct ip {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
uint8_t ip_hl: 4;
|
||||
uint8_t ip_v: 4;
|
||||
#elif BYTE_ORDER == BIG_ENDIAN
|
||||
uint8_t ip_v: 4;
|
||||
uint8_t ip_hl: 4;
|
||||
#endif
|
||||
uint8_t ip_tos;
|
||||
uint16_t ip_len;
|
||||
uint16_t ip_id;
|
||||
uint16_t ip_off;
|
||||
uint8_t ip_ttl;
|
||||
uint8_t ip_p;
|
||||
uint16_t ip_sum;
|
||||
struct in_addr ip_src, ip_dst;
|
||||
} __attribute__((packed));
|
||||
struct ip6_hdr {
|
||||
uint32_t ip6_flow; /* 4 bit version, 8 bit TC, 20 bit flow label */
|
||||
uint16_t ip6_plen;
|
||||
uint8_t ip6_nxt;
|
||||
uint8_t ip6_hlim;
|
||||
struct in6_addr ip6_src, ip6_dst;
|
||||
} __attribute__((packed));
|
||||
#define HAVE_NETINET_IP6_H /* not really, but we only need the struct above */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TCP header, defined here because platforms disagree regarding member names
|
||||
|
||||
@ -113,6 +113,13 @@ static inline char* strdup_windows(const char *src)
|
||||
*/
|
||||
char* strndup(const char *s, size_t n);
|
||||
|
||||
/**
|
||||
* From winsock2.h
|
||||
*/
|
||||
#ifndef IPPROTO_IPIP
|
||||
#define IPPROTO_IPIP IPPROTO_IPV4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Provided via ws2_32
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user