http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / include / linux / netfilter_ipv4 / ip_conntrack_ipsec.h
1 /*****************************************************************************
2 //
3 //  Copyright (c) 2000-2002  Broadcom Corporation
4 //  All Rights Reserved
5 //  No portions of this material may be reproduced in any form without the
6 //  written permission of:
7 //          Broadcom Corporation
8 //          16215 Alton Parkway
9 //          Irvine, California 92619
10 //  All information contained in this document is Broadcom Corporation
11 //  company private, proprietary, and trade secret.
12 //
13 ******************************************************************************
14 //
15 //  Filename:       ip_conntrack_ipsec.h
16 //  Author:         Pavan Kumar
17 //  Creation Date:  05/27/04
18 //
19 //  Description:
20 //      Implements the IPSec ALG connectiontracking data structures.
21 //
22 *****************************************************************************/
23 #ifndef _IP_CONNTRACK_IPSEC_H
24 #define _IP_CONNTRACK_IPSEC_H
25 /* FTP tracking. */
26
27 #ifndef __KERNEL__
28 #error Only in kernel.
29 #endif
30
31 #include <linux/netfilter_ipv4/lockhelp.h>
32
33 #define IPSEC_UDP_PORT 500
34
35 /* Protects ftp part of conntracks */
36 DECLARE_LOCK_EXTERN(ip_ipsec_lock);
37
38 struct isakmphdr {
39         u_int32_t initcookie[2];
40         u_int32_t respcookie[2];
41 };
42
43 /* This structure is per expected connection */
44 struct ip_ct_ipsec_expect
45 {
46         /* We record initiator cookie and source IP address: all in
47          * host order. */
48
49         /* source cookie */
50         u_int32_t initcookie[2];        /* initiator cookie */
51         u_int32_t respcookie[2];        /* initiator cookie */
52         u_int32_t saddr;                /* source IP address in the orig dir */
53 };
54
55 /* This structure exists only once per master */
56 struct ip_ct_ipsec_master {
57         u_int32_t initcookie[2];
58         u_int32_t saddr;
59 };
60
61 #endif /* _IP_CONNTRACK_IPSEC_H */