diff --git a/ipmitool/include/ipmitool/ipmi_delloem.h b/ipmitool/include/ipmitool/ipmi_delloem.h index a82587c..0ef81b3 100644 --- a/ipmitool/include/ipmitool/ipmi_delloem.h +++ b/ipmitool/include/ipmitool/ipmi_delloem.h @@ -182,6 +182,7 @@ typedef struct _lcd_mode #define IMC_IDRAC_11G_MODULAR (uint8_t) (0x0B) #define IMC_UNUSED (uint8_t) (0x0C) #define IMC_MASER_LITE_BMC (uint8_t) (0x0D) +#define IMC_MASER_LITE_NU (uint8_t) (0x0E) #define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10) #define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11) diff --git a/ipmitool/lib/ipmi_delloem.c b/ipmitool/lib/ipmi_delloem.c index 963a321..5d6cd40 100644 --- a/ipmitool/lib/ipmi_delloem.c +++ b/ipmitool/lib/ipmi_delloem.c @@ -752,7 +752,9 @@ ipmi_idracvalidator_command (struct ipmi_intf * intf) val2str(rsp->ccode, completion_code_vals)); */ return -1; } - if( (IMC_IDRAC_11G_MONOLITHIC == rsp->data[10]) || (IMC_IDRAC_11G_MODULAR ==rsp->data[10]) ) + /* Support the 11G Monolithic, modular, Maisy and Coaster */ + if( (IMC_IDRAC_11G_MONOLITHIC == rsp->data[10]) || (IMC_IDRAC_11G_MODULAR ==rsp->data[10]) || + (IMC_MASER_LITE_BMC == rsp->data[10]) || (IMC_MASER_LITE_NU ==rsp->data[10]) ) { iDRAC_FLAG=IDRAC_11G; } @@ -1890,6 +1892,7 @@ ipmi_lcd_usage(void) static int ipmi_delloem_mac_main (struct ipmi_intf * intf, int argc, char ** argv) { int rc = 0; + int currIdInt = -1; current_arg++; if (argc > 1 && strcmp(argv[current_arg], "help") == 0) @@ -1914,12 +1917,14 @@ static int ipmi_delloem_mac_main (struct ipmi_intf * intf, int argc, char ** arg ipmi_mac_usage(); return -1; } - int currIdInt; - make_int(argv[current_arg],&currIdInt); - if(currIdInt>8) + + if(make_int(argv[current_arg],&currIdInt) < 0) { + lprintf(LOG_ERR, "Invalid NIC number. The NIC number should be between 0-8\n"); + return -1; + } + if( (currIdInt > 8) || (currIdInt < 0) ) { lprintf(LOG_ERR, "Invalid NIC number. The NIC number should be between 0-8\n"); - ipmi_mac_usage(); return -1; } rc = ipmi_macinfo(intf, currIdInt); @@ -2016,6 +2021,30 @@ static int ipmi_macinfo_drac_idrac_virtual_mac(struct ipmi_intf* intf,uint8_t Ni { return -1; } + if( (IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_12G_MONOLITHIC== IMC_Type) ) { + // Get the Chasiss Assigned MAC Addresss for 12g Only + memcpy(VirtualMacAddress,((rsp->data)+1),MACADDRESSLENGH); + + for (i=0;idata)+1+MACADDRESSLENGH),MACADDRESSLENGH); + + for (i=0;idata)+VIRTUAL_MAC_OFFSET),MACADDRESSLENGH); for (i=0;i