diff -burN net-snmp-5.7-clean/include/net-snmp/library/snmpHPILODomain.h net-snmp-5.7/include/net-snmp/library/snmpHPILODomain.h --- net-snmp-5.7-clean/include/net-snmp/library/snmpHPILODomain.h 1969-12-31 18:00:00.000000000 -0600 +++ net-snmp-5.7/include/net-snmp/library/snmpHPILODomain.h 2011-09-06 08:14:57.093327599 -0500 @@ -0,0 +1,128 @@ +#ifndef _SNMPHPILODOMAIN_H +#define _SNMPHPILODOMAIN_H + +#ifdef NETSNMP_TRANSPORT_HPILO_DOMAIN + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/* configurable in driver, default is 8 devices, but hpilo can support up to + * 32 devices + */ +#define MAXHPILODEVS 24 +#define HPILO_CCB "/dev/hpilo/d0ccb" +#define HPILO_THROTTLE 1000 +/* + * The SNMP over HPILO over IPv4 transport domain is identified by + * transportDomainStdIpv4 as defined in RFC 3419. + */ + +#define TRANSPORT_DOMAIN_HPILO_IP 1,3,6,1,2,1,100,1,232 +extern oid netsnmp_snmpHPILODomain[]; + + typedef struct netsnmp_ilo_data_s { + uint16_t from_ilo_seq; + uint16_t to_ilo_seq; + int idx; + } netsnmp_ilo_data; + + netsnmp_transport *netsnmp_ilo_transport(const char *instring, + size_t instring_len, + const char *default_target); + + /* + * "Constructor" for transport domain object. + */ + + void netsnmp_hpilo_ctor(void); + +#pragma pack(1) + +typedef struct { + uint16_t pktsize; + uint16_t seqno; + uint16_t cmdno; + uint16_t resv; +} pkt_hdr; + +#define HELLO_HELLO 1 +#define HELLO_GOODBYE 2 + +/* 0x0093 AgentX Session Setup Request Packet */ +typedef struct { + pkt_hdr hdr; + uint16_t op; + uint16_t flags; +} pkt_0093; + +/* 0x8093 AgentX Session Setup Response Packet */ +typedef struct { + pkt_hdr hdr; + uint32_t errcode; +} pkt_8093; + + +/* 0x0094 SNMP AgentX Packet Pass-Through request */ +#ifndef AGENTX_PKT_SIZE +#define AGENTX_PKT_SIZE 1472 // From SNMP MAX MESSAGE +#endif + + +// Packet pkt_0094 and pkt_8094 MUST have buffers aligned and same size. +typedef struct { + pkt_hdr hdr; + uint32_t pkt_0094_rsvd; // RESERVED FOR ILO ALIGNMENT + uint32_t agentx_req_len; // Actual size of the data packet + char agentx_req[AGENTX_PKT_SIZE]; +} pkt_0094; + +/* Packet 0x8094: SNMP AgentX Packet Pass-Through response */ +#define PKT_8094_ERR_NO_CCB 1 // Need to close device and start over +#define PKT_8094_ERR_NO_SOCKET 2 // No SNMP socket is available. +#define PKT_8094_ERR_SOCKET_ERR 3 // Socket Connection Lost +#define PKT_8094_ERR_INVALID_PKT 4 // Packet not a valid AgentX structure +#define PKT_8094_ERR_FUBAR 5 // We are Fouled Up Beyond All Repair. +// Start Over. + +/* errcode > 255: Error codes from RFC 2257 + ** + ** NOTE: If "errcode" less than 256, the contents of the agentx_resp + ** is undefined and is void. agentx_resp_len should be 0. + */ + +typedef struct { + pkt_hdr hdr; + uint32_t errcode; + uint32_t agentx_resp_len; // Actual size of the data packet + char agentx_resp[AGENTX_PKT_SIZE]; +} pkt_8094; + +/* 0x0095 iLO Log Event Packet */ +typedef struct { + pkt_hdr hdr; + uint16_t size; + uint16_t code; + uint32_t flags; + char data[0]; +} pkt_0095; + +/* 0x8095 iLO Log Event Response */ +typedef struct { + pkt_hdr hdr; + uint32_t errcode; + uint32_t eventno; +} pkt_8095; + +#pragma pack() + + +#ifdef __cplusplus +} +#endif +#endif /*NETSNMP_TRANSPORT_HPILO_DOMAIN */ + +#endif/*_SNMPHPILODOMAIN_H*/ diff -burN net-snmp-5.7-clean/include/net-snmp/net-snmp-config.h.in net-snmp-5.7/include/net-snmp/net-snmp-config.h.in --- net-snmp-5.7-clean/include/net-snmp/net-snmp-config.h.in 2011-07-01 17:35:46.000000000 -0500 +++ net-snmp-5.7/include/net-snmp/net-snmp-config.h.in 2011-07-07 09:08:50.714298877 -0500 @@ -1977,6 +1977,10 @@ /* This is defined if support for the IPv4Base transport domain is available. */ #undef NETSNMP_TRANSPORT_IPV4BASE_DOMAIN +/* This is defined if support for the HPILO transport domain is + available. */ +#undef NETSNMP_TRANSPORT_HPILO_DOMAIN + /* define this if the USM security module is available */ #undef NETSNMP_SECMOD_USM @@ -2275,6 +2279,10 @@ #define CONFIGURE_OPTIONS NETSNMP_CONFIGURE_OPTIONS +#ifdef NETSNMP_TRANSPORT_HPILO_DOMAIN +# define SNMP_TRANSPORT_HPILO_DOMAIN NETSNMP_TRANSPORT_HPILO_DOMAIN +#endif + #ifdef NETSNMP_TRANSPORT_UDP_DOMAIN # define SNMP_TRANSPORT_UDP_DOMAIN NETSNMP_TRANSPORT_UDP_DOMAIN #endif diff -burN net-snmp-5.7-clean/snmplib/snmp_transport.c net-snmp-5.7/snmplib/snmp_transport.c --- net-snmp-5.7-clean/snmplib/snmp_transport.c 2011-07-01 17:35:46.000000000 -0500 +++ net-snmp-5.7/snmplib/snmp_transport.c 2011-07-07 09:08:50.729298962 -0500 @@ -37,6 +37,9 @@ #ifdef NETSNMP_TRANSPORT_TLSTCP_DOMAIN #include #endif +#ifdef NETSNMP_TRANSPORT_HPILO_DOMAIN +#include +#endif #ifdef NETSNMP_TRANSPORT_STD_DOMAIN #include #endif diff -burN net-snmp-5.7.1-clean/snmplib/transports/snmpHPILODomain.c net-snmp-5.7.1/snmplib/transports/snmpHPILODomain.c --- net-snmp-5.7.1-clean/snmplib/transports/snmpHPILODomain.c 1969-12-31 18:00:00.000000000 -0600 +++ net-snmp-5.7.1/snmplib/transports/snmpHPILODomain.c 2012-03-27 13:27:50.000000000 -0500 @@ -0,0 +1,580 @@ +#include + +#include +#include +#include +#include +#include + +#include +#include + +#if HAVE_STRING_H +#include +#else +#include +#endif +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif + +#if HAVE_DMALLOC_H +#include +#endif + +#if HAVE_SYS_POLL_H +#include /* for convenience */ +#endif + +#if HAVE_SYSLOG_H +#include +#endif +#include +#include + +#include +#include +#include +#include + +#define AGENTX_RESPONSE ((u_char)18) + +oid netsnmp_snmpHPILODomain[] = { TRANSPORT_DOMAIN_HPILO_IP }; +static netsnmp_tdomain iloDomain; +char dbuf[40]; + + static char * +sprintf_stamp( char *sbuf) +{ + struct timeval tv; + + gettimeofday(&tv,NULL); + sprintf(sbuf, "%ld.%ld",tv.tv_sec,tv.tv_usec); + return sbuf; +} + + +static int go_bye(int fd) +{ + int len, bytes, rv, retries = 3; + struct pollfd fdwait; + pkt_0093 hello_pkt; + pkt_8093 rsp_pkt; + + memset(&hello_pkt, 0, sizeof(pkt_0093)); + memset(&rsp_pkt, 0, sizeof(pkt_8093)); + + len = hello_pkt.hdr.pktsize = sizeof(pkt_0093); + hello_pkt.hdr.seqno = 0; + hello_pkt.hdr.cmdno = 0x0093; + hello_pkt.hdr.resv = 0; + + DEBUGMSGTL(("domain:ilo", "Send HELLO_GOODBYE %s\n", "hpiLO" )); + + hello_pkt.op = HELLO_GOODBYE; + hello_pkt.flags = 4; + + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Request Packet",(unsigned char *)&hello_pkt,len); + bytes = write(fd, &hello_pkt, len); + /* sleep for 1 ms so that we don't clog the device */ + usleep(1000); + if (bytes < len) { + snmp_log(LOG_ERR, "Failed: Writing SNMP_HELLO_BYE send=%d errno =%d\n", bytes, errno); + return (bytes); + } + while (retries) { + retries--; + memset(&fdwait, 0, sizeof(struct pollfd)); + fdwait.fd = fd; + fdwait.events |= (POLLIN); + fdwait.revents = 0; + + rv = poll(&fdwait, 1, (10 * 1000) ); + + switch (rv) { + case 0: // TIME OUT + DEBUGMSGTL(("domain:ilo", + "Timeout waiting for SNMP_HELLO response\n")); + if (retries == 0) { + snmp_log(LOG_ERR, "Failed: Timed out" + "waiting for SNMP_HELLO response\n"); + return -1; + } + break; + + case 1: // Got an event + if (fdwait.revents & (POLLIN)) { + len = sizeof(pkt_8093); + + if ((bytes = read(fd, &rsp_pkt, len)) < 0) { + /* If we get an err on the read just return errno should be set */ + snmp_log(LOG_ERR, "Failed: read() error=%d\n",errno); + return -1; + } + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Response Packet",(unsigned char *)&rsp_pkt,bytes); + + /* return error if short packet should set errno */ + if (bytes < (int)sizeof(pkt_8093)) { + snmp_log(LOG_ERR, "Failed: read() < len %d\n",bytes); + return -1; + } + /* only respond to our sequence number */ + if (rsp_pkt.hdr.seqno == hello_pkt.hdr.seqno) + retries = 0; + else + DEBUGMSGTL(("domain:ilo","Throw away old Hello_response\n" )); + + /* check if there is an errorcode in the response */ + if ( rsp_pkt.errcode != 0) { + snmp_log(LOG_ERR, "Failed: read() returned err=%d\n", rsp_pkt.errcode); + return -1; + } + } + break; + + default: + if (errno != EINTR) { + snmp_log(LOG_ERR, "Failed: poll() error=%d\n",errno); + return -1; + } + DEBUGMSGTL(("domain:ilo", + "EINTR while waiting for SNMP_HELLO response\n")); + break; + } + } + return 0; +} + +static int do_hello(int fd) +{ + int len, bytes, rv, retries = 3; + struct pollfd fdwait; + pkt_0093 hello_pkt; + pkt_8093 rsp_pkt; + + memset(&hello_pkt, 0, sizeof(pkt_0093)); + memset(&rsp_pkt, 0, sizeof(pkt_8093)); + + len = hello_pkt.hdr.pktsize = sizeof(pkt_0093); + hello_pkt.hdr.seqno = 0; + hello_pkt.hdr.cmdno = 0x0093; + hello_pkt.hdr.resv = 0; + + DEBUGMSGTL(("domain:ilo", "Send HELLO_HELLO %s\n", "hpiLO" )); + + hello_pkt.op = HELLO_HELLO; + if ((hello_pkt.flags = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, + NETSNMP_DS_HPILODOMAIN_IML)) == SNMPERR_GENERR) + hello_pkt.flags = 0; + + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Request Packet",(unsigned char *)&hello_pkt,len); + bytes = write(fd, &hello_pkt, len); + /* sleep for 1 ms so that we don't clog the device */ + usleep(1000); + if (bytes < len) { + snmp_log(LOG_ERR, "Failed: Writing HPILO SNMP_HELLO errno =%d\n",errno); + } + while (retries) { + retries--; + memset(&fdwait, 0, sizeof(struct pollfd)); + fdwait.fd = fd; + fdwait.events |= (POLLIN); + fdwait.revents = 0; + + rv = poll(&fdwait, 1, (10 * 1000) ); + + switch (rv) { + case 0: // TIME OUT + DEBUGMSGTL(("domain:ilo", + "Timeout waiting for SNMP_HELLO response\n")); + if (retries == 0) { + snmp_log(LOG_ERR, "Failed: Timed out" + "waiting for SNMP_HELLO response\n"); + return -1; + } + break; + + case 1: // Got an event + if (fdwait.revents & (POLLIN)) { + len = sizeof(pkt_8093); + + if ((bytes = read(fd, &rsp_pkt, len)) < 0) { + /* If we get an err on the read just return errno should be set */ + snmp_log(LOG_ERR, "Failed: read() error=%d\n",errno); + return -1; + } + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Response Packet",(unsigned char *)&rsp_pkt,bytes); + /* return error if short packet should set errno */ + if (bytes < (int)sizeof(pkt_8093)) { + snmp_log(LOG_ERR, "Failed: read() < len %d\n",bytes); + return -1; + } + /* only respond to our sequence number */ + if (rsp_pkt.hdr.seqno == hello_pkt.hdr.seqno) + retries = 0; + else + DEBUGMSGTL(("domain:ilo","Throw away old Hello_response\n" )); + + /* check if there is an errorcode in the response */ + if ( rsp_pkt.errcode != 0) { + snmp_log(LOG_ERR, "Failed: read()data)); + if (t->data) { + netsnmp_ilo_data *data = (netsnmp_ilo_data*)t->data; + buf = (char*)malloc(SNMP_MAXBUF_MEDIUM); + if (!buf) + return strdup("HPILO"); + snprintf(buf, SNMP_MAXBUF_MEDIUM, "HPILO:/dev/hpilo/d0ccb%d", data->idx); + DEBUGMSGTL(("domain:ilo"," formatted:=%s\n",buf)); + return buf; + } + return strdup("HPILO"); +} + + static int +netsnmp_ilo_recv(netsnmp_transport *t, void *buf, int size, + void **opaque, int *olength) +{ + int rv; + char data_in[(sizeof(pkt_8094))]; + pkt_8094 *pkt; + netsnmp_ilo_data *ilo_data; + int rc = 0; + + rv = errno = 0; + + if ((t != NULL) && (t->sock >= 0)) { + DEBUGMSGTL(("domain:ilo","ilo_recv on fd %d. data=%p\n", + t->sock, t->data)); + ilo_data = (netsnmp_ilo_data*)t->data; + + rc = read(t->sock, &data_in[0], (sizeof(pkt_8094))); + DEBUGMSGTL(("domain:ilo","read %d bytes from ilo fd %d\n",rc,t->sock)); + if (rc > 0) { + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Recv Packet",(unsigned char *)&data_in,rc); + pkt = (pkt_8094 *)&data_in[0]; + switch (pkt->hdr.cmdno) { + case 0x8093: + errno = pkt->errcode; + rc = 0; + break; + case 0x0095: + { + /* hack to allow ilo to use this connection to log + * internal iLO Message Log events (IML) to syslog */ + pkt_0095 *log; + pkt_8095 *resp; + int resp_len = sizeof(pkt_8095); + log = (pkt_0095 *)&data_in[0]; + log->data[log->size] = 0; + + syslog( LOG_ALERT, "%s", &log->data[0]); + + resp = (pkt_8095 *)&data_in[0]; + resp->hdr.cmdno = 0x8095; + resp->hdr.pktsize = resp_len; + resp->hdr.resv = 0; + ilo_data->from_ilo_seq++; + resp->hdr.seqno = ilo_data->from_ilo_seq; + resp->errcode = 0; + resp->eventno = 0; + + DEBUGMSGTL(("domain:ilo", "%s ", sprintf_stamp(dbuf))); + dump_chunk("domain:ilo", "Send Packet", + (unsigned char *)resp, resp_len); + while (((rc = write(t->sock, (void *)resp, resp_len)) + < 0) && (errno == EBUSY)) + usleep(100); + errno = 0; + t->flags |= NETSNMP_TRANSPORT_FLAG_EMPTY_PKT; + rc = 0; + } + break; + case 0x8094: + errno = pkt->errcode; + default: + if (pkt->hdr.pktsize > rc) { + rc = -1; + errno = EAGAIN; + } else { + memcpy(buf, &pkt->agentx_resp[0], + ((size < pkt->agentx_resp_len) + ?(size):(pkt->agentx_resp_len)) ); + rc = pkt->agentx_resp_len; + ilo_data->to_ilo_seq = pkt->hdr.seqno; + } + } + if (errno != 0) { + rc = -1; + DEBUGMSGTL(("domain:ilo","HPILO Response Packet returned:" + " %d\n", errno)); + } + return rc; + } else { + if (errno == EAGAIN) { + t->flags |= NETSNMP_TRANSPORT_FLAG_EMPTY_PKT; + rc = 0; + } + } + } else + rc = -1; + + DEBUGMSGTL(("netsnmp_ilo", "read on iloin got %d bytes\n", rc)); + + return rc; +} + + + + static int +netsnmp_ilo_send(netsnmp_transport *t, void *buf, int size, + void **opaque, int *olength) +{ + int len; + pkt_0094 pkt; + netsnmp_ilo_data *ilo_data; + unsigned char *header; + int rc = -1; + + + if (size > AGENTX_PKT_SIZE) { + errno = EMSGSIZE; + return rc; + } + if (buf == NULL) { + errno = EFAULT; + return rc; + } + + if ((t != NULL) && (t->sock >= 0) && (buf != NULL)) { + + rc = 0; + header = buf; + DEBUGMSGTL(("domain:ilo","ilo_send on sock %d. data=%p\n", + t->sock, t->data)); + + ilo_data = (netsnmp_ilo_data*)t->data; + + memset(&pkt, 0, sizeof(pkt_0094)); + memcpy(&pkt.agentx_req[0], buf, size); + pkt.agentx_req_len = size; + + /* Header pkt_0094_rsvd Request */ + len = sizeof(pkt_hdr) + (2 * sizeof(uint32_t)) + size; + + ilo_data->to_ilo_seq = pkt.hdr.seqno; + + pkt.hdr.pktsize = len; + ilo_data->from_ilo_seq++; + pkt.hdr.seqno = ilo_data->from_ilo_seq; + /* Snoop outgoing message and chagne to response type if aresponse */ + if (header[1] == AGENTX_RESPONSE ) + pkt.hdr.cmdno = 0x8094; + else + pkt.hdr.cmdno = 0x0094; + pkt.hdr.resv = 0; + + DEBUGMSGTL(("domain:ilo", "%s ",sprintf_stamp(dbuf))); + dump_chunk("domain:ilo","Send Packet",(unsigned char *)&pkt,len); + while (((rc = write(t->sock, &pkt, len)) < 0) && (errno == EBUSY)) + usleep(100); + + if ((rc >= 0) && (rc < len)) { + DEBUGMSGTL(("domain:ilo","netsnmp_ilo_send short packet = %d\n", + rc)); + errno = ECOMM; + rc = -1; + } + } + + if (rc < 0) + DEBUGMSGTL(("domain:ilo","netsnmp_ilo_send error %d\n", errno)); + else + DEBUGMSGTL(("domain:ilo","netsnmp_ilo_send sent %d\n", rc)); + return rc; +} + + static int +netsnmp_ilo_close(netsnmp_transport *t) +{ + int len, rc; + + DEBUGMSGTL(("domain:ilo","ilo_close fd %d. data=%p\n", t->sock, t->data)); + + if (t->sock >= 0) { + len = go_bye(t->sock); + rc = close(t->sock); + t->sock = -1; + } else + rc = -1; + return (rc); +} + + static int +netsnmp_ilo_accept(netsnmp_transport *t) +{ + DEBUGMSGTL(("domain:ilo"," accept data=%p\n", t->data)); + /* nothing to do here */ + return 0; +} + +/* + * Open a HP iLO based transport for SNMP AgentX. + */ + + netsnmp_transport * +netsnmp_ilo_transport(const char *instring, size_t instring_len, + const char *default_target) +{ + netsnmp_transport *t; + netsnmp_ilo_data *ilo_data; + + int max_ccb_fd; + char dev[256] = "/sys/module/hpilo/parameters/max_ccb"; + int start = -1; + + struct stat buf; + + DEBUGMSGTL(("domain:ilo", "ilo_transport %s\n", "hpiLO" )); + + t = (netsnmp_transport *) malloc(sizeof(netsnmp_transport)); + if (t == NULL) { + snmp_log(LOG_ERR, "snmpHPILODomain: malloc netsnmp_transport failed"); + return NULL; + } + memset(t, 0, sizeof(netsnmp_transport)); + + t->sock = -1; + t->domain = netsnmp_snmpHPILODomain; + t->domain_length = + sizeof(netsnmp_snmpHPILODomain) / sizeof(netsnmp_snmpHPILODomain[0]); + + if ((max_ccb_fd = open(dev,O_RDONLY)) >= 0) + if ( read(max_ccb_fd, dev, 256) > 0) { + start = strtol(dev, NULL, 10) - 1; + close(max_ccb_fd); + } + + if (start == -1) + start = MAXHPILODEVS - 1; + + sprintf(dev,"%s%d", HPILO_CCB, start); + while ((start > 0) && (stat(dev, &buf) < 0)) { + start = start - 8; + sprintf(dev,"%s%d", HPILO_CCB, start); + } + + while (start >= 0 && ((t->sock = open(dev, O_RDWR|O_EXCL)) == -1)) { + sprintf(dev,"%s%d", HPILO_CCB, --start); + } + + if (start < 0) { + netsnmp_transport_free(t); + snmp_log(LOG_ERR, "Failed: no available HP iLO devicess\n"); + return NULL; + } + + DEBUGMSGTL(("domain:ilo", + "Opened %s, fd = %d\n",dev,t->sock)); + t->flags = NETSNMP_TRANSPORT_FLAG_STREAM; + + /* Give the iLog a chance to process the open */ + usleep(HPILO_THROTTLE); + + if (do_hello(t->sock) <0 ) { + netsnmp_ilo_close(t); + netsnmp_transport_free(t); + return NULL; + } + + ilo_data = SNMP_MALLOC_TYPEDEF(netsnmp_ilo_data); + if (!ilo_data) { + snmp_log(LOG_ERR, "snmpHPILODomain: malloc netsnmp_ilo_data failed"); + netsnmp_transport_free(t); + return NULL; + } + memset(ilo_data, 0, sizeof(netsnmp_ilo_data)); + + t->data = ilo_data; + t->data_length = sizeof(netsnmp_ilo_data); + DEBUGMSGTL(("domain:std","parent. data=%p\n", t->data)); + + /* + * Message size is not limited by this transport (hence msgMaxSize + * is equal to the maximum legal size of an SNMP message). + */ + + t->msgMaxSize = AGENTX_PKT_SIZE; /*might need to adjust */ + t->f_recv = netsnmp_ilo_recv; + t->f_send = netsnmp_ilo_send; + t->f_close = netsnmp_ilo_close; + t->f_accept = netsnmp_ilo_accept; + t->f_fmtaddr = netsnmp_ilo_fmtaddr; + + + return t; +} + + netsnmp_transport * +netsnmp_ilo_create_tstring(const char *instring, int local, + const char *default_target) +{ + + return netsnmp_ilo_transport(instring, strlen(instring), default_target); +} + + netsnmp_transport * +netsnmp_ilo_create_ostring(const u_char * o, size_t o_len, int local) +{ + return netsnmp_ilo_transport((const char*)o, o_len, NULL); +} + + void +netsnmp_hpilo_ctor(void) +{ + iloDomain.name = netsnmp_snmpHPILODomain; + iloDomain.name_length = sizeof(netsnmp_snmpHPILODomain) / sizeof(oid); + iloDomain.prefix = (const char **)calloc(2, sizeof(char *)); + iloDomain.prefix[0] = "hpilo"; + + iloDomain.f_create_from_tstring_new = netsnmp_ilo_create_tstring; + iloDomain.f_create_from_ostring = netsnmp_ilo_create_ostring; + + netsnmp_tdomain_register(&iloDomain); +} diff -burN net-snmp-5.7.1/include/net-snmp/library/default_store.h net-snmp-5.7.1-multiple/include/net-snmp/library/default_store.h --- net-snmp-5.7.1/include/net-snmp/library/default_store.h 2012-05-17 10:04:52.000000000 -0500 +++ net-snmp-5.7.1-multiple/include/net-snmp/library/default_store.h 2012-05-14 15:52:00.000000000 -0500 @@ -117,6 +117,7 @@ #define NETSNMP_DS_SSHDOMAIN_SOCK_GROUP 13 #define NETSNMP_DS_LIB_TIMEOUT 14 #define NETSNMP_DS_LIB_RETRIES 15 +#define NETSNMP_DS_HPILODOMAIN_IML 16 #define NETSNMP_DS_LIB_MAX_INT_ID 48 /* match NETSNMP_DS_MAX_SUBIDS */ /*