diff options
author | vanhu <vanhu@FreeBSD.org> | 2009-06-12 15:44:35 +0000 |
---|---|---|
committer | vanhu <vanhu@FreeBSD.org> | 2009-06-12 15:44:35 +0000 |
commit | 16c1346b9a6c737fd054d4d0644bf5104fcb32aa (patch) | |
tree | e75e977677e2ddd8c5e3a47752c3693ea92b15e3 /sys/netinet/udp.h | |
parent | 76ddf574294a7a39ca62f55ea127233303bcf29e (diff) | |
download | FreeBSD-src-16c1346b9a6c737fd054d4d0644bf5104fcb32aa.zip FreeBSD-src-16c1346b9a6c737fd054d4d0644bf5104fcb32aa.tar.gz |
Added support for NAT-Traversal (RFC 3948) in IPsec stack.
Thanks to (no special order) Emmanuel Dreyfus (manu@netbsd.org), Larry
Baird (lab@gta.com), gnn, bz, and other FreeBSD devs, Julien Vanherzeele
(julien.vanherzeele@netasq.com, for years of bug reporting), the PFSense
team, and all people who used / tried the NAT-T patch for years and
reported bugs, patches, etc...
X-MFC: never
Reviewed by: bz
Approved by: gnn(mentor)
Obtained from: NETASQ
Diffstat (limited to 'sys/netinet/udp.h')
-rw-r--r-- | sys/netinet/udp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/netinet/udp.h b/sys/netinet/udp.h index 2e8fd8d..6841683 100644 --- a/sys/netinet/udp.h +++ b/sys/netinet/udp.h @@ -45,4 +45,23 @@ struct udphdr { u_short uh_sum; /* udp checksum */ }; +/* + * User-settable options (used with setsockopt). + */ +#define UDP_ENCAP 0x01 + + +/* + * UDP Encapsulation of IPsec Packets options. + */ +/* Encapsulation types. */ +#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ +#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-02+ */ + +/* Default ESP in UDP encapsulation port. */ +#define UDP_ENCAP_ESPINUDP_PORT 500 + +/* Maximum UDP fragment size for ESP over UDP. */ +#define UDP_ENCAP_ESPINUDP_MAXFRAGLEN 552 + #endif |