removed old FreeS/WAN cvs revision entries
[strongswan.git] / src / libfreeswan / ipsec_encap.h
1 /*
2 * declarations relevant to encapsulation-like operations
3 * Copyright (C) 1996, 1997 John Ioannidis.
4 * Copyright (C) 1998, 1999, 2000, 2001 Richard Guy Briggs.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * RCSID $Id: ipsec_encap.h,v 1.1 2004/03/15 20:35:25 as Exp $
17 */
18
19 #ifndef _IPSEC_ENCAP_H_
20
21 #define SENT_IP4 16 /* data is two struct in_addr + proto + ports*/
22 /* (2 * sizeof(struct in_addr)) */
23 /* sizeof(struct sockaddr_encap)
24 - offsetof(struct sockaddr_encap, Sen.Sip4.Src) */
25
26 struct sockaddr_encap
27 {
28 __u8 sen_len; /* length */
29 __u8 sen_family; /* AF_ENCAP */
30 __u16 sen_type; /* see SENT_* */
31 union
32 {
33 struct /* SENT_IP4 */
34 {
35 struct in_addr Src;
36 struct in_addr Dst;
37 __u8 Proto;
38 __u16 Sport;
39 __u16 Dport;
40 } Sip4;
41 } Sen;
42 };
43
44 #define sen_ip_src Sen.Sip4.Src
45 #define sen_ip_dst Sen.Sip4.Dst
46 #define sen_proto Sen.Sip4.Proto
47 #define sen_sport Sen.Sip4.Sport
48 #define sen_dport Sen.Sip4.Dport
49
50 #ifndef AF_ENCAP
51 #define AF_ENCAP 26
52 #endif /* AF_ENCAP */
53
54 #define _IPSEC_ENCAP_H_
55 #endif /* _IPSEC_ENCAP_H_ */