Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the redundant chip:: prefix #37898

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/platform/openiotsdk/app/openiotsdk_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void post_network_connect()
// Iterate on the network interface to see if we already have beed assigned addresses.
for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next())
{
char ifName[chip::Inet::InterfaceId::kMaxIfNameLength];
char ifName[Inet::InterfaceId::kMaxIfNameLength];
if (it.IsUp() && CHIP_NO_ERROR == it.GetInterfaceName(ifName, sizeof(ifName)))
{
chip::Inet::IPAddress addr;
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetCommonPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void ShutdownSystemLayer()
#if CHIP_SYSTEM_CONFIG_USE_LWIP && !(CHIP_SYSTEM_CONFIG_LWIP_SKIP_INIT)
static void PrintNetworkState()
{
char intfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char intfName[InterfaceId::kMaxIfNameLength];

for (size_t j = 0; j < gNetworkOptions.TapDeviceName.size(); j++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TEST_F(TestInetEndPoint, TestInetInterface)
{
InterfaceIterator intIterator;
InterfaceAddressIterator addrIterator;
char intName[chip::Inet::InterfaceId::kMaxIfNameLength];
char intName[InterfaceId::kMaxIfNameLength];
InterfaceId intId;
IPAddress addr;
InterfaceType intType;
Expand Down
4 changes: 2 additions & 2 deletions src/platform/Linux/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf)
{
if ((addr->ifa_addr) && (addr->ifa_addr->sa_family == AF_PACKET))
{
if (strncmp(addr->ifa_name, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, chip::Inet::InterfaceId::kMaxIfNameLength) == 0)
if (strncmp(addr->ifa_name, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, Inet::InterfaceId::kMaxIfNameLength) == 0)
{
mac = (struct sockaddr_ll *) addr->ifa_addr;
break;
}

if (strncmp(addr->ifa_name, "lo", chip::Inet::InterfaceId::kMaxIfNameLength) != 0 && !mac)
if (strncmp(addr->ifa_name, "lo", Inet::InterfaceId::kMaxIfNameLength) != 0 && !mac)
{
mac = (struct sockaddr_ll *) addr->ifa_addr;
}
Expand Down
6 changes: 3 additions & 3 deletions src/platform/Linux/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
mpConnectCallback = nullptr;
mpScanCallback = nullptr;

if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got Ethernet interface: %s", mEthIfName);
}
Expand All @@ -131,7 +131,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got WiFi interface: %s", sWiFiIfName);
}
Expand Down Expand Up @@ -1621,7 +1621,7 @@ void ConnectivityManagerImpl::PostNetworkConnect()
// This should be removed or find a better place once we depercate the rendezvous session.
for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next())
{
char ifName[chip::Inet::InterfaceId::kMaxIfNameLength];
char ifName[Inet::InterfaceId::kMaxIfNameLength];
if (it.IsUp() && CHIP_NO_ERROR == it.GetInterfaceName(ifName, sizeof(ifName)) &&
strncmp(ifName, sWiFiIfName, sizeof(ifName)) == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/platform/Linux/ConnectivityManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,

// ===== Private members reserved for use by this class only.

char mEthIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char mEthIfName[Inet::InterfaceId::kMaxIfNameLength];

#if CHIP_DEVICE_CONFIG_ENABLE_WPA
ConnectivityManager::WiFiStationMode mWiFiStationMode;
Expand All @@ -301,7 +301,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
char sWiFiIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char sWiFiIfName[Inet::InterfaceId::kMaxIfNameLength];
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WPA
Expand Down
2 changes: 1 addition & 1 deletion src/platform/Linux/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ gboolean WiFiIPChangeListener(GIOChannel * ch, GIOCondition /* condition */, voi
{
if (routeInfo->rta_type == IFA_LOCAL)
{
char name[chip::Inet::InterfaceId::kMaxIfNameLength];
char name[Inet::InterfaceId::kMaxIfNameLength];
if (if_indextoname(addressMessage->ifa_index, name) == nullptr)
{
ChipLogError(DeviceLayer, "Error %d when getting the interface name at index: %d", errno,
Expand Down
4 changes: 2 additions & 2 deletions src/platform/NuttX/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf)
{
if ((addr->ifa_addr) && (addr->ifa_addr->sa_family == AF_PACKET))
{
if (strncmp(addr->ifa_name, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, chip::Inet::InterfaceId::kMaxIfNameLength) == 0)
if (strncmp(addr->ifa_name, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, Inet::InterfaceId::kMaxIfNameLength) == 0)
{
mac = (struct sockaddr_ll *) addr->ifa_addr;
break;
}

if (strncmp(addr->ifa_name, "lo", chip::Inet::InterfaceId::kMaxIfNameLength) != 0 && !mac)
if (strncmp(addr->ifa_name, "lo", Inet::InterfaceId::kMaxIfNameLength) != 0 && !mac)
{
mac = (struct sockaddr_ll *) addr->ifa_addr;
}
Expand Down
6 changes: 3 additions & 3 deletions src/platform/NuttX/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
mpConnectCallback = nullptr;
mpScanCallback = nullptr;

if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got Ethernet interface: %s", mEthIfName);
}
Expand All @@ -128,7 +128,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got WiFi interface: %s", sWiFiIfName);
}
Expand Down Expand Up @@ -1272,7 +1272,7 @@ void ConnectivityManagerImpl::PostNetworkConnect()
// This should be removed or find a better place once we depercate the rendezvous session.
for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next())
{
char ifName[chip::Inet::InterfaceId::kMaxIfNameLength];
char ifName[Inet::InterfaceId::kMaxIfNameLength];
if (it.IsUp() && CHIP_NO_ERROR == it.GetInterfaceName(ifName, sizeof(ifName)) &&
strncmp(ifName, sWiFiIfName, sizeof(ifName)) == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/platform/NuttX/ConnectivityManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,

// ===== Private members reserved for use by this class only.

char mEthIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char mEthIfName[Inet::InterfaceId::kMaxIfNameLength];

#if CHIP_DEVICE_CONFIG_ENABLE_WPA
ConnectivityManager::WiFiStationMode mWiFiStationMode;
Expand All @@ -260,7 +260,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
char sWiFiIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char sWiFiIfName[Inet::InterfaceId::kMaxIfNameLength];
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WPA
Expand Down
2 changes: 1 addition & 1 deletion src/platform/NuttX/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ gboolean WiFiIPChangeListener(GIOChannel * ch, GIOCondition /* condition */, voi
{
if (routeInfo->rta_type == IFA_LOCAL)
{
char name[chip::Inet::InterfaceId::kMaxIfNameLength];
char name[Inet::InterfaceId::kMaxIfNameLength];
if (if_indextoname(addressMessage->ifa_index, name) == nullptr)
{
ChipLogError(DeviceLayer, "Error %d when getting the interface name at index: %d", errno,
Expand Down
4 changes: 2 additions & 2 deletions src/platform/Tizen/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
{
CHIP_ERROR err = CHIP_NO_ERROR;

if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got Ethernet interface: %s", mEthIfName);
}
Expand All @@ -92,7 +92,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()

Internal::WiFiMgr().Init();

if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got WiFi interface: %s", sWiFiIfName);
}
Expand Down
4 changes: 2 additions & 2 deletions src/platform/Tizen/ConnectivityManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,

// ===== Private members reserved for use by this class only.

char mEthIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char mEthIfName[Inet::InterfaceId::kMaxIfNameLength];

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
ConnectivityManager::WiFiStationMode mWiFiStationMode;
Expand All @@ -143,7 +143,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,
System::Clock::Timestamp mLastAPDemandTime;
System::Clock::Timeout mWiFiStationReconnectInterval;
System::Clock::Timeout mWiFiAPIdleTimeout;
static char sWiFiIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
static char sWiFiIfName[Inet::InterfaceId::kMaxIfNameLength];
#endif
};

Expand Down
2 changes: 1 addition & 1 deletion src/platform/webos/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf)
for (auto addr = addresses; addr != nullptr; addr = addr->ifa_next)
{
if ((addr->ifa_addr) && (addr->ifa_addr->sa_family == AF_PACKET) &&
strncmp(addr->ifa_name, "lo", chip::Inet::InterfaceId::kMaxIfNameLength) != 0)
strncmp(addr->ifa_name, "lo", Inet::InterfaceId::kMaxIfNameLength) != 0)
{
struct sockaddr_ll * mac = (struct sockaddr_ll *) addr->ifa_addr;
memcpy(buf, mac->sll_addr, mac->sll_halen);
Expand Down
6 changes: 3 additions & 3 deletions src/platform/webos/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
mpConnectCallback = nullptr;
mpScanCallback = nullptr;

if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetEthInterfaceName(mEthIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got Ethernet interface: %s", mEthIfName);
}
Expand All @@ -114,7 +114,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, chip::Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
if (ConnectivityUtils::GetWiFiInterfaceName(sWiFiIfName, Inet::InterfaceId::kMaxIfNameLength) == CHIP_NO_ERROR)
{
ChipLogProgress(DeviceLayer, "Got WiFi interface: %s", sWiFiIfName);
}
Expand Down Expand Up @@ -1048,7 +1048,7 @@ void ConnectivityManagerImpl::PostNetworkConnect()
// This should be removed or find a better place once we depercate the rendezvous session.
for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next())
{
char ifName[chip::Inet::InterfaceId::kMaxIfNameLength];
char ifName[Inet::InterfaceId::kMaxIfNameLength];
if (it.IsUp() && CHIP_NO_ERROR == it.GetInterfaceName(ifName, sizeof(ifName)) &&
strncmp(ifName, sWiFiIfName, sizeof(ifName)) == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/platform/webos/ConnectivityManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,

// ===== Private members reserved for use by this class only.

char mEthIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
char mEthIfName[Inet::InterfaceId::kMaxIfNameLength];

#if CHIP_DEVICE_CONFIG_ENABLE_WPA
ConnectivityManager::WiFiStationMode mWiFiStationMode;
Expand All @@ -243,7 +243,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager,
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
static char sWiFiIfName[chip::Inet::InterfaceId::kMaxIfNameLength];
static char sWiFiIfName[Inet::InterfaceId::kMaxIfNameLength];
#endif

static NetworkCommissioning::WiFiDriver::ScanCallback * mpScanCallback;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/webos/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void PlatformManagerImpl::WiFiIPChangeListener()
{
if (routeInfo->rta_type == IFA_LOCAL)
{
char name[chip::Inet::InterfaceId::kMaxIfNameLength];
char name[Inet::InterfaceId::kMaxIfNameLength];
if (if_indextoname(addressMessage->ifa_index, name) == nullptr)
{
ChipLogError(DeviceLayer, "Error %d when getting the interface name at index: %d", errno,
Expand Down
4 changes: 2 additions & 2 deletions src/transport/SessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand

while (interfaceIt.Next())
{
char name[chip::Inet::InterfaceId::kMaxIfNameLength];
interfaceIt.GetInterfaceName(name, chip::Inet::InterfaceId::kMaxIfNameLength);
char name[Inet::InterfaceId::kMaxIfNameLength];
interfaceIt.GetInterfaceName(name, Inet::InterfaceId::kMaxIfNameLength);
if (interfaceIt.SupportsMulticast() && interfaceIt.IsUp())
{
interfaceId = interfaceIt.GetInterfaceId();
Expand Down
Loading