summaryrefslogtreecommitdiff
path: root/util/iconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/iconfig.c')
-rw-r--r--util/iconfig.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/util/iconfig.c b/util/iconfig.c
index 21eb76e..240e530 100644
--- a/util/iconfig.c
+++ b/util/iconfig.c
@@ -171,7 +171,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "2.99";
+static char * progver = "3.00";
static char * progname = "iconfig";
static char fdebug = 0;
static char fipmilan = 0;
@@ -186,6 +186,7 @@ static char fpassword = 0; /* =1 user-specified a password, so set it. */
static uchar fmBMC = 0;
static uchar fiBMC = 0;
static uchar fRomley = 0;
+static uchar fGrantley = 0;
static char fipv6 = 0;
static char fcanonical = 0;
static char fchan2wart = 0; /* =1 if need wart to skip channel 2 */
@@ -1337,13 +1338,13 @@ static int Get_Mac(uchar *ipadr,uchar *macadr)
"arping -I %s -c 2 %d.%d.%d.%d |grep reply |tail -n1 >%s\n",
_ifname,ipadr[0],ipadr[1],ipadr[2],ipadr[3],alertfile);
if (fdebug) printf("%s", arping_cmd);
- system(arping_cmd);
+ i = system(arping_cmd);
fparp = fopen(alertfile,"r");
if (fparp == NULL) {
fprintf(stdout,"Get_Mac: Cannot open %s, errno = %d\n",
alertfile,get_errno());
- ret = -1;
+ ret = -1;
} else {
while (fgets(buff, 1023, fparp)) {
/* should only run through loop once */
@@ -2002,13 +2003,14 @@ main(int argc, char **argv)
#endif
break;
} /*end switch*/
- if (is_romley(vend_id,prod_id)) {
- fRomley = 1;
+ if (is_romley(vend_id,prod_id)) fRomley = 1;
+ if (is_grantley(vend_id,prod_id)) fGrantley = 1;
+ if (fRomley) {
fiBMC = 1; /* Intel iBMC */
fsharedMAC = 0; /* not-shared BMC LAN port, separate MAC */
set_max_kcs_loops(URNLOOPS); /*longer for SetLan cmds */
fipv6 = 1;
- }
+ }
} else if (vend_id == VENDOR_KONTRON) {
//if (prod_id == 0x1590) fchan2wart = 1; /* KTC5520 chan2 wart */
fsharedMAC = 0; /* not-shared BMC MAC */
@@ -2324,7 +2326,10 @@ main(int argc, char **argv)
case LAN_FAILOVER: /* Intel LAN Failover */
if (is_romley(vend_id,prod_id))
ret = lan_failover_intel(0xFF,&LanRecord[0]);
- else continue; /*skip if not Intel Romley */
+ else if ((vend_id == VENDOR_SUPERMICROX) || (vend_id == VENDOR_SUPERMICRO)) {
+ ret = oem_supermicro_get_lan_port(&LanRecord[0]);
+ if (fdebug) printf("SMC get_lan_port ret=%d val=%d\n",ret,LanRecord[0]);
+ } else continue; /*skip if not Intel Romley */
sz = 1;
fignore_err = 1;
break;
@@ -2641,7 +2646,10 @@ main(int argc, char **argv)
case LAN_FAILOVER: /* Intel LAN Failover */
if (is_romley(vend_id,prod_id))
ret = lan_failover_intel(LanRecord[0],(uchar *)&i);
- else continue; /*skip if not Intel Romley*/
+ else if ((vend_id == VENDOR_SUPERMICROX) || (vend_id == VENDOR_SUPERMICRO)) {
+ ret = oem_supermicro_set_lan_port(LanRecord[0]);
+ if (fdebug) printf("SMC set_lan_port(%d) = %d\n",LanRecord[0],ret);
+ } else continue; /*skip if not Intel Romley*/
break;
default:
ret = LAN_ERR_NOTSUPPORT;