MCPcopy Create free account
hub / github.com/apache/trafficserver / ip_category_contains_addr

Method ip_category_contains_addr

src/proxy/IPAllow.cc:159–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159bool
160IpAllow::ip_category_contains_addr(std::string const &category, swoc::IPAddr const &addr)
161{
162 self_type *self = acquire();
163 auto const spot = self->ip_category_map.find(category);
164 if (spot == self->ip_category_map.end()) {
165 return false;
166 }
167 auto const &space = spot->second;
168 bool const found = space.find(addr) != space.end();
169 self->release();
170 return found;
171}
172
173IpAllow::ACL
174IpAllow::match(swoc::IPAddr const &addr, match_key_t key)

Callers

nothing calls this directly

Calls 4

releaseMethod · 0.95
acquireFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected