[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freeipmi-devel] ipmiping 2.0 patch
From: |
Albert Chu |
Subject: |
Re: [Freeipmi-devel] ipmiping 2.0 patch |
Date: |
Thu, 03 Nov 2005 18:02:59 -0800 |
Hmmm, gnu.org didn't forward my patch along. Ok, here it is cut & pasted.
Al
-----
Index: ipmiping/src/ipmiping.c
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/ipmiping/src/ipmiping.c,v
retrieving revision 1.2
diff -u -p -r1.2 ipmiping.c
--- ipmiping/src/ipmiping.c 25 Jan 2005 17:34:47 -0000 1.2
+++ ipmiping/src/ipmiping.c 31 Oct 2005 16:46:16 -0000
@@ -75,15 +75,18 @@ int
createpacket(char *buffer,
int buflen,
unsigned int seq_num_count,
+ int version,
int debug)
{
fiid_obj_t obj_hdr_rmcp = NULL;
fiid_obj_t obj_hdr_session = NULL;
fiid_obj_t obj_msg_hdr = NULL;
fiid_obj_t obj_cmd = NULL;
+ fiid_field_t *tmpl_cmd_get_channel_auth_caps_ptr = NULL;
int len;
assert(buffer != NULL);
+ assert(version == IPMI_PING_VERSION_1_5 || version ==
IPMI_PING_VERSION_2_0);
if (buflen < 0)
return -1;
@@ -91,10 +94,15 @@ createpacket(char *buffer,
if (buflen == 0)
return 0;
+ if (version == IPMI_PING_VERSION_1_5)
+ tmpl_cmd_get_channel_auth_caps_ptr = (fiid_field_t
*)&tmpl_cmd_get_channel_auth_caps_rq[0];
+ else
+ tmpl_cmd_get_channel_auth_caps_ptr = (fiid_field_t
*)&tmpl_cmd_get_channel_auth_caps_v20_rq[0];
+
obj_hdr_rmcp = Fiid_obj_alloc(tmpl_hdr_rmcp);
obj_hdr_session = Fiid_obj_alloc(tmpl_hdr_session_auth_calc);
obj_msg_hdr = Fiid_obj_alloc(tmpl_lan_msg_hdr_rq);
- obj_cmd = Fiid_obj_alloc(tmpl_cmd_get_channel_auth_caps_rq);
+ obj_cmd = Fiid_obj_alloc(tmpl_cmd_get_channel_auth_caps_ptr);
if (fill_hdr_rmcp_ipmi(obj_hdr_rmcp) < 0)
ipmi_ping_err_exit("fill_hdr_rmcp_ipmi: %s", strerror(errno));
@@ -108,12 +116,22 @@ createpacket(char *buffer,
seq_num_count % (IPMI_RQ_SEQ_MAX+1),
obj_msg_hdr) < 0)
ipmi_ping_err_exit("fill_lan_msg_hdr: %s", strerror(errno));
- if (fill_cmd_get_channel_auth_caps(IPMI_PRIV_LEVEL_USER, obj_cmd) < 0)
- ipmi_ping_err_exit("fill_cmd_get_channel_auth_caps: %s",
strerror(errno));
+ if (version == IPMI_PING_VERSION_1_5)
+ {
+ if (fill_cmd_get_channel_auth_caps(IPMI_PRIV_LEVEL_USER, obj_cmd)
< 0)
+ ipmi_ping_err_exit("fill_cmd_get_channel_auth_caps: %s",
strerror(errno));
+ }
+ else
+ {
+ if (fill_cmd_get_channel_auth_caps_v20(IPMI_PRIV_LEVEL_USER,
+
IPMI_GET_IPMI_V20_EXTENDED_DATA,
+ obj_cmd) < 0)
+ ipmi_ping_err_exit("fill_cmd_get_channel_auth_caps_v20: %s",
strerror(errno));
+ }
if ((len = assemble_ipmi_lan_pkt(obj_hdr_rmcp, obj_hdr_session,
tmpl_hdr_session_auth_calc,
obj_msg_hdr,
- obj_cmd,
tmpl_cmd_get_channel_auth_caps_rq,
+ obj_cmd,
tmpl_cmd_get_channel_auth_caps_ptr,
(u_int8_t *)buffer, buflen)) < 0)
ipmi_ping_err_exit("assemble_ipmi_lan_pkt: %s", strerror(errno));
@@ -123,7 +141,7 @@ createpacket(char *buffer,
if (fiid_obj_dump_lan(STDERR_FILENO, "Request", NULL,
(u_int8_t *)buffer, len,
tmpl_hdr_session_auth_calc,
tmpl_lan_msg_hdr_rq,
- tmpl_cmd_get_channel_auth_caps_rq) < 0)
+ tmpl_cmd_get_channel_auth_caps_ptr) < 0)
ipmi_ping_err_exit("fiid_obj_dump_lan: %s", strerror(errno));
}
#endif
@@ -141,7 +159,9 @@ parsepacket(char *buffer,
int buflen,
const char *from,
unsigned int seq_num_count,
- int verbose, int debug)
+ int verbose,
+ int version,
+ int debug)
{
fiid_obj_t obj_hdr_rmcp = NULL;
fiid_obj_t obj_hdr_session = NULL;
@@ -150,10 +170,13 @@ parsepacket(char *buffer,
fiid_obj_t obj_msg_trlr = NULL;
u_int64_t req_seq, none, md2, md5, straight_passwd_key, oem,
anonymous_login, null_username, non_null_username,
- user_level_auth, per_message_auth;
+ user_level_auth, per_message_auth,
+ ipmi_v20_extended_capabilities_available, ipmi_v15, ipmi_v20;
+ fiid_field_t *tmpl_cmd_get_channel_auth_caps_ptr = NULL;
int ret, retval = -1;
assert(buffer != NULL && from != NULL);
+ assert(version == IPMI_PING_VERSION_1_5 || version ==
IPMI_PING_VERSION_2_0);
if (buflen < 0)
return -1;
@@ -161,10 +184,15 @@ parsepacket(char *buffer,
if (buflen == 0)
return 0;
+ if (version == IPMI_PING_VERSION_1_5)
+ tmpl_cmd_get_channel_auth_caps_ptr = (fiid_field_t
*)&tmpl_cmd_get_channel_auth_caps_rs[0];
+ else
+ tmpl_cmd_get_channel_auth_caps_ptr = (fiid_field_t
*)&tmpl_cmd_get_channel_auth_caps_v20_rs[0];
+
obj_hdr_rmcp = Fiid_obj_alloc(tmpl_hdr_rmcp);
obj_hdr_session = Fiid_obj_alloc(tmpl_hdr_session_auth_calc);
obj_msg_hdr = Fiid_obj_alloc(tmpl_lan_msg_hdr_rs);
- obj_cmd = Fiid_obj_alloc(tmpl_cmd_get_channel_auth_caps_rs);
+ obj_cmd = Fiid_obj_alloc(tmpl_cmd_get_channel_auth_caps_ptr);
obj_msg_trlr = Fiid_obj_alloc(tmpl_lan_msg_trlr);
#ifndef NDEBUG
@@ -173,7 +201,7 @@ parsepacket(char *buffer,
if (fiid_obj_dump_lan(STDERR_FILENO, "Response", NULL,
(u_int8_t *)buffer, buflen,
tmpl_hdr_session_auth_calc,
tmpl_lan_msg_hdr_rs,
- tmpl_cmd_get_channel_auth_caps_rs) < 0)
+ tmpl_cmd_get_channel_auth_caps_ptr) < 0)
ipmi_ping_err_exit("fiid_obj_dump_lan: %s", strerror(errno));
}
#endif
@@ -189,7 +217,7 @@ parsepacket(char *buffer,
if (unassemble_ipmi_lan_pkt((u_int8_t *)buffer, buflen,
tmpl_hdr_session_auth_calc,
- tmpl_cmd_get_channel_auth_caps_rs,
+ tmpl_cmd_get_channel_auth_caps_ptr,
obj_hdr_rmcp, obj_hdr_session,
obj_msg_hdr, obj_cmd, obj_msg_trlr) < 0)
ipmi_ping_err_exit("unassemble_ipmi_lan_pkt: %s", strerror(errno));
@@ -272,12 +300,35 @@ parsepacket(char *buffer,
Fiid_obj_get(obj_cmd, tmpl_cmd_get_channel_auth_caps_rs,
"auth_status.per_message_auth",
(u_int64_t *)&per_message_auth);
+
printf(", auth: none=%s md2=%s md5=%s passwd=%s oem=%s anon=%s
null=%s non-null=%s user=%s permsg=%s ",
_setstr(none), _setstr(md2), _setstr(md5),
_setstr(straight_passwd_key),_setstr(oem),
_setstr(anonymous_login), _setstr(null_username),
_setstr(non_null_username), _setstr(user_level_auth),
_setstr(per_message_auth));
+
+ if (version == IPMI_PING_VERSION_2_0)
+ {
+ Fiid_obj_get(obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rs,
+
"auth_type.ipmi_v2.0_extended_capabilities_available",
+ (u_int64_t
*)&ipmi_v20_extended_capabilities_available);
+
+ printf("ipmi_v20_extended capabilities_available: %s ",
+ _setstr(ipmi_v20_extended_capabilities_available));
+
+ if (ipmi_v20_extended_capabilities_available)
+ {
+ Fiid_obj_get(obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rs,
+ "channel_supports_ipmi_v1.5_connections",
+ (u_int64_t *)&ipmi_v15);
+ Fiid_obj_get(obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rs,
+ "channel_supports_ipmi_v2.0_connections",
+ (u_int64_t *)&ipmi_v20);
+
+ printf("ipmi_v1.5: %s ipmi_v2.0: %s ", _setstr(ipmi_v15),
_setstr(ipmi_v20));
+ }
+ }
}
printf("\n");
@@ -322,10 +373,11 @@ endresult(const char *progname,
int
main(int argc, char **argv)
{
- ipmi_ping_main(argc, argv,
- createpacket,
- parsepacket,
- latepacket,
- endresult);
+#ifndef NDEBUG
+ ipmi_ping_setup(argc, argv, "hVc:i:I:t:vr:d");
+#else
+ ipmi_ping_setup(argc, argv, "hVc:i:I:t:vr:");
+#endif
+ ipmi_ping_loop(createpacket, parsepacket, latepacket, endresult);
exit(1); /* NOT REACHED */
}
Index: libfreeipmi/src/ipmi-msg-support-cmds.c
===================================================================
RCS file:
/cvsroot/freeipmi/freeipmi/libfreeipmi/src/ipmi-msg-support-cmds.c,v
retrieving revision 1.18
diff -u -p -r1.18 ipmi-msg-support-cmds.c
--- libfreeipmi/src/ipmi-msg-support-cmds.c 8 Oct 2005 13:04:22 -0000
1.18
+++ libfreeipmi/src/ipmi-msg-support-cmds.c 31 Oct 2005 16:46:17 -0000
@@ -54,6 +54,44 @@ fiid_template_t tmpl_cmd_get_channel_aut
{0, ""}
};
+fiid_template_t tmpl_cmd_get_channel_auth_caps_v20_rq =
+ {
+ {8, "cmd"},
+ {4, "channel_num"},
+ {3, "reserved1"},
+ {1, "get_ipmi_v2.0_extended_data"},
+ {4, "max_priv_level"},
+ {4, "reserved2"},
+ {0, ""}
+ };
+
+fiid_template_t tmpl_cmd_get_channel_auth_caps_v20_rs =
+ {
+ {8, "cmd"},
+ {8, "comp_code"},
+ {8, "channel_num"},
+ {1, "auth_type.none"},
+ {1, "auth_type.md2"},
+ {1, "auth_type.md5"},
+ {1, "auth_type.reserved1"},
+ {1, "auth_type.straight_passwd_key"},
+ {1, "auth_type.oem_prop"},
+ {1, "auth_type.ipmi_v2.0_extended_capabilities_available"},
+ {1, "auth_type.reserved2"},
+ {1, "auth_status.anonymous_login"},
+ {1, "auth_status.null_username"},
+ {1, "auth_status.non_null_username"},
+ {1, "auth_status.user_level_auth"},
+ {1, "auth_status.per_message_auth"},
+ {3, "auth_status.reserved"},
+ {1, "channel_supports_ipmi_v1.5_connections"},
+ {1, "channel_supports_ipmi_v2.0_connections"},
+ {6, "reserved1"},
+ {24, "oem_id"},
+ {8, "oem_aux"},
+ {0, ""}
+ };
+
fiid_template_t tmpl_cmd_get_session_challenge_rq =
{
{8, "cmd"},
@@ -366,6 +404,34 @@ fill_cmd_get_channel_auth_caps (u_int8_t
issued on. */
FIID_OBJ_SET (obj_cmd, tmpl_cmd_get_channel_auth_caps_rq,
"max_priv_level",
+ max_priv_level);
+ return (0);
+}
+
+int8_t
+fill_cmd_get_channel_auth_caps_v20 (u_int8_t max_priv_level,
+ u_int8_t get_ipmi_v20_extended_data,
+ fiid_obj_t obj_cmd)
+{
+ if (!obj_cmd || !IPMI_PRIV_LEVEL_VALID(max_priv_level))
+ {
+ errno = EINVAL;
+ return (-1);
+ }
+
+ FIID_OBJ_SET (obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rq, "cmd",
+ IPMI_CMD_GET_CHANNEL_AUTH_CAPS);
+
+ FIID_OBJ_SET (obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rq,
+ "get_ipmi_v2.0_extended_data",
+ get_ipmi_v20_extended_data);
+
+ FIID_OBJ_SET (obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rq,
+ "channel_num", 0x0E);
+ /* retrieve information for channel this request was
+ issued on. */
+
+ FIID_OBJ_SET (obj_cmd, tmpl_cmd_get_channel_auth_caps_v20_rq,
"max_priv_level",
max_priv_level);
return (0);
}
Index: libfreeipmi/src/ipmi-msg-support-cmds.h
===================================================================
RCS file:
/cvsroot/freeipmi/freeipmi/libfreeipmi/src/ipmi-msg-support-cmds.h,v
retrieving revision 1.11
diff -u -p -r1.11 ipmi-msg-support-cmds.h
--- libfreeipmi/src/ipmi-msg-support-cmds.h 6 Oct 2005 10:41:09 -0000
1.11
+++ libfreeipmi/src/ipmi-msg-support-cmds.h 31 Oct 2005 16:46:17 -0000
@@ -115,6 +115,8 @@ extern "C" {
#define IPMI_PASSWORD_OPERATION_TEST_FAILED 0x80
+#define IPMI_GET_IPMI_V20_EXTENDED_DATA 0x01
+
#if 0
#pragma pack(1)
typedef struct ipmi_cmd_get_channel_auth_caps_rq
@@ -242,6 +244,8 @@ typedef struct ipmi_cmd_close_session_rs
extern fiid_template_t tmpl_cmd_get_channel_auth_caps_rq;
extern fiid_template_t tmpl_cmd_get_channel_auth_caps_rs;
+extern fiid_template_t tmpl_cmd_get_channel_auth_caps_v20_rq;
+extern fiid_template_t tmpl_cmd_get_channel_auth_caps_v20_rs;
extern fiid_template_t tmpl_cmd_get_session_challenge_rq;
extern fiid_template_t tmpl_cmd_get_session_challenge_rs;
extern fiid_template_t tmpl_cmd_activate_session_rq;
@@ -255,6 +259,11 @@ extern fiid_template_t tmpl_get_channel_
int8_t fill_cmd_get_channel_auth_caps (u_int8_t max_priv_level,
fiid_obj_t obj_cmd);
+
+int8_t fill_cmd_get_channel_auth_caps_v20 (u_int8_t max_priv_level,
+ u_int8_t
get_ipmi_v20_extended_data,
+ fiid_obj_t obj_cmd);
+
int8_t ipmi_lan_get_channel_auth_caps (int sockfd,
struct sockaddr *hostaddr,
size_t hostaddr_len,
Index: libfreeipmi/src/ipmi-ping.c
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/libfreeipmi/src/ipmi-ping.c,v
retrieving revision 1.4
diff -u -p -r1.4 ipmi-ping.c
--- libfreeipmi/src/ipmi-ping.c 6 Oct 2005 10:41:10 -0000 1.4
+++ libfreeipmi/src/ipmi-ping.c 31 Oct 2005 16:46:17 -0000
@@ -37,6 +37,10 @@
#define IPMI_PING_MAX_PKT_LEN 1024
#define IPMI_PING_MAX_ERR_LEN 1024
+#define IPMI_PING_VERSION_1_5_STR "1.5"
+
+#define IPMI_PING_VERSION_2_0_STR "2.0"
+
/* getopt */
extern char *optarg;
extern int optind, opterr, optopt;
@@ -50,6 +54,7 @@ static int _interval = 1;
static int _timeout = 5;
static int _verbose = 0;
static int _debug = 0;
+static int _version = IPMI_PING_VERSION_1_5;
/* globals */
static int _sockfd = 0;
@@ -109,24 +114,32 @@ _strncpy(char *dest, char *src, unsigned
}
static void
-_usage(void)
+_output_usage(char *options)
{
assert(_progname != NULL);
fprintf(stderr, "%s [OPTIONS] destination\n", _progname);
- fprintf(stderr, " -c count\n");
- fprintf(stderr, " -i interval in seconds\n");
- fprintf(stderr, " -I interface address or device name\n");
- fprintf(stderr, " -t timeout in seconds\n");
- fprintf(stderr, " -v verbose output\n");
+ if (strchr(options, 'c'))
+ fprintf(stderr, " -c count\n");
+ if (strchr(options, 'i'))
+ fprintf(stderr, " -i interval in seconds\n");
+ if (strchr(options, 'I'))
+ fprintf(stderr, " -I interface address or device name\n");
+ if (strchr(options, 't'))
+ fprintf(stderr, " -t timeout in seconds\n");
+ if (strchr(options, 'v'))
+ fprintf(stderr, " -v verbose output\n");
+ if (strchr(options, 'r'))
+ fprintf(stderr, " -r protocol version\n");
#ifndef NDEBUG
- fprintf(stderr, " -d turn on debugging\n");
+ if (strchr(options, 'd'))
+ fprintf(stderr, " -d turn on debugging\n");
#endif
exit(1);
}
static void
-_version(void)
+_output_version(void)
{
assert(_progname != NULL);
fprintf(stderr, "%s %s\n", _progname, VERSION);
@@ -134,15 +147,10 @@ _version(void)
}
static void
-_cmdline_parse(int argc, char **argv)
+_cmdline_parse(int argc, char **argv, char *options)
{
char c, *ptr;
-#ifndef NDEBUG
- char *options = "hVc:i:I:t:vd";
-#else
- char *options = "hVc:i:I:t:v";
-#endif
-
+
/* Turn off error messages */
opterr = 0;
@@ -151,9 +159,9 @@ _cmdline_parse(int argc, char **argv)
switch (c)
{
case 'h':
- _usage();
+ _output_usage(options);
case 'V':
- _version();
+ _output_version();
case 'c':
_count = strtol(optarg, &ptr, 10);
if (ptr != (optarg + strlen(optarg)))
@@ -181,6 +189,14 @@ _cmdline_parse(int argc, char **argv)
case 'v':
_verbose++;
break;
+ case 'r':
+ if (!strcmp(optarg, IPMI_PING_VERSION_1_5_STR))
+ _version = IPMI_PING_VERSION_1_5;
+ else if (!strcmp(optarg, IPMI_PING_VERSION_2_0_STR))
+ _version = IPMI_PING_VERSION_2_0;
+ else
+ ipmi_ping_err_exit("invalid version");
+ break;
#ifndef NDEBUG
case 'd':
_debug++;
@@ -324,7 +340,7 @@ _main_loop(Ipmi_Ping_CreatePacket _creat
}
if ((len = _create((char *)buffer, IPMI_PING_MAX_PKT_LEN,
- seq_num_count, _debug)) < 0)
+ seq_num_count, _version, _debug)) < 0)
ipmi_ping_err_exit("_create failed: %s", strerror(errno));
rv = ipmi_lan_sendto(_sockfd, buffer, len, 0,
@@ -365,8 +381,7 @@ _main_loop(Ipmi_Ping_CreatePacket _creat
ipmi_ping_err_exit("ipmi_recvfrom: %s", strerror(errno));
if ((rv = _parse((char *)buffer, len,
inet_ntoa(from.sin_addr),
- seq_num_count, _verbose,
- _debug)) < 0)
+ seq_num_count, _verbose, _version,
_debug)) < 0)
ipmi_ping_err_exit("_parse failed: %s", strerror(errno));
/* If rv == 0, the sequence numbers don't match, so
@@ -393,30 +408,54 @@ _main_loop(Ipmi_Ping_CreatePacket _creat
exit(ret);
}
-void
-ipmi_ping_main(int argc, char **argv,
- Ipmi_Ping_CreatePacket _create,
+void
+ipmi_ping_setup(int argc, char **argv, char *options)
+{
+#ifndef NDEBUG
+ char *valid_options = "hVciItvrd:";
+#else
+ char *valid_options = "hVciItvr:";
+#endif
+ char *ptr;
+ char c;
+
+ if (argc <= 0 || !argv || !options)
+ {
+ fprintf(stderr, "ipmi_ping_setup: called improperly\n");
+ exit(1);
+ }
+
+ /* Check for valid options */
+ ptr = options;
+ while ((c = *ptr))
+ {
+ if (!strchr(valid_options, c))
+ {
+ fprintf(stderr, "ipmi_ping_setup: invalid options listed");
+ exit(1);
+ }
+ ptr++;
+ }
+
+ _err_init(argv[0]);
+ _cmdline_parse(argc, argv, options);
+ _setup();
+}
+
+void
+ipmi_ping_loop(Ipmi_Ping_CreatePacket _create,
Ipmi_Ping_ParsePacket _parse,
Ipmi_Ping_LatePacket _late,
Ipmi_Ping_EndResult _end)
{
- if (argc <= 0
- || argv == NULL
- || _create == NULL
- || _parse == NULL
- || _late == NULL
- || _end == NULL)
+ if (!_create || !_parse || !_late || !_end )
{
- fprintf(stderr, "ipmi_ping_main: called improperly\n");
+ fprintf(stderr, "ipmi_ping_loop: called improperly\n");
exit(1);
}
- _err_init(argv[0]);
_end_result = _end;
-
- _cmdline_parse(argc, argv);
- _setup();
_main_loop(_create, _parse, _late);
-
+
return; /* NOT REACHED */
}
Index: libfreeipmi/src/ipmi-ping.h
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/libfreeipmi/src/ipmi-ping.h,v
retrieving revision 1.1
diff -u -p -r1.1 ipmi-ping.h
--- libfreeipmi/src/ipmi-ping.h 13 May 2004 17:32:57 -0000 1.1
+++ libfreeipmi/src/ipmi-ping.h 31 Oct 2005 16:46:17 -0000
@@ -31,6 +31,9 @@
extern "C" {
#endif
+#define IPMI_PING_VERSION_1_5 0
+#define IPMI_PING_VERSION_2_0 1
+
/* Ipmi_Ping_CreatePacket
* - Create a ping request packet and store it in the buffer
* - Return length of packet created, or -1 on error.
@@ -38,6 +41,7 @@ extern "C" {
typedef int (*Ipmi_Ping_CreatePacket)(char *buffer,
int buflen,
unsigned int seq_num_count,
+ int version,
int debug);
/* Ipmi_Ping_ParsePacket
@@ -51,6 +55,7 @@ typedef int (*Ipmi_Ping_ParsePacket)(cha
const char *from,
unsigned int seq_num_count,
int verbose,
+ int version,
int debug);
/* Ipmi_Ping_LatePacket
@@ -71,11 +76,15 @@ typedef int (*Ipmi_Ping_EndResult)(const
*/
void ipmi_ping_err_exit(char *fmt, ...);
-/* ipmi_ping_common
- * - wrapper function for common ping utilities
+/* ipmi_ping_setup
+ * - setup ipmi ping code by parsing command line arguments
+ */
+void ipmi_ping_setup(int argc, char **argv, char *options);
+
+/* ipmi_ping_loop
+ * - handle looping ping code
*/
-void ipmi_ping_main(int argc, char **argv,
- Ipmi_Ping_CreatePacket _create,
+void ipmi_ping_loop(Ipmi_Ping_CreatePacket _create,
Ipmi_Ping_ParsePacket _parse,
Ipmi_Ping_LatePacket _late,
Ipmi_Ping_EndResult _end);
Index: rmcpping/src/rmcpping.c
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/rmcpping/src/rmcpping.c,v
retrieving revision 1.1
diff -u -p -r1.1 rmcpping.c
--- rmcpping/src/rmcpping.c 13 May 2004 17:32:57 -0000 1.1
+++ rmcpping/src/rmcpping.c 31 Oct 2005 16:46:17 -0000
@@ -78,6 +78,7 @@ int
createpacket(char *buffer,
int buflen,
unsigned int seq_num_count,
+ int version,
int debug)
{
fiid_obj_t obj_rmcp_hdr = NULL;
@@ -128,6 +129,7 @@ parsepacket(char *buffer,
const char *from,
unsigned int seq_num_count,
int verbose,
+ int version,
int debug)
{
fiid_obj_t obj_rmcp_hdr = NULL;
@@ -221,10 +223,11 @@ endresult(const char *progname,
int
main(int argc, char **argv)
{
- ipmi_ping_main(argc, argv,
- createpacket,
- parsepacket,
- latepacket,
- endresult);
+#ifndef NDEBUG
+ ipmi_ping_setup(argc, argv, "hVc:i:I:t:vd");
+#else
+ ipmi_ping_setup(argc, argv, "hVc:i:I:t:v");
+#endif
+ ipmi_ping_loop(createpacket, parsepacket, latepacket, endresult);
exit(1); /* NOT REACHED */
}
--
Albert Chu
address@hidden
Lawrence Livermore National Laboratory
----- Original Message -----
From: Anand Babu <address@hidden>
Date: Thursday, November 3, 2005 6:54 pm
Subject: Re: [Freeipmi-devel] ipmiping 2.0 patch
> ,----[ Albert Chu <address@hidden> ]
> | Does someone out there have a ipmi 2.0 machine[1] that could sanity
> | check this patch?? After applying and compiling, try:
> `----
> I cannot find the patch!
> --
> Anand Babu
> GPG Key ID: 0x62E15A31
> Blog [http://ab.freeshell.org]
> The GNU Operating System [http://www.gnu.org]
>