diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-10-30 18:12:02 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-10-30 18:12:02 +0100 |
commit | 1f3c9b4ae26ce1d46d954d509b83b8684ada5625 (patch) | |
tree | 260b922ec4d5d153cc6db745e27931cfd464472f /include/ipmitool/ipmi_intf.h | |
parent | 8fcf0ba6f182918bd584bb80bf0b8998acad26a8 (diff) | |
parent | 8b758ee941f4c1ffea0532caa74b1fcd8101d1d8 (diff) |
Merge branch 'release/debian/1.8.19-1'debian/1.8.19-1
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 */ |