2 * Kernel runtime algorithm handling interface definitions
3 * Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
5 * $Id: kernel_alg.h,v 1.1 2002-07-15 05:55:21 danield Exp $
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
22 extern void kernel_alg_show_status(void);
23 void kernel_alg_show_connection(struct connection *c, const char *instance);
25 /* Registration messages from pluto */
26 extern void kernel_alg_register_pfkey(void *buf, int buflen);
33 extern struct sadb_alg *kernel_alg_esp_sadb_alg(int alg_id);
34 extern int kernel_alg_esp_ivlen(int alg_id);
35 /* returns bool success if esp encrypt alg is present */
36 extern bool kernel_alg_esp_enc_ok(int alg_id, unsigned int key_len, struct alg_info_esp *nfo);
37 /* returns encrypt keylen in BYTES for esp enc alg passed */
38 extern int kernel_alg_esp_enc_keylen(int alg_id);
39 /* returns bool success if esp auth alg is present */
40 extern bool kernel_alg_esp_auth_ok(int auth, struct alg_info_esp *nfo);
41 /* returns auth keylen in BYTES for esp auth alg passed */
42 extern int kernel_alg_esp_auth_keylen(int auth);
43 /* returns 0 if read ok from /proc/net/pf_key_supported */
44 extern int kernel_alg_proc_read(void);
46 /* get sadb_alg for passed args */
47 extern const struct sadb_alg * kernel_alg_sadb_alg_get(int satype, int exttype, int alg_id);
50 extern struct db_context * kernel_alg_db_new(struct alg_info_esp *ai, lset_t policy);
51 /* returns pointer to static buffer, no reentrant */
52 struct esp_info * kernel_alg_esp_info(int esp_id, int auth_id);
53 #endif /* _KERNEL_ALG_H */