Refactor ip address representation (#5252)

This commit is contained in:
Jimmy Hedman
2023-09-27 10:38:43 +02:00
committed by GitHub
parent 9d4f471855
commit 57b7dd0fa2
24 changed files with 225 additions and 175 deletions
+3 -4
View File
@@ -67,8 +67,8 @@ bool E131Component::join_igmp_groups_() {
if (!universe.second)
continue;
ip4_addr_t multicast_addr = {static_cast<uint32_t>(
network::IPAddress(239, 255, ((universe.first >> 8) & 0xff), ((universe.first >> 0) & 0xff)))};
ip4_addr_t multicast_addr =
network::IPAddress(239, 255, ((universe.first >> 8) & 0xff), ((universe.first >> 0) & 0xff));
auto err = igmp_joingroup(IP4_ADDR_ANY4, &multicast_addr);
@@ -101,8 +101,7 @@ void E131Component::leave_(int universe) {
}
if (listen_method_ == E131_MULTICAST) {
ip4_addr_t multicast_addr = {
static_cast<uint32_t>(network::IPAddress(239, 255, ((universe >> 8) & 0xff), ((universe >> 0) & 0xff)))};
ip4_addr_t multicast_addr = network::IPAddress(239, 255, ((universe >> 8) & 0xff), ((universe >> 0) & 0xff));
igmp_leavegroup(IP4_ADDR_ANY4, &multicast_addr);
}