Lines Matching refs:ip_addr
207 bool WakeOnWiFi::CreateIPAddressPatternAndMask(const IPAddress& ip_addr, in CreateIPAddressPatternAndMask() argument
210 if (ip_addr.family() == IPAddress::kFamilyIPv4) { in CreateIPAddressPatternAndMask()
211 WakeOnWiFi::CreateIPV4PatternAndMask(ip_addr, pattern, mask); in CreateIPAddressPatternAndMask()
213 } else if (ip_addr.family() == IPAddress::kFamilyIPv6) { in CreateIPAddressPatternAndMask()
214 WakeOnWiFi::CreateIPV6PatternAndMask(ip_addr, pattern, mask); in CreateIPAddressPatternAndMask()
223 void WakeOnWiFi::CreateIPV4PatternAndMask(const IPAddress& ip_addr, in CreateIPV4PatternAndMask() argument
231 CHECK_EQ(sizeof(pattern_bytes.ipv4_hdr.saddr), ip_addr.GetLength()); in CreateIPV4PatternAndMask()
232 memcpy(&pattern_bytes.ipv4_hdr.saddr, ip_addr.GetConstData(), in CreateIPV4PatternAndMask()
233 ip_addr.GetLength()); in CreateIPV4PatternAndMask()
237 int pattern_len = src_ip_offset + ip_addr.GetLength(); in CreateIPV4PatternAndMask()
245 void WakeOnWiFi::CreateIPV6PatternAndMask(const IPAddress& ip_addr, in CreateIPV6PatternAndMask() argument
253 CHECK_EQ(sizeof(pattern_bytes.ipv6_hdr.ip6_src), ip_addr.GetLength()); in CreateIPV6PatternAndMask()
254 memcpy(&pattern_bytes.ipv6_hdr.ip6_src, ip_addr.GetConstData(), in CreateIPV6PatternAndMask()
255 ip_addr.GetLength()); in CreateIPV6PatternAndMask()
259 int pattern_len = src_ip_offset + ip_addr.GetLength(); in CreateIPV6PatternAndMask()
502 bool WakeOnWiFi::CreateSinglePattern(const IPAddress& ip_addr, in CreateSinglePattern() argument
507 WakeOnWiFi::CreateIPAddressPatternAndMask(ip_addr, &pattern, &mask); in CreateSinglePattern()
805 IPAddress ip_addr(ip_endpoint); in AddWakeOnPacketConnection() local
806 if (!ip_addr.IsValid()) { in AddWakeOnPacketConnection()
817 wake_on_packet_connections_.AddUnique(ip_addr); in AddWakeOnPacketConnection()
833 IPAddress ip_addr(ip_endpoint); in RemoveWakeOnPacketConnection() local
834 if (!ip_addr.IsValid()) { in RemoveWakeOnPacketConnection()
839 if (!wake_on_packet_connections_.Contains(ip_addr)) { in RemoveWakeOnPacketConnection()
844 wake_on_packet_connections_.Remove(ip_addr); in RemoveWakeOnPacketConnection()