transform: Add a getter for the enum_names for a specific transform type
[strongswan.git] / src / libstrongswan / crypto / transform.h
1 /*
2 * Copyright (C) 2006-2009 Martin Willi
3 * Hochschule fuer Technik Rapperswil
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 /**
17 * @defgroup transforms transforms
18 * @{ @ingroup crypto
19 */
20
21 #ifndef TRANSFORM_H_
22 #define TRANSFORM_H_
23
24 typedef enum transform_type_t transform_type_t;
25
26 #include <utils/utils.h>
27
28 /**
29 * Type of a transform, as in IKEv2 RFC 3.3.2.
30 */
31 enum transform_type_t {
32 UNDEFINED_TRANSFORM_TYPE = 241,
33 HASH_ALGORITHM = 242,
34 RANDOM_NUMBER_GENERATOR = 243,
35 AEAD_ALGORITHM = 244,
36 COMPRESSION_ALGORITHM = 245,
37 ENCRYPTION_ALGORITHM = 1,
38 PSEUDO_RANDOM_FUNCTION = 2,
39 INTEGRITY_ALGORITHM = 3,
40 DIFFIE_HELLMAN_GROUP = 4,
41 EXTENDED_SEQUENCE_NUMBERS = 5
42 };
43
44 /**
45 * enum names for transform_type_t.
46 */
47 extern enum_name_t *transform_type_names;
48
49 /**
50 * Get the enum names for a specific transform type.
51 *
52 * @param type type of transform to get enum names for
53 * @return enum names
54 */
55 enum_name_t *transform_get_enum_names(transform_type_t type);
56
57 /**
58 * Extended sequence numbers, as in IKEv2 RFC 3.3.2.
59 */
60 enum extended_sequence_numbers_t {
61 NO_EXT_SEQ_NUMBERS = 0,
62 EXT_SEQ_NUMBERS = 1
63 };
64
65 /**
66 * enum strings for extended_sequence_numbers_t.
67 */
68 extern enum_name_t *extended_sequence_numbers_names;
69
70 #endif /** TRANSFORM_H_ @}*/