/*
*
* 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.
*
*/
#pragma ident "@(#)entLastChangeTime.c 1.1 03/02/24 SMI"
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.scalar.conf,v 1.5 2002/07/18 14:18:52 dts12 Exp $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "stdhdr.h"
#include "entLastChangeTime.h"
/* Fix for 4929068 */
static int creg;
/* End of Fix for 4929068 */
static void poll_entLastChangeTime();
static void send_entConfigChange_trap();
/* time between entConfigChange traps in 1/1000th of a second */
/* Fix for 4929068 */
/* End of Fix for 4929068 */
/* Fix for 4928832 */
/* Static storage for markers */
/* Pointers to storage for markers */
/* End of Fix for 4928832 */
/* 4929068 - structures for debugging throttling period waits
static struct timeval alarmTimeStorage;
static marker_t alarmTime;
*/
/*
* returns the value of sysUpTime in TimeTicks
*/
static unsigned long
{
return (unsigned long) netsnmp_marker_uptime(entLastChangeTime) &
0xFFFFFFFF;
}
/* Initializes the entLastChangeTime module */
void
init_entLastChangeTime(void)
{
{ 1, 3, 6, 1, 2, 1, 47, 1, 4, 1, 0 };
/* Fix for 4928832 */
/* End of Fix for 4928832 */
/* Fix for 4928828 */
/* End of Fix for 4928828 */
/* 4929068 - debug code
alarmTime = (marker_t)&alarmTimeStorage;
*/
if (!entLastChangeTime || !trapLastIssued)
return;
}
/* Fix for 4929068 */
/*
* alarm_entLastChangeTime - called after throttle period over,
* poll to see if anything was suppressed.
*/
/* 4929068 - debug code
atime_setMarker(alarmTime);
printf("alarm_entLastChangeTime, marker time = %d\n",
(netsnmp_marker_uptime(alarmTime) & 0xFFFFFFFF));
*/
}
/* End of Fix for 4929068 */
int
{
unsigned long t;
/*
* 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:
t = entLastChangeTime_TimeTicks();
(u_char *) & t, sizeof (t));
break;
default:
/*
* we should never get here, so this is a really bad error
*/
return (SNMP_ERR_GENERR);
}
return (SNMP_ERR_NOERROR);
}
void
{
}
static void
{
long diff;
/* don't issue trap if within throttle period */
return;
if (diff <= 0 ) {
/* there was a change since the last trap was issued */
/* Fix for 4929068 */
/*
* Set up alarm to wake up TRAP_THROTTLE_PERIOD_SECS seconds
* after the last trap was sent. If anything was suppressed,
* a trap will be sent.
*/
/* End of Fix for 4929068 */
}
}
static void
{
}