003 File Manager
Current Path:
/usr/src/contrib/ntp/ntpsnmpd
usr
/
src
/
contrib
/
ntp
/
ntpsnmpd
/
📁
..
📄
Makefile.am
(3.83 KB)
📄
Makefile.in
(42.45 KB)
📄
README
(1.65 KB)
📄
invoke-ntpsnmpd.menu
(53 B)
📄
invoke-ntpsnmpd.texi
(6.46 KB)
📄
netsnmp_daemonize.c
(6.54 KB)
📄
ntpSnmpSubagentObject.c
(14.27 KB)
📄
ntpSnmpSubagentObject.h
(2.45 KB)
📄
ntp_snmp.h
(971 B)
📄
ntpsnmpd-opts.c
(32.71 KB)
📄
ntpsnmpd-opts.def
(3.13 KB)
📄
ntpsnmpd-opts.h
(8.58 KB)
📄
ntpsnmpd.1ntpsnmpdman
(5.26 KB)
📄
ntpsnmpd.1ntpsnmpdmdoc
(4.48 KB)
📄
ntpsnmpd.c
(2.96 KB)
📄
ntpsnmpd.html
(4.23 KB)
📄
ntpsnmpd.man.in
(5.26 KB)
📄
ntpsnmpd.mdoc.in
(4.48 KB)
📄
ntpsnmpd.texi
(1.46 KB)
📄
ntpv4-mib.mib
(29.45 KB)
Editing: ntpSnmpSubagentObject.h
/***************************************************************************** * * ntpSnmpSubAgentObject.h * * Definitions and macros for ntpSnmpSubAgentObject.c * ****************************************************************************/ #ifndef NTPSNMPSUBAGENTOBJECT_H #define NTPSNMPSUBAGENTOBJECT_H /* Function Prototypes */ size_t ntpsnmpd_parse_string(const char *string, char *field, size_t fieldsize, char *value, size_t valuesize); size_t ntpsnmpd_cut_string(const char *string, char *dest, char delim, int fieldnumber, size_t maxsize); size_t read_ntp_value(const char *variable, char *value, size_t valuesize); /* Initialization */ void init_ntpSnmpSubagentObject(void); /* MIB Section 1 Callback Functions*/ Netsnmp_Node_Handler get_ntpEntSoftwareName; Netsnmp_Node_Handler get_ntpEntSoftwareVersion; Netsnmp_Node_Handler get_ntpEntSoftwareVendor; Netsnmp_Node_Handler get_ntpEntSystemType; Netsnmp_Node_Handler get_ntpEntTimeResolution; Netsnmp_Node_Handler get_ntpEntTimePrecision; Netsnmp_Node_Handler get_ntpEntTimeDistance; /* MIB Section 2 Callback Functions (TODO) */ Netsnmp_Node_Handler get_ntpEntStatusCurrentMode; Netsnmp_Node_Handler get_ntpEntStatusCurrentModeVal; Netsnmp_Node_Handler get_ntpEntStatusStratum; Netsnmp_Node_Handler get_ntpEntStatusActiveRefSourceId; Netsnmp_Node_Handler get_ntpEntStatusActiveRefSourceName; Netsnmp_Node_Handler get_ntpEntStatusActiveOffset; #define NTPV4_OID 1,3,6,1,2,1,197 /* mib-2 197 */ /* * The following macros simplify the registration of the callback * functions and register the name and OID of either read-only (RO) or * read-write (RW) functions. */ #define SETUP_OID_RO(oidname, ...) \ static oid oidname##_oid [] = { __VA_ARGS__ }; \ { \ netsnmp_register_read_only_instance( \ netsnmp_create_handler_registration( \ "#oidname", \ get_##oidname, \ oidname##_oid, \ OID_LENGTH \ ( oidname##_oid ), \ HANDLER_CAN_RONLY)); \ } #define SETUP_OID_RW(oidname, ...) \ static oid oidname##_oid [] = { __VA_ARGS__ }; \ { \ netsnmp_register_instance( \ netsnmp_create_handler_registration( \ "#oidname", \ do_##oidname, \ oidname##_oid, \ OID_LENGTH \ ( oidname##_oid ), \ HANDLER_CAN_RWRITE)); \ } #define NTP_OID_RO(oidname, w, x, y, z) \ SETUP_OID_RO(oidname, NTPV4_OID, w, x, y, z) #define NTP_OID_RW(oidname, w, x, y, z) \ SETUP_OID_RW(oidname, NTPV4_OID, w, x, y, z) #endif
Upload File
Create Folder