ProxyProtocol Namespace Reference

Namespaces

namespace  One
 
namespace  Two
 

Classes

class  Header
 PROXY protocol v1 or v2 header. More...
 
class  Parsed
 successful parsing result More...
 

Typedefs

typedef RefCount< HeaderHeaderPointer
 

Functions

static Two::FieldType NameToFieldType (const SBuf &)
 FieldNameToFieldType() helper that handles pseudo headers. More...
 
static Two::FieldType IntegerToFieldType (const SBuf &)
 FieldNameToFieldType() helper that handles integer TLV types. More...
 
const SBufPseudoFieldTypeToFieldName (const Two::FieldType)
 
Two::FieldType FieldNameToFieldType (const SBuf &nameOrId)
 
Parsed Parse (const SBuf &)
 

Typedef Documentation

◆ HeaderPointer

Definition at line 19 of file forward.h.

Function Documentation

◆ FieldNameToFieldType()

ProxyProtocol::Two::FieldType ProxyProtocol::FieldNameToFieldType ( const SBuf nameOrId)

Parses human-friendly PROXY protocol field type representation. Only pseudo headers can (and should) be represented by their names.

Definition at line 102 of file Elements.cc.

References CharacterSet::DIGIT, IntegerToFieldType(), NameToFieldType(), and Parser::Tokenizer::skipOne().

Referenced by Format::Token::parse().

◆ IntegerToFieldType()

ProxyProtocol::Two::FieldType ProxyProtocol::IntegerToFieldType ( const SBuf rawInteger)
static

◆ NameToFieldType()

ProxyProtocol::Two::FieldType ProxyProtocol::NameToFieldType ( const SBuf name)
static

◆ Parse()

ProxyProtocol::Parsed ProxyProtocol::Parse ( const SBuf buf)

Parses a PROXY protocol header from the buffer, determining the protocol version (v1 or v2) by the leading magic string.

Exceptions
Parser::BinaryTokenizer::InsufficientInputto ask for more data
Returns
the successfully parsed header

Definition at line 242 of file Parser.cc.

References SBuf::length(), ProxyProtocol::Two::Magic, ProxyProtocol::Two::Parse(), Parser::Tokenizer::parsedSize(), Parser::Tokenizer::remaining(), Parser::Tokenizer::skip(), and TexcHere.

Referenced by ConnStateData::parseProxyProtocolHeader().

◆ PseudoFieldTypeToFieldName()

const SBuf & ProxyProtocol::PseudoFieldTypeToFieldName ( const Two::FieldType  fieldType)
Returns
human-friendly PROXY protocol field name for the given field type from the [htPseudoBegin,htPseudoEnd) range

Definition at line 40 of file Elements.cc.

References assert, and ProxyProtocol::Two::PseudoHeaderFields.

Referenced by ProxyProtocol::Header::toMime().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors