diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:41 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:41 +0200 |
commit | a9ee361f27e0439530387765924574e5358c8a5c (patch) | |
tree | 3104aecc4d574f7d7bbb269223814586277b1797 /include/ipmitool/ipmi_intf.h | |
parent | 82ac6c87ce0b0af2fb8de25d70442fec406bb742 (diff) |
New upstream version 1.8.19upstream/1.8.19upstream
Diffstat (limited to 'include/ipmitool/ipmi_intf.h')
-rw-r--r-- | include/ipmitool/ipmi_intf.h | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/include/ipmitool/ipmi_intf.h b/include/ipmitool/ipmi_intf.h index 982f645..49a9ecd 100644 --- a/include/ipmitool/ipmi_intf.h +++ b/include/ipmitool/ipmi_intf.h @@ -30,8 +30,7 @@ * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ -#ifndef IPMI_INTF_H -#define IPMI_INTF_H +#pragma once #include <ipmitool/ipmi.h> #include <ipmitool/ipmi_oem.h> @@ -62,13 +61,45 @@ enum LANPLUS_SESSION_STATE { #define IPMI_SIK_BUFFER_SIZE IPMI_MAX_MD_SIZE #define IPMI_KG_BUFFER_SIZE 21 /* key plus null byte */ +enum cipher_suite_ids { + IPMI_LANPLUS_CIPHER_SUITE_0 = 0, + IPMI_LANPLUS_CIPHER_SUITE_1 = 1, + IPMI_LANPLUS_CIPHER_SUITE_2 = 2, + IPMI_LANPLUS_CIPHER_SUITE_3 = 3, + IPMI_LANPLUS_CIPHER_SUITE_4 = 4, + IPMI_LANPLUS_CIPHER_SUITE_5 = 5, + IPMI_LANPLUS_CIPHER_SUITE_6 = 6, + IPMI_LANPLUS_CIPHER_SUITE_7 = 7, + IPMI_LANPLUS_CIPHER_SUITE_8 = 8, + IPMI_LANPLUS_CIPHER_SUITE_9 = 9, + IPMI_LANPLUS_CIPHER_SUITE_10 = 10, + IPMI_LANPLUS_CIPHER_SUITE_11 = 11, + IPMI_LANPLUS_CIPHER_SUITE_12 = 12, + IPMI_LANPLUS_CIPHER_SUITE_13 = 13, + IPMI_LANPLUS_CIPHER_SUITE_14 = 14, +#ifdef HAVE_CRYPTO_SHA256 + IPMI_LANPLUS_CIPHER_SUITE_15 = 15, + IPMI_LANPLUS_CIPHER_SUITE_16 = 16, + IPMI_LANPLUS_CIPHER_SUITE_17 = 17, +#endif /* HAVE_CRYPTO_SHA256 */ + IPMI_LANPLUS_CIPHER_SUITE_RESERVED = 0xff, +}; + +struct cipher_suite_info { + enum cipher_suite_ids cipher_suite_id; + uint8_t auth_alg; + uint8_t integrity_alg; + uint8_t crypt_alg; + uint32_t iana; +}; + struct ipmi_session_params { char * hostname; uint8_t username[17]; uint8_t authcode_set[IPMI_AUTHCODE_BUFFER_SIZE + 1]; uint8_t authtype_set; uint8_t privlvl; - uint8_t cipher_suite_id; + enum cipher_suite_ids cipher_suite_id; char sol_escape_char; int password; int port; @@ -119,7 +150,7 @@ struct ipmi_session { uint32_t bmc_id; /* - * Values required for RAKP mesages + * Values required for RAKP messages */ /* Random number generated byt the console */ @@ -201,7 +232,6 @@ struct ipmi_intf { int (*open)(struct ipmi_intf * intf); void (*close)(struct ipmi_intf * intf); struct ipmi_rs *(*sendrecv)(struct ipmi_intf * intf, struct ipmi_rq * req); - int (*sendrsp)(struct ipmi_intf * intf, struct ipmi_rs * rsp); struct ipmi_rs *(*recv_sol)(struct ipmi_intf * intf); struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload); int (*keepalive)(struct ipmi_intf * intf); @@ -210,6 +240,10 @@ struct ipmi_intf { void (*set_max_response_data_size)(struct ipmi_intf * intf, uint16_t size); }; +uint16_t ipmi_intf_get_max_request_data_size(struct ipmi_intf *intf); +uint16_t ipmi_intf_get_max_response_data_size(struct ipmi_intf *intf); +uint8_t ipmi_intf_get_bridging_level(const struct ipmi_intf *intf); + struct ipmi_intf * ipmi_intf_load(char * name); void ipmi_intf_print(struct ipmi_intf_support * intflist); @@ -218,7 +252,10 @@ void ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username); void ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password); void ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, uint8_t privlvl); void ipmi_intf_session_set_lookupbit(struct ipmi_intf * intf, uint8_t lookupbit); -void ipmi_intf_session_set_cipher_suite_id(struct ipmi_intf * intf, uint8_t cipher_suite_id); +#ifdef IPMI_INTF_LANPLUS +void ipmi_intf_session_set_cipher_suite_id(struct ipmi_intf * intf, + enum cipher_suite_ids cipher_suite_id); +#endif /* IPMI_INTF_LANPLUS */ void ipmi_intf_session_set_sol_escape_char(struct ipmi_intf * intf, char sol_escape_char); void ipmi_intf_session_set_kgkey(struct ipmi_intf *intf, const uint8_t *kgkey); void ipmi_intf_session_set_port(struct ipmi_intf * intf, int port); @@ -231,4 +268,3 @@ void ipmi_cleanup(struct ipmi_intf * intf); #if defined(IPMI_INTF_LAN) || defined (IPMI_INTF_LANPLUS) int ipmi_intf_socket_connect(struct ipmi_intf * intf); #endif -#endif /* IPMI_INTF_H */ |