| 1 |
/* declarations of routines that interface with the kernel's pfkey mechanism
|
| 2 |
* Copyright (C) 1998-2001 D. Hugh Redelmeier.
|
| 3 |
* Copyright (C) 2003 Herbert Xu
|
| 4 |
*
|
| 5 |
* This program is free software; you can redistribute it and/or modify it
|
| 6 |
* under the terms of the GNU General Public License as published by the
|
| 7 |
* Free Software Foundation; either version 2 of the License, or (at your
|
| 8 |
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
| 9 |
*
|
| 10 |
* This program is distributed in the hope that it will be useful, but
|
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
| 12 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
| 13 |
* for more details.
|
| 14 |
*/
|
| 15 |
|
| 16 |
#ifdef KLIPS
|
| 17 |
extern void init_pfkey(void);
|
| 18 |
extern void klips_register_proto(unsigned satype, const char *satypename);
|
| 19 |
extern void pfkey_close(void);
|
| 20 |
|
| 21 |
extern void klips_pfkey_register_response(const struct sadb_msg *msg);
|
| 22 |
extern void pfkey_dequeue(void);
|
| 23 |
extern void pfkey_event(void);
|
| 24 |
extern void klips_pfkey_register(void);
|
| 25 |
extern bool pfkey_add_sa(struct kernel_sa *sa, bool replace);
|
| 26 |
extern bool pfkey_grp_sa(const struct kernel_sa *sa0, const struct kernel_sa *sa1);
|
| 27 |
extern bool pfkey_del_sa(const struct kernel_sa *sa);
|
| 28 |
extern bool pfkey_sag_eroute(struct state *st, struct spd_route *sr
|
| 29 |
, unsigned op, const char *opname);
|
| 30 |
extern bool pfkey_was_eroute_idle(struct state *st, time_t idle_max);
|
| 31 |
extern void pfkey_set_debug(int cur_debug
|
| 32 |
, openswan_keying_debug_func_t debug_func
|
| 33 |
, openswan_keying_debug_func_t error_func);
|
| 34 |
extern void pfkey_remove_orphaned_holds(int transport_proto
|
| 35 |
, const ip_subnet *ours
|
| 36 |
, const ip_subnet *his);
|
| 37 |
|
| 38 |
extern bool pfkey_raw_eroute(const ip_address *this_host
|
| 39 |
, const ip_subnet *this_client
|
| 40 |
, const ip_address *that_host
|
| 41 |
, const ip_subnet *that_client
|
| 42 |
, ipsec_spi_t spi
|
| 43 |
, unsigned int proto UNUSED
|
| 44 |
, unsigned int transport_proto
|
| 45 |
, enum eroute_type esatype
|
| 46 |
, const struct pfkey_proto_info *proto_info UNUSED
|
| 47 |
, time_t use_lifetime UNUSED
|
| 48 |
, enum pluto_sadb_operations op
|
| 49 |
, const char *text_said);
|
| 50 |
|
| 51 |
extern bool pfkey_shunt_eroute(struct connection *c
|
| 52 |
, struct spd_route *sr
|
| 53 |
, enum routing_t rt_kind
|
| 54 |
, enum pluto_sadb_operations op, const char *opname);
|
| 55 |
|
| 56 |
extern int pfkeyfd;
|
| 57 |
|
| 58 |
#endif
|
| 59 |
|
| 60 |
#ifdef NETKEY_SUPPORT
|
| 61 |
extern void netlink_register_proto(unsigned satype, const char *satypename);
|
| 62 |
#endif
|