reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
repro::Proxy Class Reference

#include <Proxy.hxx>

Inheritance diagram for repro::Proxy:
[legend]

Public Member Functions

 Proxy (resip::SipStack &, ProxyConfig &config, ProcessorChain &requestP, ProcessorChain &responseP, ProcessorChain &targetP)
 
virtual ~Proxy ()
 
void setOptionsHandler (OptionsHandler *handler) noexcept
 
void setRequestContextFactory (std::unique_ptr< RequestContextFactory > requestContextFactory) noexcept
 
virtual bool isShutDown () const
 
virtual void thread ()
 
virtual bool isMyUri (const resip::Uri &uri) const
 
void addTransportRecordRoute (unsigned int transportKey, const resip::NameAddr &recordRoute)
 
void removeTransportRecordRoute (unsigned int transportKey)
 
const resip::NameAddr & getRecordRoute (unsigned int transportKey, bool *transportSpecific=0) const
 
bool isUriTransportRecordRoute (const resip::Uri &uri) const
 
bool getRecordRouteForced () const
 
void setRecordRouteForced (bool forced)
 
bool isPAssertedIdentityProcessingEnabled ()
 
bool isNeverStripProxyAuthorizationHeadersEnabled ()
 
UserStore & getUserStore () noexcept
 
resip::SipStack & getStack () noexcept
 
ProxyConfig & getConfig () noexcept
 
void send (const resip::SipMessage &msg)
 
void addClientTransaction (const resip::Data &transactionId, RequestContext *rc)
 
void postTimerC (std::unique_ptr< TimerCMessage > tc)
 
void postMS (std::unique_ptr< resip::ApplicationMessage > msg, int msec)
 
bool compressionEnabled () const
 
void addSupportedOption (const resip::Data &option)
 
void removeSupportedOption (const resip::Data &option)
 
void setServerText (const resip::Data &text)
 
const resip::Data & getServerText () const
 
resip::KeyValueStore & getKeyValueStore ()
 
void doSessionAccounting (const resip::SipMessage &sip, bool received, RequestContext &context)
 
void doRegistrationAccounting (repro::AccountingCollector::RegistrationEvent regEvent, const resip::SipMessage &sip)
 
virtual void processUnknownMessage (resip::Message *msg)
 
- Public Member Functions inherited from resip::TransactionUser
void post (Message *msg)
 Posts a Message to this TransactionUser's fifo.
 
bool isMyDomain (const Data &domain) const
 Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
 
void addDomain (const Data &domain)
 Adds a domain to the set of domains that this TransactionUser is responsible for.
 
void removeDomain (const Data &domain)
 Removes a domain from the set of domains that this TransactionUser is responsible for.
 
void setDomainMatcher (std::shared_ptr< DomainMatcher > domainMatcher) noexcept
 Replaces the default DomainMatcher.
 
virtual EncodeStream & encode (EncodeStream &strm) const
 Encodes the name of this TransactionUser (as specified by name()), and the current depth of its fifo.
 
void setMessageFilterRuleList (MessageFilterRuleList &rules)
 Sets this TransactionUser's MessageFilterRuleList.
 
bool isRegisteredForTransactionTermination () const
 
bool isRegisteredForConnectionTermination () const
 
bool isRegisteredForKeepAlivePongs () const
 
CongestionManager::RejectionBehavior getRejectionBehavior () const
 
virtual void setCongestionManager (CongestionManager *manager)
 
const TimeLimitFifo< Message > * getFifo ()
 
virtual const uint16_t getExpectedWait () const
 
virtual bool responsesMandatory () const
 
- Public Member Functions inherited from resip::ThreadIf
 ThreadIf ()
 
virtual ~ThreadIf ()
 
virtual void run ()
 
void join ()
 
void detach ()
 
virtual void shutdown ()
 
virtual bool waitForShutdown (int ms) const
 
bool isShutdown () const
 

Static Public Member Functions

static resip::KeyValueStore::KeyValueStoreKeyAllocator * getGlobalKeyValueStoreKeyAllocator ()
 
static resip::KeyValueStore::KeyValueStoreKeyAllocator * getRequestKeyValueStoreKeyAllocator ()
 
static resip::KeyValueStore::KeyValueStoreKeyAllocator * getTargetKeyValueStoreKeyAllocator ()
 
static resip::KeyValueStore::Key allocateGlobalKeyValueStoreKey ()
 
static resip::KeyValueStore::Key allocateRequestKeyValueStoreKey ()
 
static resip::KeyValueStore::Key allocateTargetKeyValueStoreKey ()
 
- Static Public Member Functions inherited from resip::ThreadIf
static Id selfId ()
 
static int tlsKeyCreate (TlsKey &key, TlsDestructor *destructor)
 This function follows pthread_key_create() signature.
 
static int tlsKeyDelete (TlsKey key)
 This function follows pthread_key_delete() signature.
 
static int tlsSetValue (TlsKey key, const void *val)
 This function follows pthread_setspecific() signature.
 
static void * tlsGetValue (TlsKey key)
 This function follows pthread_getspecific() signature.
 

Static Public Attributes

static resip::Data FlowTokenSalt
 

Protected Types

typedef std::map< unsigned int, resip::NameAddr > TransportRecordRouteMap
 
typedef HashMap< resip::Data, RequestContext *, resip::KeyedDataHash > RequestContextMap
 a map from transaction id to RequestContext.
 
- Protected Types inherited from resip::TransactionUser
enum  TransactionTermination { RegisterForTransactionTermination , DoNotRegisterForTransactionTermination }
 
enum  ConnectionTermination { RegisterForConnectionTermination , DoNotRegisterForConnectionTermination }
 
enum  KeepAlivePongs { RegisterForKeepAlivePongs , DoNotRegisterForKeepAlivePongs }
 

Protected Member Functions

virtual const resip::Data & name () const
 Return the name of this TransactionUser.
 
 Proxy ()
 
- Protected Member Functions inherited from resip::TransactionUser
 TransactionUser (TransactionTermination t=DoNotRegisterForTransactionTermination, ConnectionTermination c=DoNotRegisterForConnectionTermination, KeepAlivePongs k=DoNotRegisterForKeepAlivePongs)
 Constructor that specifies whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections.
 
 TransactionUser (MessageFilterRuleList &rules, TransactionTermination t=DoNotRegisterForTransactionTermination, ConnectionTermination c=DoNotRegisterForConnectionTermination, KeepAlivePongs k=DoNotRegisterForKeepAlivePongs)
 Constructor that specifies the MessageFilterRuleList, whether this TransactionUser needs to hear about the completion of transactions, and the closing of connections.
 
virtual ~TransactionUser ()=0
 
virtual bool isForMe (const SipMessage &msg) const
 Returns true iff this TransactionUser should process msg.
 

Protected Attributes

resip::SipStack & mStack
 
ProxyConfig & mConfig
 
resip::NameAddr mRecordRoute
 
TransportRecordRouteMap mTransportRecordRoutes
 
resip::Mutex mTransportRecordRouteMutex
 
bool mRecordRouteForced
 
bool mPAssertedIdentityProcessing
 
bool mNeverStripProxyAuthorizationHeaders
 
resip::Data mServerText
 
int mTimerC
 
resip::KeyValueStore mKeyValueStore
 
ProcessorChain & mRequestProcessorChain
 
ProcessorChain & mResponseProcessorChain
 
ProcessorChain & mTargetProcessorChain
 
RequestContextMap mClientRequestContexts
 
RequestContextMap mServerRequestContexts
 
UserStore & mUserStore
 
std::set< resip::Data > mSupportedOptions
 
OptionsHandler * mOptionsHandler
 
std::unique_ptr< RequestContextFactory > mRequestContextFactory
 
bool mSessionAccountingEnabled
 
bool mRegistrationAccountingEnabled
 
AccountingCollector * mAccountingCollector
 
- Protected Attributes inherited from resip::TransactionUser
TimeLimitFifo< Message > mFifo
 This TransactionUser's fifo.
 
CongestionManager * mCongestionManager
 
- Protected Attributes inherited from resip::ThreadIf
std::shared_ptr< std::thread > mThreadObj
 
Id mId
 
bool mShutdown
 
Mutex mShutdownMutex
 
Condition mShutdownCondition
 

Additional Inherited Members

- Public Types inherited from resip::ThreadIf
typedef std::thread::id Id
 
typedef pthread_key_t TlsKey
 
typedef void TlsDestructor(void *)
 

Detailed Description

Definition at line 50 of file Proxy.hxx.

Member Typedef Documentation

◆ RequestContextMap

a map from transaction id to RequestContext.

Store the server transaction and client transactions in this map. The TransactionTerminated events from the stack will be passed to the RequestContext

Transaction ids come from the wire (the Via branch), so the map uses a keyed hash: with the default hash a sender could make every entry collide, so each lookup scans them all (see resip::KeyedDataHash).

Definition at line 144 of file Proxy.hxx.

◆ TransportRecordRouteMap

Definition at line 119 of file Proxy.hxx.

Constructor & Destructor Documentation

◆ Proxy() [1/2]

Proxy::Proxy ( resip::SipStack &  stack,
ProxyConfig &  config,
ProcessorChain &  requestP,
ProcessorChain &  responseP,
ProcessorChain &  targetP 
)

Definition at line 77 of file Proxy.cxx.

◆ ~Proxy()

Proxy::~Proxy ( )
virtual

Definition at line 122 of file Proxy.cxx.

◆ Proxy() [2/2]

repro::Proxy::Proxy ( )
protected

Member Function Documentation

◆ addClientTransaction()

void Proxy::addClientTransaction ( const resip::Data &  transactionId,
RequestContext *  rc 
)

Definition at line 563 of file Proxy.cxx.

◆ addSupportedOption()

void Proxy::addSupportedOption ( const resip::Data &  option)

Definition at line 691 of file Proxy.cxx.

◆ addTransportRecordRoute()

void Proxy::addTransportRecordRoute ( unsigned int  transportKey,
const resip::NameAddr &  recordRoute 
)

Definition at line 630 of file Proxy.cxx.

◆ allocateGlobalKeyValueStoreKey()

KeyValueStore::Key Proxy::allocateGlobalKeyValueStoreKey ( )
static

Definition at line 53 of file Proxy.cxx.

◆ allocateRequestKeyValueStoreKey()

KeyValueStore::Key Proxy::allocateRequestKeyValueStoreKey ( )
static

Definition at line 58 of file Proxy.cxx.

◆ allocateTargetKeyValueStoreKey()

KeyValueStore::Key Proxy::allocateTargetKeyValueStoreKey ( )
static

Definition at line 63 of file Proxy.cxx.

◆ compressionEnabled()

bool Proxy::compressionEnabled ( ) const

Definition at line 685 of file Proxy.cxx.

◆ doRegistrationAccounting()

void Proxy::doRegistrationAccounting ( repro::AccountingCollector::RegistrationEvent  regEvent,
const resip::SipMessage &  sip 
)

Definition at line 713 of file Proxy.cxx.

◆ doSessionAccounting()

void Proxy::doSessionAccounting ( const resip::SipMessage &  sip,
bool  received,
RequestContext &  context 
)

Definition at line 703 of file Proxy.cxx.

◆ getConfig()

ProxyConfig & repro::Proxy::getConfig ( )
inlinenoexcept

Definition at line 89 of file Proxy.hxx.

◆ getGlobalKeyValueStoreKeyAllocator()

KeyValueStore::KeyValueStoreKeyAllocator * Proxy::getGlobalKeyValueStoreKeyAllocator ( )
static

Definition at line 35 of file Proxy.cxx.

◆ getKeyValueStore()

resip::KeyValueStore & repro::Proxy::getKeyValueStore ( )
inline

Definition at line 106 of file Proxy.hxx.

◆ getRecordRoute()

const resip::NameAddr & Proxy::getRecordRoute ( unsigned int  transportKey,
bool *  transportSpecific = 0 
) const

Definition at line 664 of file Proxy.cxx.

◆ getRecordRouteForced()

bool repro::Proxy::getRecordRouteForced ( ) const
inline

Definition at line 81 of file Proxy.hxx.

◆ getRequestKeyValueStoreKeyAllocator()

KeyValueStore::KeyValueStoreKeyAllocator * Proxy::getRequestKeyValueStoreKeyAllocator ( )
static

Definition at line 41 of file Proxy.cxx.

◆ getServerText()

const resip::Data & repro::Proxy::getServerText ( ) const
inline

Definition at line 103 of file Proxy.hxx.

◆ getStack()

resip::SipStack & repro::Proxy::getStack ( )
inlinenoexcept

Definition at line 88 of file Proxy.hxx.

◆ getTargetKeyValueStoreKeyAllocator()

KeyValueStore::KeyValueStoreKeyAllocator * Proxy::getTargetKeyValueStoreKeyAllocator ( )
static

Definition at line 47 of file Proxy.cxx.

◆ getUserStore()

UserStore & Proxy::getUserStore ( )
noexcept

Definition at line 149 of file Proxy.cxx.

◆ isMyUri()

bool Proxy::isMyUri ( const resip::Uri &  uri) const
virtual

Definition at line 600 of file Proxy.cxx.

◆ isNeverStripProxyAuthorizationHeadersEnabled()

bool repro::Proxy::isNeverStripProxyAuthorizationHeadersEnabled ( )
inline

Definition at line 85 of file Proxy.hxx.

◆ isPAssertedIdentityProcessingEnabled()

bool repro::Proxy::isPAssertedIdentityProcessingEnabled ( )
inline

Definition at line 84 of file Proxy.hxx.

◆ isShutDown()

bool Proxy::isShutDown ( ) const
virtual

Definition at line 143 of file Proxy.cxx.

◆ isUriTransportRecordRoute()

bool Proxy::isUriTransportRecordRoute ( const resip::Uri &  uri) const

Definition at line 643 of file Proxy.cxx.

◆ name()

const Data & Proxy::name ( ) const
protectedvirtual

Return the name of this TransactionUser.

Used in encode().

Returns
The name of this TransactionUser, as a Data.

Implements resip::TransactionUser.

Definition at line 593 of file Proxy.cxx.

◆ postMS()

void Proxy::postMS ( std::unique_ptr< resip::ApplicationMessage >  msg,
int  msec 
)

Definition at line 587 of file Proxy.cxx.

◆ postTimerC()

void Proxy::postTimerC ( std::unique_ptr< TimerCMessage >  tc)

Definition at line 577 of file Proxy.cxx.

◆ processUnknownMessage()

void Proxy::processUnknownMessage ( resip::Message *  msg)
virtual

Definition at line 550 of file Proxy.cxx.

◆ removeSupportedOption()

void Proxy::removeSupportedOption ( const resip::Data &  option)

Definition at line 697 of file Proxy.cxx.

◆ removeTransportRecordRoute()

void Proxy::removeTransportRecordRoute ( unsigned int  transportKey)

Definition at line 636 of file Proxy.cxx.

◆ send()

void Proxy::send ( const resip::SipMessage &  msg)

Definition at line 557 of file Proxy.cxx.

◆ setOptionsHandler()

void Proxy::setOptionsHandler ( OptionsHandler *  handler)
noexcept

Definition at line 131 of file Proxy.cxx.

◆ setRecordRouteForced()

void repro::Proxy::setRecordRouteForced ( bool  forced)
inline

Definition at line 82 of file Proxy.hxx.

◆ setRequestContextFactory()

void Proxy::setRequestContextFactory ( std::unique_ptr< RequestContextFactory >  requestContextFactory)
noexcept

Definition at line 137 of file Proxy.cxx.

◆ setServerText()

void repro::Proxy::setServerText ( const resip::Data &  text)
inline

Definition at line 102 of file Proxy.hxx.

◆ thread()

void Proxy::thread ( )
virtual

Implements resip::ThreadIf.

Definition at line 155 of file Proxy.cxx.

Member Data Documentation

◆ FlowTokenSalt

Data Proxy::FlowTokenSalt
static

Definition at line 61 of file Proxy.hxx.

◆ mAccountingCollector

AccountingCollector* repro::Proxy::mAccountingCollector
protected

Definition at line 155 of file Proxy.hxx.

◆ mClientRequestContexts

RequestContextMap repro::Proxy::mClientRequestContexts
protected

Definition at line 145 of file Proxy.hxx.

◆ mConfig

ProxyConfig& repro::Proxy::mConfig
protected

Definition at line 117 of file Proxy.hxx.

◆ mKeyValueStore

resip::KeyValueStore repro::Proxy::mKeyValueStore
protected

Definition at line 128 of file Proxy.hxx.

◆ mNeverStripProxyAuthorizationHeaders

bool repro::Proxy::mNeverStripProxyAuthorizationHeaders
protected

Definition at line 125 of file Proxy.hxx.

◆ mOptionsHandler

OptionsHandler* repro::Proxy::mOptionsHandler
protected

Definition at line 150 of file Proxy.hxx.

◆ mPAssertedIdentityProcessing

bool repro::Proxy::mPAssertedIdentityProcessing
protected

Definition at line 124 of file Proxy.hxx.

◆ mRecordRoute

resip::NameAddr repro::Proxy::mRecordRoute
protected

Definition at line 118 of file Proxy.hxx.

◆ mRecordRouteForced

bool repro::Proxy::mRecordRouteForced
protected

Definition at line 123 of file Proxy.hxx.

◆ mRegistrationAccountingEnabled

bool repro::Proxy::mRegistrationAccountingEnabled
protected

Definition at line 154 of file Proxy.hxx.

◆ mRequestContextFactory

std::unique_ptr<RequestContextFactory> repro::Proxy::mRequestContextFactory
protected

Definition at line 151 of file Proxy.hxx.

◆ mRequestProcessorChain

ProcessorChain& repro::Proxy::mRequestProcessorChain
protected

Definition at line 131 of file Proxy.hxx.

◆ mResponseProcessorChain

ProcessorChain& repro::Proxy::mResponseProcessorChain
protected

Definition at line 132 of file Proxy.hxx.

◆ mServerRequestContexts

RequestContextMap repro::Proxy::mServerRequestContexts
protected

Definition at line 146 of file Proxy.hxx.

◆ mServerText

resip::Data repro::Proxy::mServerText
protected

Definition at line 126 of file Proxy.hxx.

◆ mSessionAccountingEnabled

bool repro::Proxy::mSessionAccountingEnabled
protected

Definition at line 153 of file Proxy.hxx.

◆ mStack

resip::SipStack& repro::Proxy::mStack
protected

Definition at line 116 of file Proxy.hxx.

◆ mSupportedOptions

std::set<resip::Data> repro::Proxy::mSupportedOptions
protected

Definition at line 149 of file Proxy.hxx.

◆ mTargetProcessorChain

ProcessorChain& repro::Proxy::mTargetProcessorChain
protected

Definition at line 133 of file Proxy.hxx.

◆ mTimerC

int repro::Proxy::mTimerC
protected

Definition at line 127 of file Proxy.hxx.

◆ mTransportRecordRouteMutex

resip::Mutex repro::Proxy::mTransportRecordRouteMutex
mutableprotected

Definition at line 121 of file Proxy.hxx.

◆ mTransportRecordRoutes

TransportRecordRouteMap repro::Proxy::mTransportRecordRoutes
protected

Definition at line 120 of file Proxy.hxx.

◆ mUserStore

UserStore& repro::Proxy::mUserStore
protected

Definition at line 148 of file Proxy.hxx.


The documentation for this class was generated from the following files: