/*
*
* U.S. Government Rights - Commercial software. Government users are subject
* to the Sun Microsystems, Inc. standard license agreement and applicable
* provisions of the FAR and its supplements.
*
*
* This distribution may include materials developed by third parties. Sun,
* Sun Microsystems, the Sun logo and Solaris are trademarks or registered
* trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
*
*/
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.scalar.conf,v 1.5 2002/07/18 14:18:52 dts12 Exp $
*/
#include <sys/systeminfo.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "sunSystem.h"
/* Initializes the sunSystem module */
void
init_sunSystem(void)
{
("motd",
("hostID",
("agentDescr",
("unixTime",
}
int
{
/*
* We are never called for a GETNEXT if it's registered as a
* "instance", as it's "magically" handled for us.
*/
/*
* a instance handler also only hands us one request at a time, so
* we don't need to loop over a list of requests; we'll only get one.
*/
case MODE_GET:
motd[0] = '\0';
}
break;
default:
/* we should never get here, so this is a really bad error */
return (SNMP_ERR_GENERR);
}
return (SNMP_ERR_NOERROR);
}
int
{
static unsigned int int_my_host_id;
static unsigned long int my_host_id;
/*
* We are never called for a GETNEXT if it's registered as a
* "instance", as it's "magically" handled for us.
*/
/*
* a instance handler also only hands us one request at a time, so
* we don't need to loop over a list of requests; we'll only get one.
*/
case MODE_GET:
if (sizeof(my_host_id) == sizeof(int)) {
(u_char *) &my_host_id,
sizeof (my_host_id));
} else {
(u_char *) &int_my_host_id,
sizeof (int_my_host_id));
}
break;
default:
/* we should never get here, so this is a really bad error */
return (SNMP_ERR_GENERR);
}
return (SNMP_ERR_NOERROR);
}
int
{
/*
* We are never called for a GETNEXT if it's registered as a
* "instance", as it's "magically" handled for us.
*/
/*
* a instance handler also only hands us one request at a time, so
* we don't need to loop over a list of requests; we'll only get one.
*/
case MODE_GET:
break;
default:
/* we should never get here, so this is a really bad error */
return (SNMP_ERR_GENERR);
}
return (SNMP_ERR_NOERROR);
}
int
{
long now_is_tv_sec;
/*
* We are never called for a GETNEXT if it's registered as a
* "instance", as it's "magically" handled for us.
*/
/*
* a instance handler also only hands us one request at a time, so
* we don't need to loop over a list of requests; we'll only get one.
*/
case MODE_GET:
(u_char *) &now_is_tv_sec,
sizeof (now_is_tv_sec));
break;
default:
/* we should never get here, so this is a really bad error */
return (SNMP_ERR_GENERR);
}
return (SNMP_ERR_NOERROR);
}