Go to the documentation of this file.
32 #define TRACE_LEVEL SNMP_TRACE_LEVEL
52 #if (IP_MIB_SUPPORT == ENABLED)
71 #if (IPV4_SUPPORT == ENABLED)
80 #if (IPV6_SUPPORT == ENABLED)
149 #if (IPV4_SUPPORT == ENABLED)
151 if(
osStrcmp(object->name,
"ipv4InterfaceReasmMaxSize") == 0)
157 else if(
osStrcmp(object->name,
"ipv4InterfaceEnableStatus") == 0)
163 else if(
osStrcmp(object->name,
"ipv4InterfaceRetransmitTime") == 0)
192 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
199 if(*nextOidLen < object->
oidLen)
203 osMemcpy(nextOid, object->oid, object->oidLen);
294 #if (IPV6_SUPPORT == ENABLED)
296 if(
osStrcmp(object->name,
"ipv6InterfaceReasmMaxSize") == 0)
302 else if(
osStrcmp(object->name,
"ipv6InterfaceIdentifier") == 0)
305 if(*valueLen >=
sizeof(
Eui64))
315 *valueLen =
sizeof(
Eui64);
324 else if(
osStrcmp(object->name,
"ipv6InterfaceEnableStatus") == 0)
330 else if(
osStrcmp(object->name,
"ipv6InterfaceReachableTime") == 0)
333 value->unsigned32 = interface->ndpContext.reachableTime;
336 else if(
osStrcmp(object->name,
"ipv6InterfaceRetransmitTime") == 0)
339 value->unsigned32 = interface->ndpContext.retransTimer;
342 else if(
osStrcmp(object->name,
"ipv6InterfaceForwarding") == 0)
345 if(interface->ipv6Context.isRouter)
378 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
385 if(*nextOidLen < object->
oidLen)
389 osMemcpy(nextOid, object->oid, object->oidLen);
451 #if (IPV4_SUPPORT == ENABLED)
460 #if (IPV6_SUPPORT == ENABLED)
479 if(
osStrcmp(object->name,
"ipSystemStatsInReceives") == 0)
484 else if(
osStrcmp(object->name,
"ipSystemStatsHCInReceives") == 0)
489 else if(
osStrcmp(object->name,
"ipSystemStatsInOctets") == 0)
494 else if(
osStrcmp(object->name,
"ipSystemStatsHCInOctets") == 0)
499 else if(
osStrcmp(object->name,
"ipSystemStatsInHdrErrors") == 0)
504 else if(
osStrcmp(object->name,
"ipSystemStatsInNoRoutes") == 0)
509 else if(
osStrcmp(object->name,
"ipSystemStatsInAddrErrors") == 0)
514 else if(
osStrcmp(object->name,
"ipSystemStatsInUnknownProtos") == 0)
519 else if(
osStrcmp(object->name,
"ipSystemStatsInTruncatedPkts") == 0)
524 else if(
osStrcmp(object->name,
"ipSystemStatsInForwDatagrams") == 0)
529 else if(
osStrcmp(object->name,
"ipSystemStatsHCInForwDatagrams") == 0)
534 else if(
osStrcmp(object->name,
"ipSystemStatsReasmReqds") == 0)
539 else if(
osStrcmp(object->name,
"ipSystemStatsReasmOKs") == 0)
544 else if(
osStrcmp(object->name,
"ipSystemStatsReasmFails") == 0)
549 else if(
osStrcmp(object->name,
"ipSystemStatsInDiscards") == 0)
554 else if(
osStrcmp(object->name,
"ipSystemStatsInDelivers") == 0)
559 else if(
osStrcmp(object->name,
"ipSystemStatsHCInDelivers") == 0)
564 else if(
osStrcmp(object->name,
"ipSystemStatsOutRequests") == 0)
569 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutRequests") == 0)
574 else if(
osStrcmp(object->name,
"ipSystemStatsOutNoRoutes") == 0)
579 else if(
osStrcmp(object->name,
"ipSystemStatsOutForwDatagrams") == 0)
584 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutForwDatagrams") == 0)
589 else if(
osStrcmp(object->name,
"ipSystemStatsOutDiscards") == 0)
594 else if(
osStrcmp(object->name,
"ipSystemStatsOutFragReqds") == 0)
599 else if(
osStrcmp(object->name,
"ipSystemStatsOutFragOKs") == 0)
604 else if(
osStrcmp(object->name,
"ipSystemStatsOutFragFails") == 0)
609 else if(
osStrcmp(object->name,
"ipSystemStatsOutFragCreates") == 0)
614 else if(
osStrcmp(object->name,
"ipSystemStatsOutTransmits") == 0)
619 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutTransmits") == 0)
624 else if(
osStrcmp(object->name,
"ipSystemStatsOutOctets") == 0)
629 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutOctets") == 0)
634 else if(
osStrcmp(object->name,
"ipSystemStatsInMcastPkts") == 0)
639 else if(
osStrcmp(object->name,
"ipSystemStatsHCInMcastPkts") == 0)
644 else if(
osStrcmp(object->name,
"ipSystemStatsInMcastOctets") == 0)
649 else if(
osStrcmp(object->name,
"ipSystemStatsHCInMcastOctets") == 0)
654 else if(
osStrcmp(object->name,
"ipSystemStatsOutMcastPkts") == 0)
659 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutMcastPkts") == 0)
664 else if(
osStrcmp(object->name,
"ipSystemStatsOutMcastOctets") == 0)
669 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutMcastOctets") == 0)
674 else if(
osStrcmp(object->name,
"ipSystemStatsInBcastPkts") == 0)
679 else if(
osStrcmp(object->name,
"ipSystemStatsHCInBcastPkts") == 0)
684 else if(
osStrcmp(object->name,
"ipSystemStatsOutBcastPkts") == 0)
689 else if(
osStrcmp(object->name,
"ipSystemStatsHCOutBcastPkts") == 0)
694 else if(
osStrcmp(object->name,
"ipSystemStatsDiscontinuityTime") == 0)
699 else if(
osStrcmp(object->name,
"ipSystemStatsRefreshRate") == 0)
731 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
738 if(*nextOidLen < object->
oidLen)
742 osMemcpy(nextOid, object->oid, object->oidLen);
747 #if (IPV4_SUPPORT == DISABLED)
755 #if (IPV6_SUPPORT == DISABLED)
832 #if (IPV4_SUPPORT == ENABLED)
841 #if (IPV6_SUPPORT == ENABLED)
860 if(
osStrcmp(object->name,
"ipIfStatsInReceives") == 0)
865 else if(
osStrcmp(object->name,
"ipIfStatsHCInReceives") == 0)
870 else if(
osStrcmp(object->name,
"ipIfStatsInOctets") == 0)
875 else if(
osStrcmp(object->name,
"ipIfStatsHCInOctets") == 0)
880 else if(
osStrcmp(object->name,
"ipIfStatsInHdrErrors") == 0)
885 else if(
osStrcmp(object->name,
"ipIfStatsInNoRoutes") == 0)
890 else if(
osStrcmp(object->name,
"ipIfStatsInAddrErrors") == 0)
895 else if(
osStrcmp(object->name,
"ipIfStatsInUnknownProtos") == 0)
900 else if(
osStrcmp(object->name,
"ipIfStatsInTruncatedPkts") == 0)
905 else if(
osStrcmp(object->name,
"ipIfStatsInForwDatagrams") == 0)
910 else if(
osStrcmp(object->name,
"ipIfStatsHCInForwDatagrams") == 0)
915 else if(
osStrcmp(object->name,
"ipIfStatsReasmReqds") == 0)
920 else if(
osStrcmp(object->name,
"ipIfStatsReasmOKs") == 0)
925 else if(
osStrcmp(object->name,
"ipIfStatsReasmFails") == 0)
930 else if(
osStrcmp(object->name,
"ipIfStatsInDiscards") == 0)
935 else if(
osStrcmp(object->name,
"ipIfStatsInDelivers") == 0)
940 else if(
osStrcmp(object->name,
"ipIfStatsHCInDelivers") == 0)
945 else if(
osStrcmp(object->name,
"ipIfStatsOutRequests") == 0)
950 else if(
osStrcmp(object->name,
"ipIfStatsHCOutRequests") == 0)
955 else if(
osStrcmp(object->name,
"ipIfStatsOutForwDatagrams") == 0)
960 else if(
osStrcmp(object->name,
"ipIfStatsHCOutForwDatagrams") == 0)
965 else if(
osStrcmp(object->name,
"ipIfStatsOutDiscards") == 0)
970 else if(
osStrcmp(object->name,
"ipIfStatsOutFragReqds") == 0)
975 else if(
osStrcmp(object->name,
"ipIfStatsOutFragOKs") == 0)
980 else if(
osStrcmp(object->name,
"ipIfStatsOutFragFails") == 0)
985 else if(
osStrcmp(object->name,
"ipIfStatsOutFragCreates") == 0)
990 else if(
osStrcmp(object->name,
"ipIfStatsOutTransmits") == 0)
995 else if(
osStrcmp(object->name,
"ipIfStatsHCOutTransmits") == 0)
1000 else if(
osStrcmp(object->name,
"ipIfStatsOutOctets") == 0)
1005 else if(
osStrcmp(object->name,
"ipIfStatsHCOutOctets") == 0)
1010 else if(
osStrcmp(object->name,
"ipIfStatsInMcastPkts") == 0)
1015 else if(
osStrcmp(object->name,
"ipIfStatsHCInMcastPkts") == 0)
1020 else if(
osStrcmp(object->name,
"ipIfStatsInMcastOctets") == 0)
1025 else if(
osStrcmp(object->name,
"ipIfStatsHCInMcastOctets") == 0)
1030 else if(
osStrcmp(object->name,
"ipIfStatsOutMcastPkts") == 0)
1035 else if(
osStrcmp(object->name,
"ipIfStatsHCOutMcastPkts") == 0)
1040 else if(
osStrcmp(object->name,
"ipIfStatsOutMcastOctets") == 0)
1045 else if(
osStrcmp(object->name,
"ipIfStatsHCOutMcastOctets") == 0)
1050 else if(
osStrcmp(object->name,
"ipIfStatsInBcastPkts") == 0)
1055 else if(
osStrcmp(object->name,
"ipIfStatsHCInBcastPkts") == 0)
1060 else if(
osStrcmp(object->name,
"ipIfStatsOutBcastPkts") == 0)
1065 else if(
osStrcmp(object->name,
"ipIfStatsHCOutBcastPkts") == 0)
1070 else if(
osStrcmp(object->name,
"ipIfStatsDiscontinuityTime") == 0)
1075 else if(
osStrcmp(object->name,
"ipIfStatsRefreshRate") == 0)
1107 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
1115 if(*nextOidLen < object->
oidLen)
1119 osMemcpy(nextOid, object->oid, object->oidLen);
1124 #if (IPV4_SUPPORT == DISABLED)
1132 #if (IPV6_SUPPORT == DISABLED)
1231 #if (IPV4_SUPPORT == ENABLED)
1241 entry = &interface->ipv4Context.addrList[i];
1262 if(
osStrcmp(object->name,
"ipAddressPrefixOrigin") == 0)
1268 else if(
osStrcmp(object->name,
"ipAddressPrefixOnLinkFlag") == 0)
1275 else if(
osStrcmp(object->name,
"ipAddressPrefixAutonomousFlag") == 0)
1282 else if(
osStrcmp(object->name,
"ipAddressPrefixAdvPreferredLifetime") == 0)
1286 value->unsigned32 = UINT32_MAX;
1289 else if(
osStrcmp(object->name,
"ipAddressPrefixAdvValidLifetime") == 0)
1293 value->unsigned32 = UINT32_MAX;
1310 #if (IPV6_SUPPORT == ENABLED)
1320 entry = &interface->ipv6Context.prefixList[i];
1341 if(
osStrcmp(object->name,
"ipAddressPrefixOrigin") == 0)
1354 else if(
osStrcmp(object->name,
"ipAddressPrefixOnLinkFlag") == 0)
1368 else if(
osStrcmp(object->name,
"ipAddressPrefixAutonomousFlag") == 0)
1382 else if(
osStrcmp(object->name,
"ipAddressPrefixAdvPreferredLifetime") == 0)
1388 value->unsigned32 = UINT32_MAX;
1396 else if(
osStrcmp(object->name,
"ipAddressPrefixAdvValidLifetime") == 0)
1402 value->unsigned32 = UINT32_MAX;
1446 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
1466 if(*nextOidLen < object->
oidLen)
1470 osMemcpy(nextOid, object->oid, object->oidLen);
1472 #if (IPV4_SUPPORT == ENABLED)
1485 entry = &interface->ipv4Context.addrList[i];
1527 else if(curIndex < index)
1531 else if(curIndex > index)
1543 else if(curLength <
length)
1566 #if (IPV6_SUPPORT == ENABLED)
1579 entry = &interface->ipv6Context.prefixList[i];
1620 else if(curIndex < index)
1624 else if(curIndex > index)
1636 else if(curLength <
length)
1710 value->integer, commit);
1788 #if (IPV4_SUPPORT == ENABLED)
1804 entry = &interface->ipv4Context.addrList[i];
1824 if(
osStrcmp(object->name,
"ipAddressIfIndex") == 0)
1828 value->integer = index;
1831 else if(
osStrcmp(object->name,
"ipAddressType") == 0)
1837 else if(
osStrcmp(object->name,
"ipAddressPrefix") == 0)
1843 const uint8_t ipAddressPrefixOriginOid[] = {43, 6, 1, 2, 1, 4, 32, 1, 5};
1852 n =
sizeof(ipAddressPrefixOriginOid);
1884 else if(
osStrcmp(object->name,
"ipAddressOrigin") == 0)
1886 #if (AUTO_IP_SUPPORT == ENABLED)
1888 if(interface->autoIpContext != NULL &&
1889 interface->autoIpContext->running)
1896 #if (DHCP_CLIENT_SUPPORT == ENABLED)
1898 if(interface->dhcpClientContext != NULL &&
1899 interface->dhcpClientContext->running)
1913 else if(
osStrcmp(object->name,
"ipAddressStatus") == 0)
1930 else if(
osStrcmp(object->name,
"ipAddressCreated") == 0)
1933 value->timeTicks = 0;
1936 else if(
osStrcmp(object->name,
"ipAddressLastChanged") == 0)
1939 value->timeTicks = 0;
1942 else if(
osStrcmp(object->name,
"ipAddressRowStatus") == 0)
1948 else if(
osStrcmp(object->name,
"ipAddressStorageType") == 0)
1968 #if (IPV6_SUPPORT == ENABLED)
1984 entry = &interface->ipv6Context.addrList[i];
2004 if(
osStrcmp(object->name,
"ipAddressIfIndex") == 0)
2008 value->integer = index;
2011 else if(
osStrcmp(object->name,
"ipAddressType") == 0)
2017 else if(
osStrcmp(object->name,
"ipAddressPrefix") == 0)
2020 const uint8_t unknownOid[] = {0};
2023 if(*valueLen <
sizeof(unknownOid))
2029 *valueLen =
sizeof(unknownOid);
2032 else if(
osStrcmp(object->name,
"ipAddressOrigin") == 0)
2038 else if(
osStrcmp(object->name,
"ipAddressStatus") == 0)
2059 else if(
osStrcmp(object->name,
"ipAddressCreated") == 0)
2062 value->timeTicks = 0;
2065 else if(
osStrcmp(object->name,
"ipAddressLastChanged") == 0)
2068 value->timeTicks = 0;
2071 else if(
osStrcmp(object->name,
"ipAddressRowStatus") == 0)
2077 else if(
osStrcmp(object->name,
"ipAddressStorageType") == 0)
2119 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
2134 if(*nextOidLen < object->
oidLen)
2138 osMemcpy(nextOid, object->oid, object->oidLen);
2140 #if (IPV4_SUPPORT == ENABLED)
2153 entry = &interface->ipv4Context.addrList[i];
2199 #if (IPV6_SUPPORT == ENABLED)
2212 entry = &interface->ipv6Context.addrList[i];
2347 #if (IPV4_SUPPORT == ENABLED && ETH_SUPPORT == ENABLED)
2360 if(
osStrcmp(object->name,
"ipNetToPhysicalPhysAddress") == 0)
2363 if(*valueLen >=
sizeof(
MacAddr))
2377 else if(
osStrcmp(object->name,
"ipNetToPhysicalLastUpdated") == 0)
2383 else if(
osStrcmp(object->name,
"ipNetToPhysicalType") == 0)
2389 else if(
osStrcmp(object->name,
"ipNetToPhysicalState") == 0)
2395 else if(
osStrcmp(object->name,
"ipNetToPhysicalRowStatus") == 0)
2415 #if (IPV6_SUPPORT == ENABLED)
2428 if(
osStrcmp(object->name,
"ipNetToPhysicalPhysAddress") == 0)
2431 if(*valueLen >=
sizeof(
MacAddr))
2445 else if(
osStrcmp(object->name,
"ipNetToPhysicalLastUpdated") == 0)
2451 else if(
osStrcmp(object->name,
"ipNetToPhysicalType") == 0)
2457 else if(
osStrcmp(object->name,
"ipNetToPhysicalState") == 0)
2486 else if(
osStrcmp(object->name,
"ipNetToPhysicalRowStatus") == 0)
2528 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
2545 if(*nextOidLen < object->
oidLen)
2549 osMemcpy(nextOid, object->oid, object->oidLen);
2563 #if (IPV4_SUPPORT == ENABLED && ETH_SUPPORT == ENABLED)
2570 entry = &interface->arpCache[i];
2604 else if(curIndex < index)
2608 else if(curIndex > index)
2633 #if (IPV6_SUPPORT == ENABLED)
2640 entry = &interface->ndpContext.neighborCache[i];
2674 else if(curIndex < index)
2678 else if(curIndex > index)
2767 if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexLinkLocal") == 0)
2769 value->unsigned32 = index;
2772 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndex3") == 0)
2774 value->unsigned32 = 0;
2777 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexAdminLocal") == 0)
2779 value->unsigned32 = 0;
2782 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexSiteLocal") == 0)
2784 value->unsigned32 = 0;
2787 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndex6") == 0)
2789 value->unsigned32 = 0;
2792 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndex7") == 0)
2794 value->unsigned32 = 0;
2797 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexOrganizationLocal") == 0)
2799 value->unsigned32 = 0;
2802 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndex9") == 0)
2804 value->unsigned32 = 0;
2807 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexA") == 0)
2809 value->unsigned32 = 0;
2812 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexB") == 0)
2814 value->unsigned32 = 0;
2817 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexC") == 0)
2819 value->unsigned32 = 0;
2822 else if(
osStrcmp(object->name,
"ipv6ScopeZoneIndexD") == 0)
2824 value->unsigned32 = 0;
2848 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
2855 if(*nextOidLen < object->
oidLen)
2859 osMemcpy(nextOid, object->oid, object->oidLen);
2937 #if (IPV4_SUPPORT == ENABLED)
2947 entry = &interface->ipv4Context.addrList[i];
2961 if(
osStrcmp(object->name,
"ipDefaultRouterLifetime") == 0)
2964 value->unsigned32 = UINT16_MAX;
2967 else if(
osStrcmp(object->name,
"ipDefaultRouterPreference") == 0)
2987 #if (IPV6_SUPPORT == ENABLED)
2997 entry = &interface->ipv6Context.routerList[i];
3014 if(
osStrcmp(object->name,
"ipDefaultRouterLifetime") == 0)
3019 value->unsigned32 = UINT16_MAX;
3027 else if(
osStrcmp(object->name,
"ipDefaultRouterPreference") == 0)
3084 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
3101 if(*nextOidLen < object->
oidLen)
3105 osMemcpy(nextOid, object->oid, object->oidLen);
3107 #if (IPV4_SUPPORT == ENABLED)
3120 entry = &interface->ipv4Context.addrList[i];
3163 else if(curIndex < index)
3185 #if (IPV6_SUPPORT == ENABLED)
3198 entry = &interface->ipv6Context.routerList[i];
3240 else if(curIndex < index)
3305 #if (IPV6_SUPPORT == ENABLED)
3308 value->integer, commit);
3329 #if (IPV6_SUPPORT == ENABLED)
3377 #if (IPV6_SUPPORT == ENABLED && NDP_ROUTER_ADV_SUPPORT == ENABLED)
3400 routerAdvContext =
netInterface[index - 1].ndpRouterAdvContext;
3403 if(routerAdvContext != NULL)
3406 if(
osStrcmp(object->name,
"ipv6RouterAdvertSendAdverts") == 0)
3411 if(routerAdvContext->running)
3421 else if(
osStrcmp(object->name,
"ipv6RouterAdvertMaxInterval") == 0)
3425 value->unsigned32 = routerAdvContext->settings.maxRtrAdvInterval;
3428 else if(
osStrcmp(object->name,
"ipv6RouterAdvertMinInterval") == 0)
3432 value->unsigned32 = routerAdvContext->settings.minRtrAdvInterval;
3435 else if(
osStrcmp(object->name,
"ipv6RouterAdvertManagedFlag") == 0)
3439 if(routerAdvContext->settings.managedFlag)
3449 else if(
osStrcmp(object->name,
"ipv6RouterAdvertOtherConfigFlag") == 0)
3453 if(routerAdvContext->settings.otherConfigFlag)
3463 else if(
osStrcmp(object->name,
"ipv6RouterAdvertLinkMTU") == 0)
3467 value->unsigned32 = routerAdvContext->settings.linkMtu;
3470 else if(
osStrcmp(object->name,
"ipv6RouterAdvertReachableTime") == 0)
3474 value->unsigned32 = routerAdvContext->settings.reachableTime;
3477 else if(
osStrcmp(object->name,
"ipv6RouterAdvertRetransmitTime") == 0)
3481 value->unsigned32 = routerAdvContext->settings.retransTimer;
3484 else if(
osStrcmp(object->name,
"ipv6RouterAdvertCurHopLimit") == 0)
3488 value->unsigned32 = routerAdvContext->settings.curHopLimit;
3491 else if(
osStrcmp(object->name,
"ipv6RouterAdvertDefaultLifetime") == 0)
3495 value->unsigned32 = routerAdvContext->settings.defaultLifetime;
3498 else if(
osStrcmp(object->name,
"ipv6RouterAdvertRowStatus") == 0)
3536 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
3538 #if (IPV6_SUPPORT == ENABLED && NDP_ROUTER_ADV_SUPPORT == ENABLED)
3544 if(*nextOidLen < object->
oidLen)
3548 osMemcpy(nextOid, object->oid, object->oidLen);
3554 if(
netInterface[index - 1].ndpRouterAdvContext != NULL)
3615 #if (IPV4_SUPPORT == ENABLED)
3624 #if (IPV6_SUPPORT == ENABLED)
3643 if(
osStrcmp(object->name,
"icmpStatsInMsgs") == 0)
3648 else if(
osStrcmp(object->name,
"icmpStatsInErrors") == 0)
3653 else if(
osStrcmp(object->name,
"icmpStatsOutMsgs") == 0)
3658 else if(
osStrcmp(object->name,
"icmpStatsOutErrors") == 0)
3690 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
3697 if(*nextOidLen < object->
oidLen)
3701 osMemcpy(nextOid, object->oid, object->oidLen);
3706 #if (IPV4_SUPPORT == DISABLED)
3714 #if (IPV6_SUPPORT == DISABLED)
3791 #if (IPV4_SUPPORT == ENABLED)
3800 #if (IPV6_SUPPORT == ENABLED)
3819 if(
osStrcmp(object->name,
"icmpMsgStatsInPkts") == 0)
3824 else if(
osStrcmp(object->name,
"icmpMsgStatsOutPkts") == 0)
3856 size_t oidLen, uint8_t *nextOid,
size_t *nextOidLen)
3865 if(*nextOidLen < object->
oidLen)
3869 osMemcpy(nextOid, object->oid, object->oidLen);
3874 #if (IPV4_SUPPORT == ENABLED)
3883 #if (IPV6_SUPPORT == ENABLED)
@ IPV6_ADDR_STATE_TENTATIVE
An address whose uniqueness on a link is being verified.
error_t ipMibGetIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressPrefixEntry object value.
@ IP_MIB_ROUTER_PREFERENCE_MEDIUM
error_t ipMibGetIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipDefaultRouterEntry object value.
NdpNeighborCacheEntry * ndpFindNeighborCacheEntry(NetInterface *interface, const Ipv6Addr *ipAddr)
Search the Neighbor cache for a given IPv6 address.
IPv6 (Internet Protocol Version 6)
error_t ipMibGetNextIpSystemStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipSystemStatsEntry object.
uint32_t ipIfStatsInDelivers
@ IP_MIB_ROUTER_PREFERENCE_RESERVED
uint32_t ipIfStatsInOctets
uint32_t ipSystemStatsOutMcastOctets
systime_t lifetime
Router lifetime.
@ IP_MIB_PREFIX_ORIGIN_MANUAL
Per-message ICMP statistics.
uint64_t ipIfStatsHCInMcastPkts
error_t mibEncodeIpAddr(uint8_t *oid, size_t maxOidLen, size_t *pos, const IpAddr *ipAddr)
Encode instance identifier (IP address)
error_t ipMibSetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6RouterAdvertSpinLock object value.
uint64_t ipIfStatsHCOutMcastPkts
@ NDP_ROUTER_SEL_PREFERENCE_MEDIUM
uint32_t ipIfStatsOutOctets
error_t ipMibGetIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressEntry object value.
@ IP_MIB_ADDR_STATUS_TENTATIVE
Ipv4Addr addr
IPv4 address.
uint64_t ipIfStatsHCInBcastPkts
IpMibIcmpMsgStatsEntry icmpMsgStatsTable
uint32_t ipSystemStatsInUnknownProtos
uint32_t netGetRandRange(uint32_t min, uint32_t max)
Generate a random value in the specified range.
uint32_t ipSystemStatsOutMcastPkts
int32_t ipv6RouterAdvertSpinLock
uint32_t ipSystemStatsOutTransmits
uint32_t icmpMsgStatsOutPkts[256]
error_t ipMibInit(void)
IP MIB module initialization.
int32_t ipAddressSpinLock
error_t ipMibGetNextIcmpStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next icmpStatsEntry object.
@ IP_MIB_ADDR_TYPE_UNICAST
uint32_t ipIfStatsReasmFails
systime_t preferredLifetime
Preferred lifetime.
uint32_t ipSystemStatsInForwDatagrams
error_t ipMibGetIpSystemStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipSystemStatsEntry object value.
uint64_t ipSystemStatsHCInMcastOctets
@ NDP_ROUTER_SEL_PREFERENCE_LOW
error_t ipMibGetIpAddressSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipAddressSpinLock object value.
const IpAddr IP_ADDR_UNSPECIFIED
uint32_t ipIfStatsInNoRoutes
#define NDP_NEIGHBOR_CACHE_SIZE
Ipv6Addr addr
IPv6 address.
uint64_t ipIfStatsHCOutRequests
error_t ipMibGetNextIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipAddressEntry object.
@ IP_MIB_NET_TO_PHYS_STATE_PROBE
uint32_t ipSystemStatsInDelivers
uint64_t ipSystemStatsHCInOctets
bool_t autonomousFlag
Autonomous flag.
uint32_t ipSystemStatsOutFragCreates
uint64_t ipIfStatsHCInForwDatagrams
uint64_t ipSystemStatsHCOutRequests
systime_t validLifetime
Valid lifetime.
uint32_t ipSystemStatsInReceives
@ IP_MIB_ADDR_ORIGIN_RANDOM
@ IP_MIB_NET_TO_PHYS_STATE_UNKNOWN
#define NET_INTERFACE_COUNT
uint32_t ipIfStatsOutBcastPkts
uint32_t ipSystemStatsReasmFails
Ipv4AddrState state
IPv4 address state.
#define ipv6CompAddr(ipAddr1, ipAddr2)
uint_t ipv4GetPrefixLength(Ipv4Addr mask)
Calculate prefix length for a given subnet mask.
uint64_t ipSystemStatsHCOutTransmits
error_t ipMibGetNextIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv4InterfaceEntry object.
Ipv6Addr prefix
IPv6 prefix information.
uint32_t ipSystemStatsRefreshRate
#define IPV4_MAX_FRAG_DATAGRAM_SIZE
Ipv6Addr addr
Router address.
error_t ipMibGetIcmpStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get icmpStatsEntry object value.
uint64_t ipIfStatsHCInReceives
uint32_t ipSystemStatsInMcastOctets
@ IP_MIB_IP_FORWARDING_ENABLED
uint32_t Ipv4Addr
IPv4 network address.
int_t oidComp(const uint8_t *oid1, size_t oidLen1, const uint8_t *oid2, size_t oidLen2)
Compare object identifiers.
#define IPV6_DEFAULT_HOP_LIMIT
uint32_t ipSystemStatsInTruncatedPkts
uint32_t ipSystemStatsOutNoRoutes
uint32_t icmpStatsOutMsgs
uint32_t ipSystemStatsReasmReqds
#define macCopyAddr(destMacAddr, srcMacAddr)
@ IPV6_ADDR_STATE_INVALID
An address that is not assigned to any interface.
uint64_t ipSystemStatsHCOutBcastPkts
int32_t ipv6IpDefaultHopLimit
Router advertisement service.
uint32_t ipIfStatsInReceives
uint64_t ipSystemStatsHCOutOctets
systime_t timestamp
Timestamp to manage entry lifetime.
uint32_t ipIfStatsOutForwDatagrams
uint32_t ipIfStatsReasmOKs
int_t mibCompIpAddr(const IpAddr *ipAddr1, const IpAddr *ipAddr2)
Compare IP addresses.
uint32_t ipSystemStatsReasmOKs
Helper functions for IPv4.
#define NdpRouterAdvContext
Ipv4Addr defaultGateway
Default gateway.
uint32_t ipSystemStatsDiscontinuityTime
uint32_t ipSystemStatsOutFragReqds
uint64_t ipSystemStatsHCInForwDatagrams
uint64_t ipSystemStatsHCOutForwDatagrams
#define osMemcpy(dest, src, length)
MacAddr macAddr
Link layer address associated with the IPv6 address.
@ IP_MIB_PREFIX_ORIGIN_ROUTER_ADV
error_t ipMibGetIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get icmpMsgStatsEntry object value.
uint32_t ipIfStatsOutFragReqds
uint64_t ipSystemStatsHCInMcastPkts
@ IPV4_ADDR_STATE_TENTATIVE
An address whose uniqueness on a link is being verified.
@ IP_MIB_ADDR_STATUS_PREFERRED
@ ERROR_INSTANCE_NOT_FOUND
uint64_t ipSystemStatsHCOutMcastPkts
error_t ipMibGetNextIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6RouterAdvertEntry object.
#define eui64CopyAddr(destEui64Addr, srcEui64Addr)
MacAddr macAddr
Link layer address associated with the IPv4 address.
uint32_t ipSystemStatsOutBcastPkts
uint32_t ipIfStatsRefreshRate
uint64_t ipIfStatsHCOutMcastOctets
error_t ipMibSetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6InterfaceEntry object value.
error_t ipMibGetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipNetToPhysicalEntry object value.
uint8_t preference
Preference value.
uint32_t ipSystemStatsInHdrErrors
uint32_t ipIfStatsOutRequests
error_t ipMibGetNextIpDefaultRouterEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipDefaultRouterEntry object.
@ IP_MIB_NET_TO_PHYS_STATE_INCOMPLETE
uint32_t ipSystemStatsOutDiscards
@ IP_MIB_ADDR_ORIGIN_DHCP
uint32_t ipSystemStatsInBcastPkts
@ IP_MIB_NET_TO_PHYS_STATE_REACHABLE
uint64_t ipIfStatsHCInDelivers
error_t ipMibGetIpv6RouterAdvertSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6RouterAdvertSpinLock object value.
General definitions for cryptographic algorithms.
#define IPV6_MAX_FRAG_DATAGRAM_SIZE
IP MIB module implementation.
Helper functions for IPv6.
uint32_t ipSystemStatsInMcastPkts
uint32_t ipSystemStatsOutFragFails
IpMibBase ipMibBase
IP MIB base.
IpMibIpIfStatsEntry ipv4IfStatsTable[NET_INTERFACE_COUNT]
uint64_t ipSystemStatsHCInBcastPkts
error_t ipMibGetNextIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6InterfaceEntry object.
uint32_t ipIfStatsDiscontinuityTime
error_t ipMibGetIpv6InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6InterfaceEntry object value.
#define IPV4_ADDR_LIST_SIZE
error_t ipMibSetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv6RouterAdvertEntry object value.
#define IPV4_FRAG_TIME_TO_LIVE
uint32_t icmpStatsInErrors
Neighbor and destination cache management.
uint64_t ipSystemStatsHCOutMcastOctets
uint32_t ipSystemStatsOutOctets
@ IP_MIB_NET_TO_PHYS_STATE_STALE
IpMibIpSystemStatsEntry ipv6SystemStats
ArpState state
Reachability state.
error_t ipMibGetNextIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipNetToPhysicalEntry object.
@ IP_MIB_ROUTER_PREFERENCE_LOW
uint32_t ipIfStatsInTruncatedPkts
bool_t onLinkFlag
On-link flag.
bool_t permanent
Permanently assigned prefix.
uint8_t prefixLen
IPv6 prefix length.
error_t mibDecodeIndex(const uint8_t *oid, size_t oidLen, size_t *pos, uint_t *index)
Decode instance identifier (index)
Ipv4Addr subnetMask
Subnet mask.
error_t ipMibSetIpNetToPhysicalEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipNetToPhysicalEntry object value.
Ipv6Addr ipAddr
Unicast IPv6 address.
error_t ipMibGetIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6ScopeZoneIndexEntry object value.
error_t ipMibGetNextIcmpMsgStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next icmpMsgStatsEntry object.
uint32_t ipSystemStatsOutFragOKs
Default router list entry.
@ NDP_ROUTER_SEL_PREFERENCE_HIGH
System-wide IP statistics.
ArpCacheEntry * arpFindEntry(NetInterface *interface, Ipv4Addr ipAddr)
Search the ARP cache for a given IPv4 address.
@ IP_MIB_ROUTER_PREFERENCE_HIGH
uint32_t ipSystemStatsInOctets
error_t ipMibSetIpAddressEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipAddressEntry object value.
uint64_t ipIfStatsHCInOctets
Common definitions for MIB modules.
uint64_t ipSystemStatsHCInReceives
#define IPV6_ROUTER_LIST_SIZE
error_t ipMibGetIpIfStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipIfStatsEntry object value.
error_t ipMibGetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv4InterfaceEntry object value.
uint32_t icmpMsgStatsInPkts[256]
#define IPV6_ADDR_LIST_SIZE
NdpState state
Reachability state.
uint64_t ipIfStatsHCOutForwDatagrams
uint32_t ipSystemStatsOutForwDatagrams
error_t ipMibGetNextIpv6ScopeZoneIndexEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipv6ScopeZoneIndexEntry object.
uint32_t ipIfStatsOutFragOKs
uint64_t ipIfStatsHCOutBcastPkts
uint32_t ipSystemStatsInDiscards
uint64_t ipIfStatsHCOutOctets
IpMibIpIfStatsEntry ipv6IfStatsTable[NET_INTERFACE_COUNT]
systime_t timestamp
Time stamp to manage entry lifetime.
IpMibIcmpStatsEntry icmpStats
uint32_t ipIfStatsInUnknownProtos
IpMibIcmpMsgStatsEntry icmpv6MsgStatsTable
bool_t ipv6CompPrefix(const Ipv6Addr *ipAddr1, const Ipv6Addr *ipAddr2, size_t length)
Compare IPv6 address prefixes.
error_t mibDecodeIpAddr(const uint8_t *oid, size_t oidLen, size_t *pos, IpAddr *ipAddr)
Decode instance identifier (IP address)
@ MIB_STORAGE_TYPE_VOLATILE
error_t mibDecodeUnsigned32(const uint8_t *oid, size_t oidLen, size_t *pos, uint32_t *value)
Decode instance identifier (unsigned 32-bit integer)
uint32_t ipIfStatsInAddrErrors
error_t ipMibGetNextIpIfStatsEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipIfStatsEntry object.
uint32_t ipIfStatsInForwDatagrams
error_t mibEncodeIndex(uint8_t *oid, size_t maxOidLen, size_t *pos, uint_t index)
Encode instance identifier (index)
Per-interface IP statistics.
@ IPV4_ADDR_STATE_VALID
An address assigned to an interface whose use is unrestricted.
@ IP_MIB_IP_FORWARDING_DISABLED
error_t mibTestAndIncSpinLock(int32_t *spinLock, int32_t value, bool_t commit)
Test and increment spin lock.
error_t mibEncodeUnsigned32(uint8_t *oid, size_t maxOidLen, size_t *pos, uint32_t value)
Encode instance identifier (unsigned 32-bit integer)
IPv4 (Internet Protocol Version 4)
uint64_t ipIfStatsHCOutTransmits
@ IPV6_ADDR_STATE_PREFERRED
An address assigned to an interface whose use is unrestricted.
uint32_t ipIfStatsOutDiscards
Ipv6AddrState state
IPv6 address state.
uint32_t ipIfStatsOutMcastOctets
#define IPV6_PREFIX_LIST_SIZE
uint32_t ipIfStatsOutFragFails
#define osMemset(p, value, length)
uint32_t ipIfStatsReasmReqds
uint32_t ipSystemStatsInNoRoutes
uint64_t ipSystemStatsHCInDelivers
NetInterface * nicGetLogicalInterface(NetInterface *interface)
Retrieve logical interface.
@ IP_MIB_ADDR_ORIGIN_MANUAL
@ IPV6_ADDR_STATE_DEPRECATED
An address assigned to an interface whose use is discouraged.
error_t ipMibGetNextIpAddressPrefixEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, uint8_t *nextOid, size_t *nextOidLen)
Get next ipAddressPrefixEntry object.
uint32_t ipIfStatsInDiscards
uint32_t ipIfStatsInMcastPkts
@ IP_MIB_NET_TO_PHYS_TYPE_DYNAMIC
@ IP_MIB_NET_TO_PHYS_STATE_DELAY
#define ARP_REQUEST_TIMEOUT
uint32_t ipIfStatsInMcastOctets
uint32_t ipSystemStatsInAddrErrors
error_t ipMibSetIpv4InterfaceEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipv4InterfaceEntry object value.
error_t ipMibGetIpv6RouterAdvertEntry(const MibObject *object, const uint8_t *oid, size_t oidLen, MibVariant *value, size_t *valueLen)
Get ipv6RouterAdvertEntry object value.
@ IP_MIB_ADDR_STATUS_DEPRECATED
error_t ipMibSetIpAddressSpinLock(const MibObject *object, const uint8_t *oid, size_t oidLen, const MibVariant *value, size_t valueLen, bool_t commit)
Set ipAddressSpinLock object value.
Ipv4Addr ipAddr
Unicast IPv4 address.
uint32_t ipSystemStatsOutRequests
@ IP_MIB_ADDR_STATUS_UNKNOWN
uint32_t ipIfStatsOutTransmits
uint32_t ipIfStatsInHdrErrors
uint32_t ipIfStatsInBcastPkts
ASN.1 (Abstract Syntax Notation One)
uint32_t ipIfStatsOutMcastPkts
uint32_t icmpStatsOutErrors
uint32_t ipIfStatsOutFragCreates
uint64_t ipIfStatsHCInMcastOctets
#define IPV4_UNSPECIFIED_ADDR
IpMibIpSystemStatsEntry ipv4SystemStats
IpMibIcmpStatsEntry icmpv6Stats