From b18f5bf2db0fba2e7e539f68645836036d940d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 29 Apr 2015 15:44:44 +0200 Subject: Imported Upstream version 2.9.6 --- util/ipmilanplus.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'util/ipmilanplus.c') diff --git a/util/ipmilanplus.c b/util/ipmilanplus.c index 771c7e7..13ed2bc 100644 --- a/util/ipmilanplus.c +++ b/util/ipmilanplus.c @@ -92,13 +92,14 @@ static void sol_output_handler(void *rsp) { return; } static void dbg_dump(char *tag, uchar *pdata, int len, int fascii) { return; } #endif int ipmi_close_lan2(char *node); /*prototype*/ -extern char *gnode; /* from ipmicmd.c */ -extern char *guser; /* from ipmicmd.c */ -extern char *gpswd; /* from ipmicmd.c */ -extern int gauth_type; /* from ipmicmd.c */ -extern int gpriv_level; /* from ipmicmd.c */ +extern LAN_OPT lanp; /* from ipmicmd.c */ +//extern char *gnode; /* from ipmicmd.c */ +//extern char *guser; /* from ipmicmd.c */ +//extern char *gpswd; /* from ipmicmd.c */ +//extern int gauth_type; /* from ipmicmd.c */ +//extern int gpriv_level; /* from ipmicmd.c */ +//extern int gcipher_suite; /*from ipmicmd.c, see table 22-19 IPMI 2.0 spec*/ extern int gshutdown; /* from ipmicmd.c */ -extern int gcipher_suite; /*from ipmicmd.c, see table 22-19 IPMI 2.0 spec*/ extern FILE *fpdbg; /* == stdout, from ipmicmd.c */ extern FILE *fperr; /* == stderr, from ipmicmd.c */ extern FILE *fplog; /* from ipmicmd.c */ @@ -299,9 +300,9 @@ int ipmi_open_lan2(char *node, char *puser, char *pswd, int fdebugcmd) if (rv == 0) { if (intf->open == NULL) return(-1); if (intf->session == NULL) return(-1); - intf->session->authtype_set = (uchar)gauth_type; - intf->session->privlvl = (uchar)gpriv_level; - intf->session->cipher_suite_id = (uchar)gcipher_suite; + intf->session->authtype_set = (uchar)lanp.auth_type; + intf->session->privlvl = (uchar)lanp.priv; + intf->session->cipher_suite_id = (uchar)lanp.cipher; if (node != NULL) { strcpy(intf->session->hostname,node); } if (user != NULL) { strcpy(intf->session->username,user); } if (pswd == NULL || pswd[0] == 0) @@ -316,7 +317,7 @@ int ipmi_open_lan2(char *node, char *puser, char *pswd, int fdebugcmd) rv = intf->open(intf); if (fdebugcmd) printf("lan2 open.intf(auth=%d,priv=%d,cipher=%d) returned %d\n", - gauth_type,gpriv_level,gcipher_suite, rv); + lanp.auth_type,lanp.priv,lanp.cipher, rv); if (rv != -1) { /*success is >= 0*/ sol_seq = 0; /*init new session, will call inc_sol_seq*/ sol_len = 0; @@ -373,7 +374,7 @@ int ipmi_cmdraw_lan2(char *node, uchar cmd, uchar netfn, uchar lun, if (fdebugcmd) verbose = 8; #endif if (intf == NULL || (intf->opened == 0)) { - rc = ipmi_open_lan2(node,guser,gpswd,fdebugcmd); + rc = ipmi_open_lan2(node,lanp.user,lanp.pswd,fdebugcmd); if (rc != 0) { if (fdebugcmd) fprintf(fperr, "ipmi_cmd_lan2: interface open error %d\n",rc); -- cgit v1.2.3