summaryrefslogtreecommitdiff
path: root/util/ipmicmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/ipmicmd.h')
-rw-r--r--util/ipmicmd.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/util/ipmicmd.h b/util/ipmicmd.h
index b65e949..a4c911b 100644
--- a/util/ipmicmd.h
+++ b/util/ipmicmd.h
@@ -335,13 +335,25 @@ struct oemvalstr {
#define LOG_DEBUG 7 // debug-level messages
#endif
+typedef struct {
+ char node[SZGNODE+1];
+ char user[SZGNODE+1];
+ char pswd[PSW_MAX+1];
+ int auth_type; /* if 0, use any: MD5, MD2, etc.*/
+ int priv; /* IPMI_PRIV_LEVEL_USER or IPMI_PRIV_LEVEL_ADMIN */
+ int cipher;
+ unsigned char addr[128]; /* sizeof(struct sockaddr_storage) = 128 */
+ int addr_len; /* struct sockaddr_in/_in6 gaddr; _in6=28, _in=16 bytes*/
+ int port;
+} LAN_OPT; /* used for IPMI LAN, specified with option -NUP, etc. */
+
#ifndef _IPMI_RQ_
#define _IPMI_RQ_ 1
/* structure used in ipmi_sendrecv, maps to ipmitool syntax. */
struct ipmi_rq {
struct {
- uchar netfn:6;
- uchar lun:2;
+ uchar netfn:6;
+ uchar lun:2;
uchar cmd;
uchar target_cmd;
ushort data_len;
@@ -410,17 +422,18 @@ int ipmi_close(void); /*ditto*/
* parse_lan_options
* Parse the IPMI LAN options from the command-line getopt.
* int c (input): command-line option from getopt, one of:
+ case 'p': UDP port
case 'F': force driver type
- case 'T': auth type
- case 'V': priv level
- case 'J': cipher suite
- case 'N': nodename
+ case 'T': auth type
+ case 'V': priv level
+ case 'J': cipher suite
+ case 'N': nodename
case 'U': username
case 'R': remote password
- case 'P': remote password
- case 'E': get password from IPMI_PASSWORD environment var
- case 'Y': prompt for remote password
- case 'Z': set local MC address
+ case 'P': remote password
+ case 'E': get password from IPMI_PASSWORD environment var
+ case 'Y': prompt for remote password
+ case 'Z': set local MC address
* char *optarg (input): command-line argument from getopt
* char fdebug (input): show debug messages if =1, default=0
*/
@@ -456,7 +469,7 @@ int set_lan_options(char *node, char *user, char *pswd, int auth, int priv,
int cipher, void *addr, int addr_len);
int get_lan_options(char *node, char *user, char *pswd, int *auth, int *priv,
int *cipher, void *addr, int *addr_len);
-void print_lan_opt_usage(void);
+void print_lan_opt_usage(int opt);
int ipmi_getdeviceid(uchar *presp, int sresp, char fdebugcmd);
/* int ipmi_open(void); * embedded in ipmi_cmd() */
int ipmi_getpicmg(uchar *presp, int sresp, char fdebug);