| 1 | /* |
| 2 | * Crypto user configuration API. |
| 3 | * |
| 4 | * Copyright (C) 2011 secunet Security Networks AG |
| 5 | * Copyright (C) 2011 Steffen Klassert <[email protected]> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify it |
| 8 | * under the terms and conditions of the GNU General Public License, |
| 9 | * version 2, as published by the Free Software Foundation. |
| 10 | * |
| 11 | * This program is distributed in the hope it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 14 | * more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | /* Netlink configuration messages. */ |
| 22 | enumcxx . . $ $anonymous_type_7f74a5e7b6d10bca_0# { |
| 23 | CRYPTO_MSG_BASEcxx . . $ CRYPTO_MSG_BASE. = 0x10, |
| 24 | CRYPTO_MSG_NEWALGcxx . . $ CRYPTO_MSG_NEWALG. = 0x10, |
| 25 | CRYPTO_MSG_DELALGcxx . . $ CRYPTO_MSG_DELALG., |
| 26 | CRYPTO_MSG_UPDATEALGcxx . . $ CRYPTO_MSG_UPDATEALG., |
| 27 | CRYPTO_MSG_GETALGcxx . . $ CRYPTO_MSG_GETALG., |
| 28 | CRYPTO_MSG_DELRNGcxx . . $ CRYPTO_MSG_DELRNG., |
| 29 | __CRYPTO_MSG_MAXcxx . . $ __CRYPTO_MSG_MAX. |
| 30 | }; |
| 31 | #define CRYPTO_MSG_MAXcxx . . $ `lib/cryptouser.h:31:9`! (__CRYPTO_MSG_MAX - 1) |
| 32 | #define CRYPTO_NR_MSGTYPEScxx . . $ `lib/cryptouser.h:32:9`! (CRYPTO_MSG_MAX + 1 - CRYPTO_MSG_BASE) |
| 33 | |
| 34 | #ifndef __KERNEL__ |
| 35 | #define CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`! 64 |
| 36 | #define CR_RTAcxx . . $ `lib/cryptouser.h:36:9`!(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGNcxx . . $ `<external>/10309334508915867907/netlink.h:99:9`!(sizeof(struct crypto_user_alg)))) |
| 37 | #endif |
| 38 | |
| 39 | #define CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`! CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`! |
| 40 | |
| 41 | /* Netlink message attributes. */ |
| 42 | enum crypto_attr_type_tcxx . . $ crypto_attr_type_t# { |
| 43 | CRYPTOCFGA_UNSPECcxx . . $ CRYPTOCFGA_UNSPEC., |
| 44 | CRYPTOCFGA_PRIORITY_VALcxx . . $ CRYPTOCFGA_PRIORITY_VAL., /* __u32 */ |
| 45 | CRYPTOCFGA_REPORT_LARVALcxx . . $ CRYPTOCFGA_REPORT_LARVAL., /* struct crypto_report_larval */ |
| 46 | CRYPTOCFGA_REPORT_HASHcxx . . $ CRYPTOCFGA_REPORT_HASH., /* struct crypto_report_hash */ |
| 47 | CRYPTOCFGA_REPORT_BLKCIPHERcxx . . $ CRYPTOCFGA_REPORT_BLKCIPHER., /* struct crypto_report_blkcipher */ |
| 48 | CRYPTOCFGA_REPORT_AEADcxx . . $ CRYPTOCFGA_REPORT_AEAD., /* struct crypto_report_aead */ |
| 49 | CRYPTOCFGA_REPORT_COMPRESScxx . . $ CRYPTOCFGA_REPORT_COMPRESS., /* struct crypto_report_comp */ |
| 50 | CRYPTOCFGA_REPORT_RNGcxx . . $ CRYPTOCFGA_REPORT_RNG., /* struct crypto_report_rng */ |
| 51 | CRYPTOCFGA_REPORT_CIPHERcxx . . $ CRYPTOCFGA_REPORT_CIPHER., /* struct crypto_report_cipher */ |
| 52 | CRYPTOCFGA_REPORT_AKCIPHERcxx . . $ CRYPTOCFGA_REPORT_AKCIPHER., /* struct crypto_report_akcipher */ |
| 53 | CRYPTOCFGA_REPORT_KPPcxx . . $ CRYPTOCFGA_REPORT_KPP., /* struct crypto_report_kpp */ |
| 54 | CRYPTOCFGA_REPORT_ACOMPcxx . . $ CRYPTOCFGA_REPORT_ACOMP., /* struct crypto_report_acomp */ |
| 55 | __CRYPTOCFGA_MAXcxx . . $ __CRYPTOCFGA_MAX. |
| 56 | |
| 57 | #define CRYPTOCFGA_MAXcxx . . $ `lib/cryptouser.h:57:9`! (__CRYPTOCFGA_MAX - 1) |
| 58 | }; |
| 59 | |
| 60 | struct crypto_user_algcxx . . $ crypto_user_alg# { |
| 61 | char cru_namecxx . . $ crypto_user_alg#cru_name.[CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`!]; |
| 62 | char cru_driver_namecxx . . $ crypto_user_alg#cru_driver_name.[CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`!]; |
| 63 | char cru_module_namecxx . . $ crypto_user_alg#cru_module_name.[CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`!]; |
| 64 | __u32cxx . . $ __u32# cru_typecxx . . $ crypto_user_alg#cru_type.; |
| 65 | __u32cxx . . $ __u32# cru_maskcxx . . $ crypto_user_alg#cru_mask.; |
| 66 | __u32cxx . . $ __u32# cru_refcntcxx . . $ crypto_user_alg#cru_refcnt.; |
| 67 | __u32cxx . . $ __u32# cru_flagscxx . . $ crypto_user_alg#cru_flags.; |
| 68 | }; |
| 69 | |
| 70 | struct crypto_report_larvalcxx . . $ crypto_report_larval# { |
| 71 | char typecxx . . $ crypto_report_larval#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 72 | }; |
| 73 | |
| 74 | struct crypto_report_hashcxx . . $ crypto_report_hash# { |
| 75 | char typecxx . . $ crypto_report_hash#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 76 | unsigned int blocksizecxx . . $ crypto_report_hash#blocksize.; |
| 77 | unsigned int digestsizecxx . . $ crypto_report_hash#digestsize.; |
| 78 | }; |
| 79 | |
| 80 | struct crypto_report_ciphercxx . . $ crypto_report_cipher# { |
| 81 | char typecxx . . $ crypto_report_cipher#type.[CRYPTO_MAX_ALG_NAMEcxx . . $ `lib/cryptouser.h:35:9`!]; |
| 82 | unsigned int blocksizecxx . . $ crypto_report_cipher#blocksize.; |
| 83 | unsigned int min_keysizecxx . . $ crypto_report_cipher#min_keysize.; |
| 84 | unsigned int max_keysizecxx . . $ crypto_report_cipher#max_keysize.; |
| 85 | }; |
| 86 | |
| 87 | struct crypto_report_blkciphercxx . . $ crypto_report_blkcipher# { |
| 88 | char typecxx . . $ crypto_report_blkcipher#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 89 | char genivcxx . . $ crypto_report_blkcipher#geniv.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 90 | unsigned int blocksizecxx . . $ crypto_report_blkcipher#blocksize.; |
| 91 | unsigned int min_keysizecxx . . $ crypto_report_blkcipher#min_keysize.; |
| 92 | unsigned int max_keysizecxx . . $ crypto_report_blkcipher#max_keysize.; |
| 93 | unsigned int ivsizecxx . . $ crypto_report_blkcipher#ivsize.; |
| 94 | }; |
| 95 | |
| 96 | struct crypto_report_aeadcxx . . $ crypto_report_aead# { |
| 97 | char typecxx . . $ crypto_report_aead#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 98 | char genivcxx . . $ crypto_report_aead#geniv.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 99 | unsigned int blocksizecxx . . $ crypto_report_aead#blocksize.; |
| 100 | unsigned int maxauthsizecxx . . $ crypto_report_aead#maxauthsize.; |
| 101 | unsigned int ivsizecxx . . $ crypto_report_aead#ivsize.; |
| 102 | }; |
| 103 | |
| 104 | struct crypto_report_compcxx . . $ crypto_report_comp# { |
| 105 | char typecxx . . $ crypto_report_comp#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 106 | }; |
| 107 | |
| 108 | struct crypto_report_rngcxx . . $ crypto_report_rng# { |
| 109 | char typecxx . . $ crypto_report_rng#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 110 | unsigned int seedsizecxx . . $ crypto_report_rng#seedsize.; |
| 111 | }; |
| 112 | |
| 113 | struct crypto_report_akciphercxx . . $ crypto_report_akcipher# { |
| 114 | char typecxx . . $ crypto_report_akcipher#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 115 | }; |
| 116 | |
| 117 | struct crypto_report_kppcxx . . $ crypto_report_kpp# { |
| 118 | char typecxx . . $ crypto_report_kpp#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 119 | }; |
| 120 | |
| 121 | struct crypto_report_acompcxx . . $ crypto_report_acomp# { |
| 122 | char typecxx . . $ crypto_report_acomp#type.[CRYPTO_MAX_NAMEcxx . . $ `lib/cryptouser.h:39:9`!]; |
| 123 | }; |
| 124 | |
| 125 | #define CRYPTO_REPORT_MAXSIZEcxx . . $ `lib/cryptouser.h:125:9`! (sizeof(struct crypto_user_alg) + \ |
| 126 | sizeof(struct crypto_report_blkcipher)) |