| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /*
- * Note: this file originally auto-generated by mib2c using
- * $
- */
-
- #include "pduMIB.h"
- #include <time.h>
-
- /** Initializes the pduMIB module */
- static int keep_running;
- RETSIGTYPE stop_server(int __attribute__((unused)) a) {
- keep_running = 0;
- }
-
- int main()
- {
- const char *app_name = "pduMIB";
- /* we are a subagent */
- netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
-
- /* initialize the agent library */
- init_agent(app_name);
-
- /* initialize your mib code here */
- init_pduMIB();
-
-
- /* pduMIB will be used to read pduMIB.conf files. */
- init_snmp("pduMIB");
- keep_running = 1;
- while(keep_running)
- {
- agent_check_and_process(1);/* block every 1 second */
- }
- /* at shutdown time */
- snmp_shutdown(app_name);
-
- /* deinitialize your mib code here */
-
- /* shutdown the agent library */
- shutdown_agent();
- return 0;
- }
|