📄 mib.c
字号:
&test_int1n, 0, 0xff, 0xff);LEAF_COMS(testint2n_leaf, testint2n_crs, "testint2n", VT_NUMBER, READ_ACCESS, 0, it_exists, get_int, null_set_proc, std_next, &test_int2n, 0, 0xff, 0xff);LEAF_COMS(testint3n_leaf, testint3n_crs, "testint3n", VT_NUMBER, READ_ACCESS, 0, it_exists, get_int, null_set_proc, std_next, &test_int3n, 0, 0xff, 0xff);LEAF_COMS(testint4n_leaf, testint4n_crs, "testint4n", VT_NUMBER, READ_ACCESS, 0, it_exists, get_int, null_set_proc, std_next, &test_int4n, 0, 0xff, 0xff);/* The int TEST node */STATICMIBARC_T testint_arcs[] = {ARC(1, testint0_leaf), ARC(2, testint1p_leaf), ARC(3, testint2p_leaf), ARC(4, testint3p_leaf), ARC(5, testint4p_leaf), ARC(6, testint1n_leaf), ARC(7, testint2n_leaf), ARC(8, testint3n_leaf), ARC(9, testint4n_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testint_node = NODE("testint", testint_arcs);LEAF_COMS(testcount0_leaf, testcount0_crs, "testcount0", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count0, 0, 0xff, 0xff);LEAF_COMS(testcount1_leaf, testcount1_crs, "testcount1", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count1, 0, 0xff, 0xff);LEAF_COMS(testcount2_leaf, testcount2_crs, "testcount2", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count2, 0, 0xff, 0xff);LEAF_COMS(testcount3_leaf, testcount3_crs, "testcount3", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count3, 0, 0xff, 0xff);LEAF_COMS(testcount4_leaf, testcount4_crs, "testcount4", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count4, 0, 0xff, 0xff);LEAF_COMS(testcount5_leaf, testcount5_crs, "testcount5", VT_COUNTER, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_count5, 0, 0xff, 0xff);/* The count TEST node */STATICMIBARC_T testcount_arcs[] = {ARC(1, testcount0_leaf), ARC(2, testcount1_leaf), ARC(3, testcount2_leaf), ARC(4, testcount3_leaf), ARC(5, testcount4_leaf), ARC(6, testcount5_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testcount_node = NODE("testcount", testcount_arcs);LEAF_COMS(testgauge0_leaf, testgauge0_crs, "testgauge0", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge0, 0, 0xff, 0xff);LEAF_COMS(testgauge1_leaf, testgauge1_crs, "testgauge1", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge1, 0, 0xff, 0xff);LEAF_COMS(testgauge2_leaf, testgauge2_crs, "testgauge2", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge2, 0, 0xff, 0xff);LEAF_COMS(testgauge3_leaf, testgauge3_crs, "testgauge3", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge3, 0, 0xff, 0xff);LEAF_COMS(testgauge4_leaf, testgauge4_crs, "testgauge4", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge4, 0, 0xff, 0xff);LEAF_COMS(testgauge5_leaf, testgauge5_crs, "testgauge5", VT_GAUGE, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_gauge5, 0, 0xff, 0xff);/* The gauge TEST node */STATICMIBARC_T testgauge_arcs[] = {ARC(1, testgauge0_leaf), ARC(2, testgauge1_leaf), ARC(3, testgauge2_leaf), ARC(4, testgauge3_leaf), ARC(5, testgauge4_leaf), ARC(6, testgauge5_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testgauge_node = NODE("testgauge", testgauge_arcs);LEAF_COMS(testtime0_leaf, testtime0_crs, "testtime0", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time0, 0, 0xff, 0xff);LEAF_COMS(testtime1_leaf, testtime1_crs, "testtime1", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time1, 0, 0xff, 0xff);LEAF_COMS(testtime2_leaf, testtime2_crs, "testtime2", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time2, 0, 0xff, 0xff);LEAF_COMS(testtime3_leaf, testtime3_crs, "testtime3", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time3, 0, 0xff, 0xff);LEAF_COMS(testtime4_leaf, testtime4_crs, "testtime4", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time4, 0, 0xff, 0xff);LEAF_COMS(testtime5_leaf, testtime5_crs, "testtime5", VT_TIMETICKS, READ_ACCESS, 0, it_exists, get_uint, null_set_proc, std_next, &test_time5, 0, 0xff, 0xff);/* The time TEST node */STATICMIBARC_T testtime_arcs[] = {ARC(1, testtime0_leaf), ARC(2, testtime1_leaf), ARC(3, testtime2_leaf), ARC(4, testtime3_leaf), ARC(5, testtime4_leaf), ARC(6, testtime5_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testtime_node = NODE("testtime", testtime_arcs);/* We only include the following variables if v2 types are installed */#if (INSTALL_ENVOY_SNMP_VERSION_2 || INSTALL_ENVOY_SNMP_USE_V2_TYPES)LEAF_COMS(testbigc0_leaf, testbigc0_crs, "testbigc0", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc0, 0, 0xff, 0xff);LEAF_COMS(testbigc1_leaf, testbigc1_crs, "testbigc1", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc1, 0, 0xff, 0xff);LEAF_COMS(testbigc2_leaf, testbigc2_crs, "testbigc2", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc2, 0, 0xff, 0xff);LEAF_COMS(testbigc3_leaf, testbigc3_crs, "testbigc3", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc3, 0, 0xff, 0xff);LEAF_COMS(testbigc4_leaf, testbigc4_crs, "testbigc4", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc4, 0, 0xff, 0xff);LEAF_COMS(testbigc51_leaf, testbigc51_crs, "testbigc51", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc51, 0, 0xff, 0xff);LEAF_COMS(testbigc52_leaf, testbigc52_crs, "testbigc52", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc52, 0, 0xff, 0xff);LEAF_COMS(testbigc6_leaf, testbigc6_crs, "testbigc6", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc6, 0, 0xff, 0xff);LEAF_COMS(testbigc7_leaf, testbigc7_crs, "testbigc7", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc7, 0, 0xff, 0xff);LEAF_COMS(testbigc8_leaf, testbigc8_crs, "testbigc8", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc8, 0, 0xff, 0xff);LEAF_COMS(testbigc9_leaf, testbigc9_crs, "testbigc9", VT_COUNTER64, READ_ACCESS, 0, it_exists, get_ui64, null_set_proc, std_next, &test_bigc9, 0, 0xff, 0xff);/* The 64 bit count TEST node */STATICMIBARC_T testbigc_arcs[] = {ARC(1, testbigc0_leaf), ARC(2, testbigc1_leaf), ARC(3, testbigc2_leaf), ARC(4, testbigc3_leaf), ARC(5, testbigc4_leaf), ARC(6, testbigc51_leaf), ARC(7, testbigc52_leaf), ARC(8, testbigc6_leaf), ARC(9, testbigc7_leaf), ARC(10, testbigc8_leaf), ARC(11, testbigc9_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testbigc_node = NODE("testbigc", testbigc_arcs);#endif /* (INSTALL_ENVOY_SNMP_VERSION_2 || INSTALL_ENVOY_SNMP_USE_V2_TYPES) */LEAF_COMS(teststr0_leaf, teststr0_crs, "teststring0", VT_STRING, READ_ACCESS, 0, it_exists, get_string, null_set_proc, std_next, (char *)&test_string0[0], 0, 0xff, 0xff);LEAF_COMS(teststr1_leaf, teststr1_crs, "teststring1", VT_STRING, READ_ACCESS, 0, it_exists, get_string, null_set_proc, std_next, (char *)&test_string1[0], 0, 0xff, 0xff);/* The string TEST node */STATICMIBARC_T teststr_arcs[] = {ARC(1, teststr0_leaf), ARC(2, teststr1_leaf), END_OF_ARC_LIST};STATICMIBNODE_T teststr_node = NODE("teststr", teststr_arcs);LEAF_COMS(testipaddr0_leaf, testipaddr0_crs, "testipaddr0", VT_IPADDRESS, READ_ACCESS, 0, it_exists, get_ip_address, null_set_proc, std_next, (char *)&test_ipaddr0[0], 0, 0xff, 0xff);LEAF_COMS(testipaddr1_leaf, testipaddr1_crs, "testipaddr1", VT_IPADDRESS, READ_ACCESS, 0, it_exists, get_ip_address, null_set_proc, std_next, (char *)&test_ipaddr1[0], 0, 0xff, 0xff);LEAF_COMS(testipaddr2_leaf, testipaddr2_crs, "testipaddr2", VT_IPADDRESS, READ_ACCESS, 0, it_exists, get_ip_address, null_set_proc, std_next, (char *)&test_ipaddr2[0], 0, 0xff, 0xff);/* The ipaddr TEST node */STATICMIBARC_T testipaddr_arcs[] = {ARC(1, testipaddr0_leaf), ARC(2, testipaddr1_leaf), ARC(3, testipaddr2_leaf), END_OF_ARC_LIST};STATICMIBNODE_T testipaddr_node = NODE("testipaddr", testipaddr_arcs); /* The TEST node */STATICMIBARC_T test_arcs[] = {ARC(1, testint_node), ARC(3, testcount_node), ARC(4, testgauge_node), ARC(5, testtime_node),/* We only include the following variables if v2 types are installed */#if (INSTALL_ENVOY_SNMP_VERSION_2 || INSTALL_ENVOY_SNMP_USE_V2_TYPES) ARC(6, testbigc_node),#endif /* (INSTALL_ENVOY_SNMP_VERSION_2 || INSTALL_ENVOY_SNMP_USE_V2_TYPES) */ ARC(8, teststr_node), ARC(9, testipaddr_node), END_OF_ARC_LIST};STATICMIBNODE_T test_node = NODE("test", test_arcs);/********************************************************************** HIGHER LEVEL COMPONENTS OF THE MIB TREE **********************************************************************//* The First MIB node */STATICMIBARC_T mib1_arcs[] = {ARC(MIB_SYSTEM, system_node), ARC(MIB_INTERFACES, interfaces_node), ARC(MIB_AT, at_node), ARC(MIB_IP, ip_node), ARC(MIB_ICMP, icmp_node), ARC(MIB_TCP, tcp_node), ARC(MIB_UDP, udp_node),#if defined(EGP_GROUP) ARC(MIB_EGP, egp_node),#endif END_OF_ARC_LIST};STATICMIBNODE_T mib1_node = NODE("mib", mib1_arcs);/* The MGMT node */STATICMIBARC_T mgmt_arcs[] = {ARC(MIB_MIB1, mib1_node), END_OF_ARC_LIST};STATICMIBNODE_T mgmt_node = NODE("mgmt", mgmt_arcs);/* The Epilogue node */STATICMIBARC_T epilogue_arcs[] = {ARC(8, test_node), END_OF_ARC_LIST};STATICMIBNODE_T epilogue_node = NODE("epilogue", epilogue_arcs);/* The Enterprise node */STATICMIBARC_T enterprise_arcs[] = { ARC(12, epilogue_node), END_OF_ARC_LIST};STATICMIBNODE_T enterprise_node = NODE("enterprise", enterprise_arcs);/* The PRIVATE node */STATICMIBARC_T private_arcs[] = {ARC(MIB_ENTERPRISE, enterprise_node), END_OF_ARC_LIST};STATICMIBNODE_T private_node = NODE("private", private_arcs);/* The Internet node */STATICMIBARC_T internet_arcs[] = {ARC(MIB_MGMT, mgmt_node), /*** ARC(EXPERIMENTAL,dn), ***/ ARC(MIB_PRIVATE, private_node), END_OF_ARC_LIST};STATICMIBNODE_T internet_node = NODE("internet", internet_arcs);/* The DoD node */STATICMIBARC_T dod_arcs[] = {ARC(MIB_INTERNET, internet_node), END_OF_ARC_LIST};STATICMIBNODE_T dod_node = NODE("dod", dod_arcs);/* The US International ORGinatization node */STATICMIBARC_T us_arcs[] = {ARC(MIB_DOD, dod_node), END_OF_ARC_LIST};STATICMIBNODE_T us_node = NODE("org", us_arcs);/* The ISO node */STATICMIBARC_T iso_arcs[] = {ARC(MIB_ORG, us_node), END_OF_ARC_LIST};STATICMIBNODE_T iso_node = NODE("iso", iso_arcs);/* Root of the MIB */STATICMIBARC_T rootarcs[] = {ARC(MIB_ISO, iso_node), END_OF_ARC_LIST};MIBNODE_T mib_root_node = NODE("", rootarcs);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -