diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:44:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:44:44 +0200 |
commit | b18f5bf2db0fba2e7e539f68645836036d940d26 (patch) | |
tree | 23c4dd8f3d273f34ef9bbe1799d1958685559915 /util/ipmicmd.h | |
parent | a7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (diff) |
Imported Upstream version 2.9.6upstream/2.9.6
Diffstat (limited to 'util/ipmicmd.h')
-rw-r--r-- | util/ipmicmd.h | 35 |
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); |