PROXY protocol v1 or v2 header.
More...
#include <Header.h>
Definition at line 22 of file Header.h.
◆ Pointer
◆ Tlvs
◆ Header()
◆ addressFamily()
| const SBuf & ProxyProtocol::Header::addressFamily |
( |
| ) |
const |
- Returns
- "4" or "6" if both source and destination addresses are IPv4 or IPv6
-
"mix" otherwise
Definition at line 97 of file Header.cc.
◆ getElem()
| SBuf ProxyProtocol::Header::getElem |
( |
const uint32_t |
headerType, |
|
|
const char * |
member, |
|
|
const char |
delimiter |
|
) |
| const |
Searches for the first key=value pair occurrence within the value for the provided TLV type. Assumes that the TLV value is a delimiter-separated list.
- Returns
- the value of the found pair or the empty string.
Definition at line 90 of file Header.cc.
References getListMember(), and SBufToString().
◆ getValues()
| SBuf ProxyProtocol::Header::getValues |
( |
const uint32_t |
headerType, |
|
|
const char |
delimiter = ',' |
|
) |
| const |
- Returns
- a delimiter-separated list of values of TLVs of the given type
Definition at line 40 of file Header.cc.
References SquidConfig::Addrs, SBufStream::buf(), SquidConfig::client_netmask, Config, ProxyProtocol::Two::htPseudoCommand, ProxyProtocol::Two::htPseudoDstAddr, ProxyProtocol::Two::htPseudoDstPort, ProxyProtocol::Two::htPseudoSrcAddr, ProxyProtocol::Two::htPseudoSrcPort, ProxyProtocol::Two::htPseudoVersion, SBuf::isEmpty(), MAX_IPSTRLEN, and ToSBuf().
◆ hasAddresses()
| bool ProxyProtocol::Header::hasAddresses |
( |
| ) |
const |
|
inline |
◆ hasForwardedAddresses()
| bool ProxyProtocol::Header::hasForwardedAddresses |
( |
| ) |
const |
|
inline |
◆ ignoreAddresses()
| void ProxyProtocol::Header::ignoreAddresses |
( |
| ) |
|
|
inline |
◆ localConnection()
| bool ProxyProtocol::Header::localConnection |
( |
| ) |
const |
|
inlineprivate |
◆ toMime()
| SBuf ProxyProtocol::Header::toMime |
( |
| ) |
const |
◆ version()
| const SBuf & ProxyProtocol::Header::version |
( |
| ) |
const |
|
inline |
◆ command_
◆ destinationAddress
◆ ignoreAddresses_
| bool ProxyProtocol::Header::ignoreAddresses_ |
|
private |
◆ sourceAddress
◆ tlvs
| Tlvs ProxyProtocol::Header::tlvs |
◆ version_
| SBuf ProxyProtocol::Header::version_ |
|
private |
The documentation for this class was generated from the following files: