[mac] rename mRxWhitelistFiltered to mRxAddressFiltered (#2263)

This commit is contained in:
rongli
2017-10-13 09:33:23 -07:00
committed by Jonathan Hui
parent 54fa0f1836
commit b1baa7da52
9 changed files with 17 additions and 31 deletions
+2 -6
View File
@@ -3510,8 +3510,8 @@ otThreadErrorToString(
retval = "InvalidSourceAddress";
break;
case OT_ERROR_WHITELIST_FILTERED:
retval = "WhitelistFiltered";
case OT_ERROR_ADDRESS_FILTERED:
retval = "AddressFiltered";
break;
case OT_ERROR_DESTINATION_ADDRESS_FILTERED:
@@ -3526,10 +3526,6 @@ otThreadErrorToString(
retval = "Already";
break;
case OT_ERROR_BLACKLIST_FILTERED:
retval = "BlacklistFiltered";
break;
case OT_ERROR_IP6_ADDRESS_CREATION_FAILURE:
retval = "Ipv6AddressCreationFailure";
break;
+3 -8
View File
@@ -203,9 +203,9 @@ typedef enum otError
OT_ERROR_INVALID_SOURCE_ADDRESS = 20,
/**
* Received a frame filtered by the whitelist.
* Received a frame filtered by the address filter (whitelisted or blacklisted).
*/
OT_ERROR_WHITELIST_FILTERED = 21,
OT_ERROR_ADDRESS_FILTERED = 21,
/**
* Received a frame filtered by the destination address check.
@@ -222,11 +222,6 @@ typedef enum otError
*/
OT_ERROR_ALREADY = 24,
/**
* Received a frame filtered by the blacklist.
*/
OT_ERROR_BLACKLIST_FILTERED = 25,
/**
* The creation of IPv6 address failed.
*/
@@ -962,7 +957,7 @@ typedef struct otMacCounters
uint32_t mRxBeacon; ///< The number of received beacon.
uint32_t mRxBeaconRequest; ///< The number of received beacon request.
uint32_t mRxOther; ///< The number of received other types of frames.
uint32_t mRxWhitelistFiltered; ///< The number of received packets filtered by whitelist.
uint32_t mRxAddressFiltered; ///< The number of received packets filtered by address filter (whitelist or blacklist).
uint32_t mRxDestAddrFiltered; ///< The number of received packets filtered by destination check.
uint32_t mRxDuplicated; ///< The number of received duplicated packets.
uint32_t mRxErrNoFrame; ///< The number of received packets that do not contain contents.
+1 -1
View File
@@ -427,7 +427,7 @@ RxTotal: 2
RxBeacon: 0
RxBeaconRequest: 0
RxOther: 0
RxWhitelistFiltered: 0
RxAddressFiltered: 0
RxDestAddrFiltered: 0
RxDuplicated: 0
RxErrNoFrame: 0
+1 -1
View File
@@ -688,7 +688,7 @@ void Interpreter::ProcessCounters(int argc, char *argv[])
mServer->OutputFormat(" RxBeacon: %d\r\n", counters->mRxBeacon);
mServer->OutputFormat(" RxBeaconRequest: %d\r\n", counters->mRxBeaconRequest);
mServer->OutputFormat(" RxOther: %d\r\n", counters->mRxOther);
mServer->OutputFormat(" RxWhitelistFiltered: %d\r\n", counters->mRxWhitelistFiltered);
mServer->OutputFormat(" RxAddressFiltered: %d\r\n", counters->mRxAddressFiltered);
mServer->OutputFormat(" RxDestAddrFiltered: %d\r\n", counters->mRxDestAddrFiltered);
mServer->OutputFormat(" RxDuplicated: %d\r\n", counters->mRxDuplicated);
mServer->OutputFormat(" RxErrNoFrame: %d\r\n", counters->mRxErrNoFrame);
+2 -6
View File
@@ -358,8 +358,8 @@ const char *otThreadErrorToString(otError aError)
retval = "InvalidSourceAddress";
break;
case OT_ERROR_WHITELIST_FILTERED:
retval = "WhitelistFiltered";
case OT_ERROR_ADDRESS_FILTERED:
retval = "AddressFiltered";
break;
case OT_ERROR_DESTINATION_ADDRESS_FILTERED:
@@ -374,10 +374,6 @@ const char *otThreadErrorToString(otError aError)
retval = "Already";
break;
case OT_ERROR_BLACKLIST_FILTERED:
retval = "BlacklistFiltered";
break;
case OT_ERROR_IP6_ADDRESS_CREATION_FAILURE:
retval = "Ipv6AddressCreationFailure";
break;
+4 -4
View File
@@ -1795,8 +1795,8 @@ exit:
mCounters.mRxErrInvalidSrcAddr++;
break;
case OT_ERROR_WHITELIST_FILTERED:
mCounters.mRxWhitelistFiltered++;
case OT_ERROR_ADDRESS_FILTERED:
mCounters.mRxAddressFiltered++;
break;
case OT_ERROR_DESTINATION_ADDRESS_FILTERED:
@@ -1893,10 +1893,10 @@ void Mac::FillMacCountersTlv(NetworkDiagnostic::MacCountersTlv &aMacCounters) co
aMacCounters.SetIfOutErrors(mCounters.mTxErrCca);
aMacCounters.SetIfInUcastPkts(mCounters.mRxUnicast);
aMacCounters.SetIfInBroadcastPkts(mCounters.mRxBroadcast);
aMacCounters.SetIfInDiscards(mCounters.mRxWhitelistFiltered + mCounters.mRxDestAddrFiltered + mCounters.mRxDuplicated);
aMacCounters.SetIfInDiscards(mCounters.mRxAddressFiltered + mCounters.mRxDestAddrFiltered + mCounters.mRxDuplicated);
aMacCounters.SetIfOutUcastPkts(mCounters.mTxUnicast);
aMacCounters.SetIfOutBroadcastPkts(mCounters.mTxBroadcast);
aMacCounters.SetIfOutDiscards(0);
aMacCounters.SetIfOutDiscards(mCounters.mTxErrBusyChannel);
}
void Mac::ResetCounters(void)
+2 -2
View File
@@ -268,11 +268,11 @@ otError Filter::Apply(const ExtAddress &aExtAddress, int8_t &aRss)
// check AddressFilter.
if (mAddressMode == OT_MAC_FILTER_ADDRESS_MODE_WHITELIST)
{
VerifyOrExit(entry != NULL && entry->mFiltered, error = OT_ERROR_WHITELIST_FILTERED);
VerifyOrExit(entry != NULL && entry->mFiltered, error = OT_ERROR_ADDRESS_FILTERED);
}
else if (mAddressMode == OT_MAC_FILTER_ADDRESS_MODE_BLACKLIST)
{
VerifyOrExit(entry == NULL || !entry->mFiltered, error = OT_ERROR_BLACKLIST_FILTERED);
VerifyOrExit(entry == NULL || !entry->mFiltered, error = OT_ERROR_ADDRESS_FILTERED);
}
// not override the default RssIn setting if no specific RssIn on the Extended Address.
+1 -2
View File
@@ -197,8 +197,7 @@ public:
* @param[out] aRss A reference to where the received signal strength to be placed.
*
* @retval OT_ERROR_NONE Successfully applied the filter rules on @p aExtAddress.
* @retval OT_ERROR_WHITELIST_FILTERED Whitelist is enabled and @p aExtAddress is not in the whitelist
* @retval OT_ERROR_BLACKLIST_FILTERED Blacklist is enabled and @p aExtAddress is in the blacklist
* @retval OT_ERROR_ADDRESS_FILTERED Address filter (whitelist or blacklist) is enabled and @p aExtAddress is filtered.
*
*/
otError Apply(const ExtAddress &aExtAddress, int8_t &aRss);
+1 -1
View File
@@ -1443,7 +1443,7 @@ otError NcpBase::GetPropertyHandler_CNTR_RX_PKT_OTHER(void)
otError NcpBase::GetPropertyHandler_CNTR_RX_PKT_FILT_WL(void)
{
return mEncoder.WriteUint32(otLinkGetCounters(mInstance)->mRxWhitelistFiltered);
return mEncoder.WriteUint32(otLinkGetCounters(mInstance)->mRxAddressFiltered);
}
otError NcpBase::GetPropertyHandler_CNTR_RX_PKT_FILT_DA(void)