MCPcopy Create free account
hub / github.com/apache/impala / WithinNetwork

Method WithinNetwork

be/src/kudu/util/net/net_util.cc:359–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 : addr_(addr), netmask_(netmask) {}
358
359bool Network::WithinNetwork(const Sockaddr& addr) const {
360 return ((addr.ipv4_addr().sin_addr.s_addr & netmask_) ==
361 (addr_ & netmask_));
362}
363
364Status Network::ParseCIDRString(const string& addr) {
365 std::pair<string, string> p = strings::Split(addr, strings::delimiter::Limit("/", 1));

Callers 2

IsTrustedConnectionMethod · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64