2
* Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
9
* This program is distributed in the hope that it will be useful, but
10
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free software Foundation, Inc.,
16
* 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
19
#ifndef __VNET_SA_ALGORITHM_H__
20
#define __VNET_SA_ALGORITHM_H__
22
#include <linux/types.h>
23
#include <linux/pfkeyv2.h>
25
typedef struct SADigestInfo {
30
typedef struct SACipherInfo {
35
typedef struct SACompressInfo {
39
typedef struct SAAlgorithm {
45
SACompressInfo compress;
50
extern SAAlgorithm *sa_digest_by_id(int alg_id);
51
extern SAAlgorithm *sa_cipher_by_id(int alg_id);
52
extern SAAlgorithm *sa_compress_by_id(int alg_id);
53
extern SAAlgorithm *sa_digest_by_name(char *name);
54
extern SAAlgorithm *sa_cipher_by_name(char *name);
55
extern SAAlgorithm *sa_compress_by_name(char *name);
56
extern SAAlgorithm *sa_digest_by_index(unsigned int idx);
57
extern SAAlgorithm *sa_cipher_by_index(unsigned int idx);
58
extern SAAlgorithm *sa_compress_by_index(unsigned int idx);
59
extern void sa_algorithm_probe_all(void);
61
#define MAX_KEY_BITS 512
63
#endif /* ! __VNET_SA_ALGORITHM_H__ */