2
* @(#) Definitions relevant to the IPSEC <> radij tree interfacing
3
* Copyright (C) 1996, 1997 John Ioannidis.
4
* Copyright (C) 1998, 1999, 2000, 2001 Richard Guy Briggs.
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation; either version 2 of the License, or (at your
9
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16
* RCSID $Id: ipsec_radij.h 3265 2007-10-08 19:52:55Z andreas $
19
#ifndef _IPSEC_RADIJ_H
23
int ipsec_walk(char *);
25
int ipsec_rj_walker_procprint(struct radij_node *, void *);
26
int ipsec_rj_walker_delete(struct radij_node *, void *);
28
/* This structure is used to pass information between
29
* ipsec_eroute_get_info and ipsec_rj_walker_procprint
30
* (through rj_walktree) and between calls of ipsec_rj_walker_procprint.
34
/* from caller of ipsec_eroute_get_info: */
35
char *const buffer; /* start of buffer provided */
36
const int length; /* length of buffer provided */
37
const off_t offset; /* file position of first character of interest */
38
/* accumulated by ipsec_rj_walker_procprint: */
39
int len; /* number of character filled into buffer */
40
off_t begin; /* file position contained in buffer[0] (<=offset) */
44
extern struct radij_node_head *rnh;
45
extern spinlock_t eroute_lock;
47
struct eroute * ipsec_findroute(struct sockaddr_encap *);
49
#define O1(x) (int)(((x)>>24)&0xff)
50
#define O2(x) (int)(((x)>>16)&0xff)
51
#define O3(x) (int)(((x)>>8)&0xff)
52
#define O4(x) (int)(((x))&0xff)
54
#ifdef CONFIG_IPSEC_DEBUG
55
extern int debug_radij;
56
void rj_dumptrees(void);
58
#define DB_RJ_DUMPTREES 0x0001
59
#define DB_RJ_FINDROUTE 0x0002
60
#endif /* CONFIG_IPSEC_DEBUG */
62
#define _IPSEC_RADIJ_H