@@ -46,7 +46,7 @@ ULONG ipDefaultTTL = NX_IP_TIME_TO_LIVE; /* ipDefault
4646 underlying application driver, but for now simple defaults are used. */
4747ULONG ifLastChange = 2048 ; /* ifLastChange:TimeTicks RO */
4848ULONG ifInOctets = 155 ; /* ifInOctets:Counter RO */
49- ULONG ifInUcastPkts = 0 ; /* ifInUcastPkts:Counter RO */
49+ ULONG64 ifInUcastPkts = 0 ; /* ifInUcastPkts:Counter RO */
5050UCHAR ifDescr [] = "NetX Physical Interface" ; /* ifDescr:OctetString RO */
5151
5252/* Define the MIB-2 "address translation" group, assuming one address translation. */
@@ -62,31 +62,31 @@ MIB_ENTRY mib2_mib[] = {
6262
6363 /* OBJECT ID OBJECT VARIABLE GET ROUTINE/ GET_OCTET_ROUTINE SET ROUTINE LENGTH */
6464
65- {(UCHAR * ) "1.3.6.1.2.1.1.1.0" , sysDescr , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , 0 },
66- {(UCHAR * ) "1.3.6.1.2.1.1.2.0" , sysObjectID , nx_snmp_object_id_get , NX_NULL , NX_NULL , 0 },
67- {(UCHAR * ) "1.3.6.1.2.1.1.3.0" , & sysUpTime , nx_snmp_object_timetics_get , NX_NULL , NX_NULL , 0 },
68- {(UCHAR * ) "1.3.6.1.2.1.1.4.0" , sysContact , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , 0 },
69- {(UCHAR * ) "1.3.6.1.2.1.1.5.0" , sysName , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , 0 },
70- {(UCHAR * ) "1.3.6.1.2.1.1.6.0" , sysLocation , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , 0 },
71- {(UCHAR * ) "1.3.6.1.2.1.1.7.0" , & sysServices , nx_snmp_object_integer_get , NX_NULL , NX_NULL , 0 },
65+ {(UCHAR * ) "1.3.6.1.2.1.1.1.0" , sysDescr , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , sizeof ( sysDescr ) },
66+ {(UCHAR * ) "1.3.6.1.2.1.1.2.0" , sysObjectID , nx_snmp_object_id_get , NX_NULL , NX_NULL , sizeof ( sysObjectID ) },
67+ {(UCHAR * ) "1.3.6.1.2.1.1.3.0" , & sysUpTime , nx_snmp_object_timetics_get , NX_NULL , NX_NULL , sizeof ( sysUpTime ) },
68+ {(UCHAR * ) "1.3.6.1.2.1.1.4.0" , sysContact , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , sizeof ( sysContact ) },
69+ {(UCHAR * ) "1.3.6.1.2.1.1.5.0" , sysName , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , sizeof ( sysName ) },
70+ {(UCHAR * ) "1.3.6.1.2.1.1.6.0" , sysLocation , nx_snmp_object_string_get , NX_NULL , nx_snmp_object_string_set , sizeof ( sysLocation ) },
71+ {(UCHAR * ) "1.3.6.1.2.1.1.7.0" , & sysServices , nx_snmp_object_integer_get , NX_NULL , NX_NULL , sizeof ( sysServices ) },
7272
73- {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.0" , & atNetworkAddress , nx_snmp_object_ip_address_get , NX_NULL , nx_snmp_object_ip_address_set , 0 },
73+ {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.0" , & atNetworkAddress , nx_snmp_object_ip_address_get , NX_NULL , nx_snmp_object_ip_address_set , sizeof ( atNetworkAddress ) },
7474#ifdef FEATURE_NX_IPV6
7575 /* Either GET method should work. IPv6 addresses are handled as octet strings and accept any IPv6 address format e.g. addresses with '::'s are accepted as is. */
76- {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.1" , & atIPv6NetworkAddress , nx_snmp_object_ipv6_address_get , NX_NULL , nx_snmp_object_ipv6_address_set , 0 },
77- {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.2" , & atIPv6NetworkAddress , NX_NULL , nx_snmp_object_octet_string_get , nx_snmp_object_octet_string_set , 0 },
76+ {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.1" , & atIPv6NetworkAddress , nx_snmp_object_ipv6_address_get , NX_NULL , nx_snmp_object_ipv6_address_set , sizeof ( atIPv6NetworkAddress ) },
77+ {(UCHAR * ) "1.3.6.1.2.1.3.1.1.3.2" , & atIPv6NetworkAddress , NX_NULL , nx_snmp_object_octet_string_get , nx_snmp_object_octet_string_set , sizeof ( atIPv6NetworkAddress ) },
7878#endif
7979
80- {(UCHAR * ) "1.3.6.1.2.1.2.2.1.2.0" , ifDescr , nx_snmp_object_string_get , NX_NULL , NX_NULL , 0 },
81- {(UCHAR * ) "1.3.6.1.2.1.3.1.1.2.0" , & atPhysAddress , NX_NULL , nx_snmp_object_octet_string_get , nx_snmp_object_octet_string_set , 0 },
82- {(UCHAR * ) "1.3.6.1.2.1.2.2.1.9.0" , & ifLastChange , nx_snmp_object_timetics_get , NX_NULL , nx_snmp_object_timetics_set , 0 },
83- {(UCHAR * ) "1.3.6.1.2.1.2.2.1.10.0" , & ifInOctets , nx_snmp_object_counter_get , NX_NULL , nx_snmp_object_counter_set , 0 },
84- {(UCHAR * ) "1.3.6.1.2.1.2.2.1.11.0" , & ifInUcastPkts , nx_snmp_object_counter64_get , NX_NULL , nx_snmp_object_counter64_set , 0 },
80+ {(UCHAR * ) "1.3.6.1.2.1.2.2.1.2.0" , ifDescr , nx_snmp_object_string_get , NX_NULL , NX_NULL , sizeof ( ifDescr ) },
81+ {(UCHAR * ) "1.3.6.1.2.1.3.1.1.2.0" , & atPhysAddress , NX_NULL , nx_snmp_object_octet_string_get , nx_snmp_object_octet_string_set , sizeof ( atPhysAddress ) },
82+ {(UCHAR * ) "1.3.6.1.2.1.2.2.1.9.0" , & ifLastChange , nx_snmp_object_timetics_get , NX_NULL , nx_snmp_object_timetics_set , sizeof ( ifLastChange ) },
83+ {(UCHAR * ) "1.3.6.1.2.1.2.2.1.10.0" , & ifInOctets , nx_snmp_object_counter_get , NX_NULL , nx_snmp_object_counter_set , sizeof ( ifInOctets ) },
84+ {(UCHAR * ) "1.3.6.1.2.1.2.2.1.11.0" , & ifInUcastPkts , nx_snmp_object_counter64_get , NX_NULL , nx_snmp_object_counter64_set , sizeof ( ifInUcastPkts ) },
8585
86- {(UCHAR * ) "1.3.6.1.2.1.4.1.0" , & ipForwarding , nx_snmp_object_integer_get , NX_NULL , nx_snmp_object_integer_set , 0 },
87- {(UCHAR * ) "1.3.6.1.2.1.4.2.0" , & ipDefaultTTL , nx_snmp_object_integer_get , NX_NULL , NX_NULL , 0 },
86+ {(UCHAR * ) "1.3.6.1.2.1.4.1.0" , & ipForwarding , nx_snmp_object_integer_get , NX_NULL , nx_snmp_object_integer_set , sizeof ( ipForwarding ) },
87+ {(UCHAR * ) "1.3.6.1.2.1.4.2.0" , & ipDefaultTTL , nx_snmp_object_integer_get , NX_NULL , NX_NULL , sizeof ( ipDefaultTTL ) },
8888
89- {(UCHAR * ) "1.3.6.1.7" , (UCHAR * ) "1.3.6.1.7" , nx_snmp_object_end_of_mib , NX_NULL , NX_NULL , 0 },
89+ {(UCHAR * ) "1.3.6.1.7" , (UCHAR * ) "1.3.6.1.7" , nx_snmp_object_end_of_mib , NX_NULL , NX_NULL , sizeof ( "1.3.6.1.7" ) - 1 },
9090 {NX_NULL , NX_NULL , NX_NULL , NX_NULL , NX_NULL , 0 }
9191
9292};
0 commit comments