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.2 2001/11/26 09:16:15 rgb 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 ipsec_sa *ipsec_sadb_hash[SADB_HASHMOD];
35 extern spinlock_t tdb_lock;
36 extern int ipsec_sadb_init(void);
38 extern struct ipsec_sa *ipsec_sa_getbyid(struct sa_id*);
39 extern /* void */ int ipsec_sa_del(struct ipsec_sa *);
40 extern /* void */ int ipsec_sa_delchain(struct ipsec_sa *);
41 extern /* void */ int ipsec_sa_put(struct ipsec_sa *);
43 extern int ipsec_sa_init(struct ipsec_sa *, struct encap_msghdr *);
44 extern int ipsec_sadb_cleanup(__u8);
45 extern int ipsec_sa_wipe(struct ipsec_sa *);
47 /* debug declarations */
50 extern int ipsec_proc_init(void);
51 extern void ipsec_proc_cleanup(void);
54 extern int ipsec_makeroute(struct sockaddr_encap *ea,
55 struct sockaddr_encap *em,
59 struct ident *ident_s,
60 struct ident *ident_d);
62 extern int ipsec_breakroute(struct sockaddr_encap *ea,
63 struct sockaddr_encap *em,
64 struct sk_buff **first,
65 struct sk_buff **last);
67 int ipsec_radijinit(void);
68 int ipsec_cleareroutes(void);
69 int ipsec_radijcleanup(void);
72 extern enum ipsec_life_alive ipsec_lifetime_check(struct ipsec_lifetime64 *il64,
75 enum ipsec_life_type ilt,
76 enum ipsec_direction idir,
77 struct ipsec_sa *ips);
80 extern int ipsec_lifetime_format(char *buffer,
83 enum ipsec_life_type timebaselife,
84 struct ipsec_lifetime64 *lifetime);
86 extern void ipsec_lifetime_update_hard(struct ipsec_lifetime64 *lifetime,
89 extern void ipsec_lifetime_update_soft(struct ipsec_lifetime64 *lifetime,
95 #ifdef CONFIG_IPSEC_DEBUG
97 extern int debug_xform;
98 extern int debug_eroute;
101 #endif /* CONFIG_IPSEC_DEBUG */
106 #define _IPSEC_PROTO_H
107 #endif /* _IPSEC_PROTO_H_ */
110 * $Log: ipsec_proto.h,v $
111 * Revision 1.2 2001/11/26 09:16:15 rgb
112 * Merge MCR's ipsec_sa, eroute, proc and struct lifetime changes.
114 * Revision 1.1.2.1 2001/09/25 02:21:01 mcr
115 * ipsec_proto.h created to keep prototypes rather than deal with
116 * cyclic dependancies of structures and prototypes in .h files.
121 * c-file-style: "linux"