include/netpacket/netlink.h: Backout some preliminary NETLINK_CRYPTO definitions. These are premature (but may come back).

This commit is contained in:
Gregory Nutt 2019-11-17 10:47:24 -06:00
parent 8f05cc560b
commit ab78f0ca0a
2 changed files with 2 additions and 215 deletions

View File

@ -283,7 +283,8 @@
#define RTM_GETNEIGHTBL 33
#define RTM_SETNEIGHTBL 34
#define RTM_LASTMSG 34 /* NETLINK_ROUTE messages followd by NETLINK_CRYPTO */
#define RTM_FIRSTMSG 0
#define RTM_LASTMSG 34
/* Definitions for struct ifaddrmsg ****************************************/
@ -350,52 +351,6 @@
#define RT_SCOPE_HOST 254 /* Route on local host */
#define RT_SCOPE_NOWHERE 255 /* Destination does not exist */
/* NETLINK_CRYPTO protocol message types ************************************/
#define CRYPTO_MSG_NEWALG (RTM_LASTMSG + 1)
#define CRYPTO_MSG_DELALG (RTM_LASTMSG + 2)
#define CRYPTO_MSG_UPDATEALG (RTM_LASTMSG + 3)
#define CRYPTO_MSG_GETALG (RTM_LASTMSG + 4)
#define CRYPTO_MSG_DELRNG (RTM_LASTMSG + 5)
#define CRYPTO_MSG_GETSTAT (RTM_LASTMSG + 6)
#define CRYPTO_MSG_LAST (RTM_LASTMSG + 6)
/* Netlink message attributes. */
#define CRYPTOCFGA_UNSPEC 0
#define CRYPTOCFGA_PRIORITY_VAL 1 /* Argument: uint32_t */
#define CRYPTOCFGA_REPORT_LARVAL 2 /* Argument: struct crypto_report_larval */
#define CRYPTOCFGA_REPORT_HASH 3 /* Argument: struct crypto_report_hash */
#define CRYPTOCFGA_REPORT_BLKCIPHER 4 /* Argument: struct crypto_report_blkcipher */
#define CRYPTOCFGA_REPORT_AEAD 5 /* Argument: struct crypto_report_aead */
#define CRYPTOCFGA_REPORT_COMPRESS 6 /* Argument: struct crypto_report_comp */
#define CRYPTOCFGA_REPORT_RNG 7 /* Argument: struct crypto_report_rng */
#define CRYPTOCFGA_REPORT_CIPHER 8 /* Argument: struct crypto_report_cipher */
#define CRYPTOCFGA_REPORT_AKCIPHER 9 /* Argument: struct crypto_report_akcipher */
#define CRYPTOCFGA_REPORT_KPP 0 /* Argument: struct crypto_report_kpp */
#define CRYPTOCFGA_REPORT_ACOMP 1 /* Argument: struct crypto_report_acomp */
#define CRYPTOCFGA_STAT_LARVAL 2 /* Argument: struct crypto_stat_larval */
#define CRYPTOCFGA_STAT_HASH 3 /* Argument: struct crypto_stat_hash */
#define CRYPTOCFGA_STAT_BLKCIPHER 4 /* Argument: struct crypto_stat_blkcipher */
#define CRYPTOCFGA_STAT_AEAD 5 /* Argument: struct crypto_stat_aead */
#define CRYPTOCFGA_STAT_COMPRESS 6 /* Argument: struct crypto_stat_comp */
#define CRYPTOCFGA_STAT_RNG 7 /* Argument: struct crypto_stat_rng */
#define CRYPTOCFGA_STAT_CIPHER 8 /* Argument: struct crypto_stat_cipher */
#define CRYPTOCFGA_STAT_AKCIPHER 9 /* Argument: struct crypto_stat_akcipher */
#define CRYPTOCFGA_STAT_KPP 10 /* Argument: struct crypto_stat_kpp */
#define CRYPTOCFGA_STAT_ACOMP 11 /* Argument: struct crypto_stat_acomp */
/* Max size of names. No magic here. These can be extended as necessary. */
#define CRYPTO_MAX_ALG_NAME 32
#define CRYPTO_MAX_NAME 32
#define CRYPTO_REPORT_MAXSIZE \
(sizeof(struct crypto_user_alg) + sizeof(struct crypto_report_blkcipher))
/****************************************************************************
* Public Type Definitions
****************************************************************************/
@ -510,163 +465,6 @@ struct rtmsg
uint32_t rtm_flags;
};
/* NETLINK_CRYPTO Message Structures ***********\*****************************/
struct crypto_user_alg
{
char cru_name[CRYPTO_MAX_ALG_NAME];
char cru_driver_name[CRYPTO_MAX_ALG_NAME];
char cru_module_name[CRYPTO_MAX_ALG_NAME];
uint32_t cru_type;
uint32_t cru_mask;
uint32_t cru_refcnt;
uint32_t cru_flags;
};
struct crypto_report_larval
{
char type[CRYPTO_MAX_NAME];
};
struct crypto_report_hash
{
char type[CRYPTO_MAX_NAME];
size_t blocksize;
size_t digestsize;
};
struct crypto_report_cipher
{
char type[CRYPTO_MAX_ALG_NAME];
size_t blocksize;
size_t min_keysize;
size_t max_keysize;
};
struct crypto_report_blkcipher
{
char type[CRYPTO_MAX_NAME];
char geniv[CRYPTO_MAX_NAME];
size_t blocksize;
size_t min_keysize;
size_t max_keysize;
size_t ivsize;
};
struct crypto_report_aead
{
char type[CRYPTO_MAX_NAME];
char geniv[CRYPTO_MAX_NAME];
size_t blocksize;
size_t maxauthsize;
size_t ivsize;
};
struct crypto_report_comp
{
char type[CRYPTO_MAX_NAME];
};
struct crypto_report_rng
{
char type[CRYPTO_MAX_NAME];
size_t seedsize;
};
struct crypto_report_akcipher
{
char type[CRYPTO_MAX_NAME];
};
struct crypto_report_kpp
{
char type[CRYPTO_MAX_NAME];
};
struct crypto_report_acomp
{
char type[CRYPTO_MAX_NAME];
};
struct crypto_stat_larval
{
char type[CRYPTO_MAX_NAME];
};
#ifdef CONFIG_HAVE_LONG_LONG
typedef uint64_t crypto_stat_t;
#else
typedef uint32_t crypto_stat_t;
#endif
struct crypto_stat_aead
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_encrypt_cnt;
crypto_stat_t stat_encrypt_tlen;
crypto_stat_t stat_decrypt_cnt;
crypto_stat_t stat_decrypt_tlen;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_akcipher
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_encrypt_cnt;
crypto_stat_t stat_encrypt_tlen;
crypto_stat_t stat_decrypt_cnt;
crypto_stat_t stat_decrypt_tlen;
crypto_stat_t stat_verify_cnt;
crypto_stat_t stat_sign_cnt;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_cipher
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_encrypt_cnt;
crypto_stat_t stat_encrypt_tlen;
crypto_stat_t stat_decrypt_cnt;
crypto_stat_t stat_decrypt_tlen;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_compress
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_compress_cnt;
crypto_stat_t stat_compress_tlen;
crypto_stat_t stat_decompress_cnt;
crypto_stat_t stat_decompress_tlen;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_hash
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_hash_cnt;
crypto_stat_t stat_hash_tlen;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_kpp
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_setsecret_cnt;
crypto_stat_t stat_generate_public_key_cnt;
crypto_stat_t stat_compute_shared_secret_cnt;
crypto_stat_t stat_err_cnt;
};
struct crypto_stat_rng
{
char type[CRYPTO_MAX_NAME];
crypto_stat_t stat_generate_cnt;
crypto_stat_t stat_generate_tlen;
crypto_stat_t stat_seed_cnt;
crypto_stat_t stat_err_cnt;
};
/****************************************************************************
* Public Function Prototypes
****************************************************************************/

View File

@ -55,17 +55,6 @@ config NETLINK_DISABLE_GETROUTE
RTM_GETROUTE is used to retrieve routing tables.
endif # NETLINK_ROUTE
config NETLINK_CRYPTO
bool "Netlink Crypto protocol"
default n
depends on EXPERIMENTAL
---help---
Support the NETLINK_CRYPTO protocol option.
if NETLINK_CRYPTO
endif # NETLINK_CRYPTO
endmenu # Netlink Protocols
endif # NET_NETLINK
endmenu # Netlink Socket Support