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

Method YAMLLoadIPAddrRange

src/proxy/IPAllow.cc:381–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381swoc::Errata
382IpAllow::YAMLLoadIPAddrRange(const YAML::Node &node, IpMap *map, IpAllow::Record const *record)
383{
384 if (!node.IsScalar()) {
385 return swoc::Errata(ERRATA_ERROR, "{} Expected IP address range at {}, found non-literal.", this, node.Mark());
386 }
387
388 swoc::TextView ip_range(node.Scalar());
389 if (swoc::IPRange r; r.load(ip_range)) {
390 map->fill(r, record);
391 } else {
392 return swoc::Errata(ERRATA_ERROR, "{} {} - '{}' is not a valid range.", this, node.Mark(), node.Scalar());
393 }
394 return {};
395}
396
397swoc::Errata
398IpAllow::YAMLLoadIPCategory(const YAML::Node &node, IpMap *map, IpAllow::Record const *record)

Callers 1

YAMLLoadEntryMethod · 0.95

Calls 5

ErrataClass · 0.85
ScalarMethod · 0.80
MarkMethod · 0.45
loadMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected