void init_snmpEngine(void) { oid reg[] = { 1, 3, 6, 1, 6, 3, 10, 3, 1, 1 }; REGISTER_SYSOR_ENTRY(reg, "The SNMP Management Architecture MIB."); register_snmpEngine_scalars(); }
void init_ip(void) { /* * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("mibII/ip", ip_variables, variable3, ip_variables_oid); if (++ip_module_count == 2) REGISTER_SYSOR_ENTRY(ip_module_oid, "The MIB module for managing IP and ICMP implementations"); /* * for speed optimization, we call this now to do the lookup */ #ifdef IPSTAT_SYMBOL auto_nlist(IPSTAT_SYMBOL, 0, 0); #endif #ifdef IP_FORWARDING_SYMBOL auto_nlist(IP_FORWARDING_SYMBOL, 0, 0); #endif #ifdef TCP_TTL_SYMBOL auto_nlist(TCP_TTL_SYMBOL, 0, 0); #endif #ifdef MIB_IPCOUNTER_SYMBOL auto_nlist(MIB_IPCOUNTER_SYMBOL, 0, 0); #endif #ifdef solaris2 init_kernel_sunos5(); #endif }
void init_ip(void) { netsnmp_handler_registration *reginfo; /* * register ourselves with the agent as a group of scalars... */ DEBUGMSGTL(("mibII/ip", "Initialising IP group\n")); reginfo = netsnmp_create_handler_registration("ip", ip_handler, ip_oid, OID_LENGTH(ip_oid), HANDLER_CAN_RONLY); netsnmp_register_scalar_group(reginfo, IPFORWARDING, IPROUTEDISCARDS); /* * .... with a local cache * (except for HP-UX 11, which extracts objects individually) */ #ifndef hpux11 netsnmp_inject_handler( reginfo, netsnmp_get_cache_handler(IP_STATS_CACHE_TIMEOUT, ip_load, ip_free, ip_oid, OID_LENGTH(ip_oid))); #endif /* * register (using the old-style API) to handle the IP tables */ REGISTER_MIB("mibII/ipaddr", ipaddr_variables, variable1, ipaddr_variables_oid); REGISTER_MIB("mibII/iproute", iproute_variables, variable1, iproute_variables_oid); REGISTER_MIB("mibII/ipmedia", ipmedia_variables, variable1, ipmedia_variables_oid); if (++ip_module_count == 2) REGISTER_SYSOR_ENTRY(ip_module_oid, "The MIB module for managing IP and ICMP implementations"); /* * for speed optimization, we call this now to do the lookup */ #ifdef IPSTAT_SYMBOL auto_nlist(IPSTAT_SYMBOL, 0, 0); #endif #ifdef IP_FORWARDING_SYMBOL auto_nlist(IP_FORWARDING_SYMBOL, 0, 0); #endif #ifdef TCP_TTL_SYMBOL auto_nlist(TCP_TTL_SYMBOL, 0, 0); #endif #ifdef MIB_IPCOUNTER_SYMBOL auto_nlist(MIB_IPCOUNTER_SYMBOL, 0, 0); #endif #ifdef solaris2 init_kernel_sunos5(); #endif }
void init_snmpMPDStats_5_5 (void) { netsnmp_handler_registration *s = netsnmp_create_handler_registration ("snmpMPDStats", NULL, snmpMPDStats, OID_LENGTH (snmpMPDStats), HANDLER_CAN_RONLY); if (s && NETSNMP_REGISTER_STATISTIC_HANDLER (s, 1, MPD) == MIB_REGISTERED_OK) { REGISTER_SYSOR_ENTRY (snmpMPDCompliance, "The MIB for Message Processing and Dispatching."); snmpMPDStats_reg = s; } }
/* * init_snmpNotifyTable(): * Initialization routine. This is called when the agent starts up. * At a minimum, registration of your variables should take place here. */ void init_snmpNotifyTable(void) { DEBUGMSGTL(("snmpNotifyTable", "initializing... ")); /* * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("snmpNotifyTable", snmpNotifyTable_variables, variable2, snmpNotifyTable_variables_oid); /* * register our config handler(s) to deal with registrations */ snmpd_register_config_handler("snmpNotifyTable", parse_snmpNotifyTable, NULL, NULL); /* * we need to be called back later to store our data */ snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, store_snmpNotifyTable, NULL); #ifndef DISABLE_SNMPV1 snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP1, send_notifications, NULL); #endif snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP2, send_notifications, NULL); snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, notifyTable_register_notifications, NULL); snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, notifyTable_unregister_notifications, NULL); /* * place any other initialization junk you need here */ REGISTER_SYSOR_ENTRY(snmpNotifyFullCompliance, "The MIB modules for managing SNMP Notification, plus filtering."); DEBUGMSGTL(("snmpNotifyTable", "done.\n")); }
void init_tcp(void) { netsnmp_handler_registration *reginfo; int rc; /* * register ourselves with the agent as a group of scalars... */ DEBUGMSGTL(("mibII/tcpScalar", "Initialising TCP scalar group\n")); reginfo = netsnmp_create_handler_registration("tcp", tcp_handler, tcp_oid, OID_LENGTH(tcp_oid), HANDLER_CAN_RONLY); rc = netsnmp_register_scalar_group(reginfo, TCPRTOALGORITHM, TCPOUTRSTS); if (rc != SNMPERR_SUCCESS) return; /* * .... with a local cache * (except for HP-UX 11, which extracts objects individually) */ #ifndef hpux11 netsnmp_inject_handler( reginfo, netsnmp_get_cache_handler(TCP_STATS_CACHE_TIMEOUT, tcp_load, tcp_free, tcp_oid, OID_LENGTH(tcp_oid))); #endif REGISTER_SYSOR_ENTRY(tcp_module_oid, "The MIB module for managing TCP implementations"); #if !defined(_USE_FIRST_PROTOCOL) #ifdef TCPSTAT_SYMBOL auto_nlist(TCPSTAT_SYMBOL, 0, 0); #endif #ifdef TCP_SYMBOL auto_nlist(TCP_SYMBOL, 0, 0); #endif #ifdef freebsd4 hz = sysconf(_SC_CLK_TCK); /* get ticks/s from system */ #endif #ifdef solaris2 init_kernel_sunos5(); #endif #endif }
void init_tunnel(void) { REGISTER_SYSOR_ENTRY(sysORTable_reg, "RFC 2667 TUNNEL-MIB implementation for " "Linux 2.2.x kernels."); /* * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("tunnel", tunnel_variables, variable4, tunnel_variables_oid); snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_SHUTDOWN, term_tunnel, NULL); tunnels = NULL; }
void init_udp(void) { netsnmp_handler_registration *reginfo; int rc; /* * register ourselves with the agent as a group of scalars... */ DEBUGMSGTL(("mibII/udpScalar", "Initialising UDP scalar group\n")); reginfo = netsnmp_create_handler_registration("udp", udp_handler, udp_oid, OID_LENGTH(udp_oid), HANDLER_CAN_RONLY); rc = netsnmp_register_scalar_group(reginfo, UDPINDATAGRAMS, UDPOUTDATAGRAMS); if (rc != SNMPERR_SUCCESS) return; /* * .... with a local cache * (except for HP-UX 11, which extracts objects individually) */ #ifndef hpux11 netsnmp_inject_handler( reginfo, netsnmp_get_cache_handler(UDP_STATS_CACHE_TIMEOUT, udp_load, udp_free, udp_oid, OID_LENGTH(udp_oid))); #endif REGISTER_SYSOR_ENTRY(udp_module_oid, "The MIB module for managing UDP implementations"); #if !defined(_USE_PERFSTAT_PROTOCOL) #ifdef UDPSTAT_SYMBOL auto_nlist(UDPSTAT_SYMBOL, 0, 0); #endif #ifdef UDB_SYMBOL auto_nlist(UDB_SYMBOL, 0, 0); #endif #ifdef solaris2 init_kernel_sunos5(); #endif #endif }
void init_udp(void) { /* * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("mibII/udp", udp_variables, variable3, udp_variables_oid); #ifdef BUILD_SNMP_SYSOR_MIB REGISTER_SYSOR_ENTRY(udp_module_oid, "The MIB module for managing UDP implementations"); #endif /* BUILD_SNMP_SYSOR_MIB */ #ifdef UDPSTAT_SYMBOL auto_nlist(UDPSTAT_SYMBOL, 0, 0); #endif #ifdef UDB_SYMBOL auto_nlist(UDB_SYMBOL, 0, 0); #endif #ifdef solaris2 init_kernel_sunos5(); #endif }
void init_system_mib(void) { char tmpbuf[1024]; #ifdef HAVE_UNAME struct utsname utsName; uname(&utsName); snprintf(version_descr, sizeof(version_descr), "%s %s %s %s %s", utsName.sysname, utsName.nodename, utsName.release, utsName.version, utsName.machine); version_descr[ sizeof(version_descr)-1 ] = 0; #else #if HAVE_EXECV struct extensible extmp; /* * set default values of system stuff */ sprintf(extmp.command, "%s -a", UNAMEPROG); /* * setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strncpy(version_descr, extmp.output, sizeof(version_descr)); version_descr[sizeof(version_descr) - 1] = 0; version_descr[strlen(version_descr) - 1] = 0; /* chomp new line */ #else #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) windowsOSVersionString(version_descr, sizeof(version_descr)); #else strcpy(version_descr, "unknown"); #endif #endif #endif #ifdef HAVE_GETHOSTNAME gethostname(sysName, sizeof(sysName)); #else #ifdef HAVE_UNAME strncpy(sysName, utsName.nodename, sizeof(sysName)); #else #if defined (HAVE_EXECV) && !defined (mingw32) sprintf(extmp.command, "%s -n", UNAMEPROG); /* * setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strncpy(sysName, extmp.output, sizeof(sysName)); sysName[strlen(sysName) - 1] = 0; /* chomp new line */ #else strcpy(sysName, "unknown"); #endif /* HAVE_EXECV */ #endif /* HAVE_UNAME */ #endif /* HAVE_GETHOSTNAME */ #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) { HKEY hKey; /* Default sysContact is the registered windows user */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { char registeredOwner[256] = ""; DWORD registeredOwnerSz = 256; if (RegQueryValueEx(hKey, "RegisteredOwner", NULL, NULL, (LPBYTE)registeredOwner, ®isteredOwnerSz) == ERROR_SUCCESS) { strcpy(sysContact, registeredOwner); } RegCloseKey(hKey); } } #endif /* default sysObjectID */ // Modified by Gavin Lin, 2008/10/30 // memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid)); // sysObjectIDLength = version_sysoid_len; #ifdef CONFIG_MODEL_LRTXXX /* purpose : 0012697 author : Gavin.Lin date : 2010-06-22 */ /* description : Customer requirements */ kd_doCommand("VERSION MODEL", CMD_PRINT, ASH_DO_NOTHING, tmpbuf); if (!strcmp("LRT214", tmpbuf)) { memcpy(sysObjectID, nk_sysobjectid_214, nk_sysobjectid_len * sizeof(oid)); } if (!strcmp("LRT224", tmpbuf)) { memcpy(sysObjectID, nk_sysobjectid_224, nk_sysobjectid_len * sizeof(oid)); } #else memcpy(sysObjectID, nk_sysobjectid, nk_sysobjectid_len * sizeof(oid)); #endif sysObjectIDLength = nk_sysobjectid_len; /* * register ourselves with the agent to handle our mib tree */ REGISTER_MIB("mibII/system", system_variables, variable1, system_variables_oid); if (++system_module_count == 3) REGISTER_SYSOR_ENTRY(system_module_oid, "The MIB module for SNMPv2 entities"); sysContactSet = sysLocationSet = sysNameSet = 0; /* * register our config handlers */ snmpd_register_config_handler("sysdescr", system_parse_config_sysdescr, NULL, "description"); snmpd_register_config_handler("syslocation", system_parse_config_sysloc, NULL, "location"); snmpd_register_config_handler("syscontact", system_parse_config_syscon, NULL, "contact-name"); snmpd_register_config_handler("sysname", system_parse_config_sysname, NULL, "node-name"); snmpd_register_config_handler("psyslocation", system_parse_config_sysloc, NULL, NULL); snmpd_register_config_handler("psyscontact", system_parse_config_syscon, NULL, NULL); snmpd_register_config_handler("psysname", system_parse_config_sysname, NULL, NULL); snmpd_register_config_handler("sysservices", system_parse_config_sysServices, NULL, "NUMBER"); snmpd_register_config_handler("sysobjectid", system_parse_config_sysObjectID, NULL, "OID"); snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, system_store, NULL); }
void init_system_mib(void) { #ifdef HAVE_UNAME struct utsname utsName; uname(&utsName); sprintf(version_descr, "%s %s %s %s %s", utsName.sysname, utsName.nodename, utsName.release, utsName.version, utsName.machine); #else #if HAVE_EXECV struct extensible extmp; /* set default values of system stuff */ sprintf(extmp.command,"%s -a",UNAMEPROG); /* setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strncpy(version_descr,extmp.output, sizeof(version_descr)); version_descr[strlen(version_descr)-1] = 0; /* chomp new line */ #else #ifdef __ECOS sysServicesConfiged = 1; // May as well return the dummy value #else #endif // !__ECOS #endif // !HAVE_EXECV #endif // !HAVE_UNAME #ifdef HAVE_GETHOSTNAME gethostname(sysName,sizeof(sysName)); #else #ifdef HAVE_UNAME strncpy(sysName,utsName.nodename,sizeof(sysName)); #else #if HAVE_EXECV sprintf(extmp.command,"%s -n",UNAMEPROG); /* setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strncpy(sysName,extmp.output, sizeof(sysName)); sysName[strlen(sysName)-1] = 0; /* chomp new line */ #endif /* HAVE_EXECV */ #endif /* HAVE_UNAME */ #endif /* HAVE_GETHOSTNAME */ /* register ourselves with the agent to handle our mib tree */ REGISTER_MIB("mibII/system", system_variables, variable2, \ system_variables_oid); if ( ++system_module_count == 3 ) REGISTER_SYSOR_ENTRY( system_module_oid, "The MIB module for SNMPv2 entities"); /* register our config handlers */ snmpd_register_config_handler("syslocation", system_parse_config_sysloc, NULL, "location"); snmpd_register_config_handler("syscontact", system_parse_config_syscon, NULL,"contact-name"); snmpd_register_config_handler("sysservices", system_parse_config_sysServices, NULL,"NUMBER"); }
void init_system_mib(void) { #ifdef HAVE_UNAME struct utsname utsName; uname(&utsName); snprintf(version_descr, sizeof(version_descr), "%s %s %s %s %s", utsName.sysname, utsName.nodename, utsName.release, utsName.version, utsName.machine); version_descr[ sizeof(version_descr)-1 ] = 0; #else #if HAVE_EXECV struct extensible extmp; /* * set default values of system stuff */ if (asprintf(&extmp.command, "%s -a", UNAMEPROG) < 0) extmp.command = NULL; /* * setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strlcpy(version_descr, extmp.output, sizeof(version_descr)); if (strlen(version_descr) >= 1) version_descr[strlen(version_descr) - 1] = 0; /* chomp new line */ #else #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) windowsOSVersionString(version_descr, sizeof(version_descr)); #else strcpy(version_descr, "unknown"); #endif #endif #endif #ifdef HAVE_GETHOSTNAME gethostname(sysName, sizeof(sysName)); #else #ifdef HAVE_UNAME strlcpy(sysName, utsName.nodename, sizeof(sysName)); #else #if defined (HAVE_EXECV) && !defined (mingw32) if (asprintf(&extmp.command, "%s -n", UNAMEPROG) < 0) extmp.command = NULL; /* * setup defaults */ extmp.type = EXECPROC; extmp.next = NULL; exec_command(&extmp); strlcpy(sysName, extmp.output, sizeof(sysName)); if (strlen(sysName) >= 1) sysName[strlen(sysName) - 1] = 0; /* chomp new line */ #else strcpy(sysName, "unknown"); #endif /* HAVE_EXECV */ #endif /* HAVE_UNAME */ #endif /* HAVE_GETHOSTNAME */ #if (defined (WIN32) && defined (HAVE_WIN32_PLATFORM_SDK)) || defined (mingw32) { HKEY hKey; /* Default sysContact is the registered windows user */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { char registeredOwner[256] = ""; DWORD registeredOwnerSz = 256; if (RegQueryValueEx(hKey, "RegisteredOwner", NULL, NULL, (LPBYTE)registeredOwner, ®isteredOwnerSz) == ERROR_SUCCESS) { strlcpy(sysContact, registeredOwner, sizeof(sysContact)); } RegCloseKey(hKey); } } #endif /* default sysObjectID */ memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid)); sysObjectIDByteLength = version_sysoid_len * sizeof(oid); { const oid sysDescr_oid[] = { 1, 3, 6, 1, 2, 1, 1, 1 }; static netsnmp_watcher_info sysDescr_winfo; netsnmp_register_watched_scalar( netsnmp_create_handler_registration( "mibII/sysDescr", NULL, sysDescr_oid, OID_LENGTH(sysDescr_oid), HANDLER_CAN_RONLY), netsnmp_init_watcher_info(&sysDescr_winfo, version_descr, 0, ASN_OCTET_STR, WATCHER_SIZE_STRLEN)); } { const oid sysObjectID_oid[] = { 1, 3, 6, 1, 2, 1, 1, 2 }; static netsnmp_watcher_info sysObjectID_winfo; netsnmp_register_watched_scalar( netsnmp_create_handler_registration( "mibII/sysObjectID", NULL, sysObjectID_oid, OID_LENGTH(sysObjectID_oid), HANDLER_CAN_RONLY), netsnmp_init_watcher_info6( &sysObjectID_winfo, sysObjectID, 0, ASN_OBJECT_ID, WATCHER_MAX_SIZE | WATCHER_SIZE_IS_PTR, MAX_OID_LEN, &sysObjectIDByteLength)); } { const oid sysUpTime_oid[] = { 1, 3, 6, 1, 2, 1, 1, 3 }; netsnmp_register_scalar( netsnmp_create_handler_registration( "mibII/sysUpTime", handle_sysUpTime, sysUpTime_oid, OID_LENGTH(sysUpTime_oid), HANDLER_CAN_RONLY)); } { const oid sysContact_oid[] = { 1, 3, 6, 1, 2, 1, 1, 4 }; static netsnmp_watcher_info sysContact_winfo; #ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysContact", sysContact_oid, OID_LENGTH(sysContact_oid), HANDLER_CAN_RWRITE, &sysContactSet), netsnmp_init_watcher_info( &sysContact_winfo, sysContact, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #else /* !NETSNMP_NO_WRITE_SUPPORT */ netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysContact", sysContact_oid, OID_LENGTH(sysContact_oid), HANDLER_CAN_RONLY, &sysContactSet), netsnmp_init_watcher_info( &sysContact_winfo, sysContact, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ } { const oid sysName_oid[] = { 1, 3, 6, 1, 2, 1, 1, 5 }; static netsnmp_watcher_info sysName_winfo; #ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysName", sysName_oid, OID_LENGTH(sysName_oid), HANDLER_CAN_RWRITE, &sysNameSet), netsnmp_init_watcher_info( &sysName_winfo, sysName, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #else /* !NETSNMP_NO_WRITE_SUPPORT */ netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysName", sysName_oid, OID_LENGTH(sysName_oid), HANDLER_CAN_RONLY, &sysNameSet), netsnmp_init_watcher_info( &sysName_winfo, sysName, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ } { const oid sysLocation_oid[] = { 1, 3, 6, 1, 2, 1, 1, 6 }; static netsnmp_watcher_info sysLocation_winfo; #ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysLocation", sysLocation_oid, OID_LENGTH(sysLocation_oid), HANDLER_CAN_RWRITE, &sysLocationSet), netsnmp_init_watcher_info( &sysLocation_winfo, sysLocation, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #else /* !NETSNMP_NO_WRITE_SUPPORT */ netsnmp_register_watched_scalar( netsnmp_create_update_handler_registration( "mibII/sysLocation", sysLocation_oid, OID_LENGTH(sysLocation_oid), HANDLER_CAN_RONLY, &sysLocationSet), netsnmp_init_watcher_info( &sysLocation_winfo, sysLocation, SYS_STRING_LEN - 1, ASN_OCTET_STR, WATCHER_MAX_SIZE | WATCHER_SIZE_STRLEN)); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ } { const oid sysServices_oid[] = { 1, 3, 6, 1, 2, 1, 1, 7 }; netsnmp_register_read_only_int_scalar( "mibII/sysServices", sysServices_oid, OID_LENGTH(sysServices_oid), &sysServices, handle_sysServices); } if (++system_module_count == 3) REGISTER_SYSOR_ENTRY(system_module_oid, "The MIB module for SNMPv2 entities"); sysContactSet = sysLocationSet = sysNameSet = 0; /* * register our config handlers */ snmpd_register_config_handler("sysdescr", system_parse_config_sysdescr, NULL, "description"); snmpd_register_config_handler("syslocation", system_parse_config_sysloc, NULL, "location"); snmpd_register_config_handler("syscontact", system_parse_config_syscon, NULL, "contact-name"); snmpd_register_config_handler("sysname", system_parse_config_sysname, NULL, "node-name"); snmpd_register_config_handler("psyslocation", system_parse_config_sysloc, NULL, NULL); snmpd_register_config_handler("psyscontact", system_parse_config_syscon, NULL, NULL); snmpd_register_config_handler("psysname", system_parse_config_sysname, NULL, NULL); snmpd_register_config_handler("sysservices", system_parse_config_sysServices, NULL, "NUMBER"); snmpd_register_config_handler("sysobjectid", system_parse_config_sysObjectID, NULL, "OID"); snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, system_store, NULL); }