21 ignoreAddresses_(false)
29 const auto value = getValues(fieldType);
34 for (
const auto &tlv: tlvs)
35 result << tlv.type <<
": " << tlv.value <<
"\r\n";
53 auto logAddr = sourceAddress;
56 return SBuf(logAddr.toStr(ipBuf,
sizeof(ipBuf)));
63 return SBuf(destinationAddress.toStr(ipBuf,
sizeof(ipBuf)));
67 return hasAddresses() ?
ToSBuf(sourceAddress.port()) :
SBuf();
71 return hasAddresses() ?
ToSBuf(destinationAddress.port()) :
SBuf();
76 for (
const auto &m: tlvs) {
77 if (m.type == headerType) {
92 const auto whole =
SBufToString(getValues(headerType, sep));
99 static const SBuf v4(
"4");
100 static const SBuf v6(
"6");
101 static const SBuf vMix(
"mix");
103 (sourceAddress.isIPv6() && destinationAddress.isIPv6()) ? v6 :
104 (sourceAddress.isIPv4() && destinationAddress.isIPv4()) ? v4 :
EnumRangeT< EnumType > EnumRange(EnumType begin, EnumType one_past_end)
SBuf getListMember(const String &list, const char *key, const char delimiter)
String SBufToString(const SBuf &s)
SBuf buf()
bytes written so far
struct SquidConfig::@85 Addrs
Ip::Address client_netmask
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Command
PROXY protocol 'command' field value.
const SBuf & PseudoFieldTypeToFieldName(const Two::FieldType)
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf