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.9 2004/07/10 19:08:41 mcr 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(ip_said *);
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_KLIPS_DEBUG
100
extern int debug_xform;
101
extern int debug_eroute;
102
extern int debug_spi;
103
extern int debug_netlink;
105
#endif /* CONFIG_KLIPS_DEBUG */
110
#define _IPSEC_PROTO_H
111
#endif /* _IPSEC_PROTO_H_ */
114
* $Log: ipsec_proto.h,v $
115
* Revision 1.9 2004/07/10 19:08:41 mcr
116
* CONFIG_IPSEC -> CONFIG_KLIPS.
118
* Revision 1.8 2004/04/05 19:55:06 mcr
119
* Moved from linux/include/freeswan/ipsec_proto.h,v
121
* Revision 1.7 2003/10/31 02:27:05 mcr
122
* pulled up port-selector patches and sa_id elimination.
124
* Revision 1.6.30.1 2003/10/29 01:10:19 mcr
125
* elimited "struct sa_id"
127
* Revision 1.6 2002/05/23 07:13:48 rgb
128
* Added ipsec_sa_put() for releasing an ipsec_sa refcount.
130
* Revision 1.5 2002/05/14 02:36:40 rgb
131
* Converted reference from ipsec_sa_put to ipsec_sa_add to avoid confusion
132
* with "put" usage in the kernel.
134
* Revision 1.4 2002/04/24 07:36:47 mcr
135
* Moved from ./klips/net/ipsec/ipsec_proto.h,v
137
* Revision 1.3 2002/04/20 00:12:25 rgb
138
* Added esp IV CBC attack fix, disabled.
140
* Revision 1.2 2001/11/26 09:16:15 rgb
141
* Merge MCR's ipsec_sa, eroute, proc and struct lifetime changes.
143
* Revision 1.1.2.1 2001/09/25 02:21:01 mcr
144
* ipsec_proto.h created to keep prototypes rather than deal with
145
* cyclic dependancies of structures and prototypes in .h files.
150
* c-file-style: "linux"