2 * @(#) prototypes for FreeSWAN functions
4 * Copyright (C) 2001 Richard Guy Briggs <rgb@freeswan.org>
5 * and Michael Richardson <mcr@freeswan.org>
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>.
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
17 * RCSID $Id: ipsec_proto.h,v 1.3 2004/06/13 19:55:14 as Exp $
21 #ifndef _IPSEC_PROTO_H_
23 #include "ipsec_param.h"
26 * This file is a kernel only file that declares prototypes for
27 * all intra-module function calls and global data structures.
29 * Include this file last.
34 extern struct prng ipsec_prng
;
37 extern struct ipsec_sa
*ipsec_sadb_hash
[SADB_HASHMOD
];
38 extern spinlock_t tdb_lock
;
39 extern int ipsec_sadb_init(void);
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
*);
47 extern int ipsec_sadb_cleanup(__u8
);
48 extern int ipsec_sa_wipe(struct ipsec_sa
*);
50 /* debug declarations */
53 extern int ipsec_proc_init(void);
54 extern void ipsec_proc_cleanup(void);
57 extern int ipsec_makeroute(struct sockaddr_encap
*ea
,
58 struct sockaddr_encap
*em
,
62 struct ident
*ident_s
,
63 struct ident
*ident_d
);
65 extern int ipsec_breakroute(struct sockaddr_encap
*ea
,
66 struct sockaddr_encap
*em
,
67 struct sk_buff
**first
,
68 struct sk_buff
**last
);
70 int ipsec_radijinit(void);
71 int ipsec_cleareroutes(void);
72 int ipsec_radijcleanup(void);
75 extern enum ipsec_life_alive
ipsec_lifetime_check(struct ipsec_lifetime64
*il64
,
78 enum ipsec_life_type ilt
,
79 enum ipsec_direction idir
,
80 struct ipsec_sa
*ips
);
83 extern int ipsec_lifetime_format(char *buffer
,
86 enum ipsec_life_type timebaselife
,
87 struct ipsec_lifetime64
*lifetime
);
89 extern void ipsec_lifetime_update_hard(struct ipsec_lifetime64
*lifetime
,
92 extern void ipsec_lifetime_update_soft(struct ipsec_lifetime64
*lifetime
,
98 #ifdef CONFIG_IPSEC_DEBUG
100 extern int debug_xform
;
101 extern int debug_eroute
;
102 extern int debug_spi
;
103 extern int debug_netlink
;
105 #endif /* CONFIG_IPSEC_DEBUG */
110 #define _IPSEC_PROTO_H
111 #endif /* _IPSEC_PROTO_H_ */