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

Function RecHttpLoadIpAddrsFromConfVar

src/records/RecHttp.cc:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void
153RecHttpLoadIpAddrsFromConfVar(const char *value_name, swoc::IPRangeSet &addrs)
154{
155 char value[1024];
156
157 if (REC_ERR_OKAY == RecGetRecordString(value_name, value, sizeof(value))) {
158 Dbg(dbg_ctl_config, "RecHttpLoadIpAddrsFromConfVar: parsing the name [%s] and value [%s]", value_name, value);
159 swoc::TextView text(value, std::strlen(value));
160 while (text) {
161 auto token = text.take_prefix_at(',');
162 if (swoc::IPRange r; r.load(token)) {
163 Dbg(dbg_ctl_config, "RecHttpLoadIpAddrsFromConfVar: marking the value [%.*s]", int(token.size()), token.data());
164 addrs.mark(r);
165 }
166 }
167 }
168 Dbg(dbg_ctl_config, "RecHttpLoadIpMap: parsed %zu IpMap entries", addrs.count());
169}
170
171const char *const HttpProxyPort::DEFAULT_VALUE = "8080";
172

Callers 1

startupMethod · 0.85

Calls 7

RecGetRecordStringFunction · 0.85
take_prefix_atMethod · 0.80
loadMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
markMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected