diff --git a/ipmitool/include/ipmitool/ipmi_strings.h b/ipmitool/include/ipmitool/ipmi_strings.h index 298398e..b7de95f 100644 --- a/ipmitool/include/ipmitool/ipmi_strings.h +++ b/ipmitool/include/ipmitool/ipmi_strings.h @@ -51,5 +51,9 @@ extern const struct valstr ipmi_authtype_session_vals[]; extern const struct valstr ipmi_authtype_vals[]; extern const struct valstr ipmi_channel_protocol_vals[]; extern const struct valstr ipmi_channel_medium_vals[]; +extern const struct valstr ipmi_auth_algorithms[]; +extern const struct valstr ipmi_integrity_algorithms[]; +extern const struct valstr ipmi_encryption_algorithms[]; + #endif /*IPMI_STRINGS_H*/ diff --git a/ipmitool/lib/ipmi_strings.c b/ipmitool/lib/ipmi_strings.c index 6ef6c73..627a6fe 100644 --- a/ipmitool/lib/ipmi_strings.c +++ b/ipmitool/lib/ipmi_strings.c @@ -254,3 +254,25 @@ const struct valstr completion_code_vals[] = { { 0x00, NULL } }; +const struct valstr ipmi_auth_algorithms[] = { + { IPMI_AUTH_RAKP_NONE, "none" }, + { IPMI_AUTH_RAKP_HMAC_SHA1, "hmac_sha1" }, + { IPMI_AUTH_RAKP_HMAC_MD5, "hmac_md5" }, + { 0x00, NULL } +}; + +const struct valstr ipmi_integrity_algorithms[] = { + { IPMI_INTEGRITY_NONE, "none" }, + { IPMI_INTEGRITY_HMAC_SHA1_96, "hmac_sha1_96" }, + { IPMI_INTEGRITY_HMAC_MD5_128, "hmac_md5_128" }, + { IPMI_INTEGRITY_MD5_128 , "md5_128" }, + { 0x00, NULL } +}; + +const struct valstr ipmi_encryption_algorithms[] = { + { IPMI_CRYPT_NONE, "none" }, + { IPMI_CRYPT_AES_CBC_128, "aes_cbc_128" }, + { IPMI_CRYPT_XRC4_128, "xrc4_128" }, + { IPMI_CRYPT_XRC4_40, "xrc4_40" }, + { 0x00, NULL } +}; diff --git a/ipmitool/src/plugins/lanplus/lanplus_strings.c b/ipmitool/src/plugins/lanplus/lanplus_strings.c index ddd694b..6c3e028 100644 --- a/ipmitool/src/plugins/lanplus/lanplus_strings.c +++ b/ipmitool/src/plugins/lanplus/lanplus_strings.c @@ -1,4 +1,5 @@ #include "lanplus.h" +#include "ipmitool/ipmi_constants.h" const struct valstr ipmi_rakp_return_codes[] = { @@ -35,26 +36,4 @@ const struct valstr ipmi_priv_levels[] = { }; -const struct valstr ipmi_auth_algorithms[] = { - { IPMI_AUTH_RAKP_NONE, "none" }, - { IPMI_AUTH_RAKP_HMAC_SHA1, "hmac_sha1" }, - { IPMI_AUTH_RAKP_HMAC_MD5, "hmac_md5" }, - { 0, 0 }, -}; - -const struct valstr ipmi_integrity_algorithms[] = { - { IPMI_INTEGRITY_NONE, "none" }, - { IPMI_INTEGRITY_HMAC_SHA1_96, "hmac_sha1_96" }, - { IPMI_INTEGRITY_HMAC_MD5_128, "hmac_md5_128" }, - { IPMI_INTEGRITY_MD5_128 , "md5_128" }, - { 0, 0 }, -}; - -const struct valstr ipmi_encryption_algorithms[] = { - { IPMI_CRYPT_NONE, "none" }, - { IPMI_CRYPT_AES_CBC_128, "aes_cbc_128" }, - { IPMI_CRYPT_XRC4_128, "xrc4_128" }, - { IPMI_CRYPT_XRC4_40, "xrc4_40" }, - { 0, 0 }, -};