]> git.ipfire.org Git - people/ms/strongswan.git/blob - linux/include/freeswan/ipsec_proto.h
- import of strongswan-2.7.0
[people/ms/strongswan.git] / linux / include / freeswan / ipsec_proto.h
1 /*
2 * @(#) prototypes for FreeSWAN functions
3 *
4 * Copyright (C) 2001 Richard Guy Briggs <rgb@freeswan.org>
5 * and Michael Richardson <mcr@freeswan.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 *
17 * RCSID $Id: ipsec_proto.h,v 1.3 2004/06/13 19:55:14 as Exp $
18 *
19 */
20
21 #ifndef _IPSEC_PROTO_H_
22
23 #include "ipsec_param.h"
24
25 /*
26 * This file is a kernel only file that declares prototypes for
27 * all intra-module function calls and global data structures.
28 *
29 * Include this file last.
30 *
31 */
32
33 /* ipsec_init.c */
34 extern struct prng ipsec_prng;
35
36 /* ipsec_sa.c */
37 extern struct ipsec_sa *ipsec_sadb_hash[SADB_HASHMOD];
38 extern spinlock_t tdb_lock;
39 extern int ipsec_sadb_init(void);
40
41 extern struct ipsec_sa *ipsec_sa_getbyid(struct sa_id*);
42 extern int ipsec_sa_put(struct ipsec_sa *);
43 extern /* void */ int ipsec_sa_del(struct ipsec_sa *);
44 extern /* void */ int ipsec_sa_delchain(struct ipsec_sa *);
45 extern /* void */ int ipsec_sa_add(struct ipsec_sa *);
46
47 extern int ipsec_sadb_cleanup(__u8);
48 extern int ipsec_sa_wipe(struct ipsec_sa *);
49
50 /* debug declarations */
51
52 /* ipsec_proc.c */
53 extern int ipsec_proc_init(void);
54 extern void ipsec_proc_cleanup(void);
55
56 /* ipsec_radij.c */
57 extern int ipsec_makeroute(struct sockaddr_encap *ea,
58 struct sockaddr_encap *em,
59 struct sa_id said,
60 uint32_t pid,
61 struct sk_buff *skb,
62 struct ident *ident_s,
63 struct ident *ident_d);
64
65 extern int ipsec_breakroute(struct sockaddr_encap *ea,
66 struct sockaddr_encap *em,
67 struct sk_buff **first,
68 struct sk_buff **last);
69
70 int ipsec_radijinit(void);
71 int ipsec_cleareroutes(void);
72 int ipsec_radijcleanup(void);
73
74 /* ipsec_life.c */
75 extern enum ipsec_life_alive ipsec_lifetime_check(struct ipsec_lifetime64 *il64,
76 const char *lifename,
77 const char *saname,
78 enum ipsec_life_type ilt,
79 enum ipsec_direction idir,
80 struct ipsec_sa *ips);
81
82
83 extern int ipsec_lifetime_format(char *buffer,
84 int buflen,
85 char *lifename,
86 enum ipsec_life_type timebaselife,
87 struct ipsec_lifetime64 *lifetime);
88
89 extern void ipsec_lifetime_update_hard(struct ipsec_lifetime64 *lifetime,
90 __u64 newvalue);
91
92 extern void ipsec_lifetime_update_soft(struct ipsec_lifetime64 *lifetime,
93 __u64 newvalue);
94
95
96
97
98 #ifdef CONFIG_IPSEC_DEBUG
99
100 extern int debug_xform;
101 extern int debug_eroute;
102 extern int debug_spi;
103 extern int debug_netlink;
104
105 #endif /* CONFIG_IPSEC_DEBUG */
106
107
108
109
110 #define _IPSEC_PROTO_H
111 #endif /* _IPSEC_PROTO_H_ */