NatTraversalRules Class Reference

#include <NatTraversalRules.h>

List of all members.


Detailed Description

Class that knows how to parse the NatTraversalRules.xml file and extract its information.

The class offers an API to allow apps to retrieve the information elements of that file. Note that there are two ways to specifiy the public IP address of a system through the web GUI. One is to manually enter an IP address and the other is automatically discover it through STUN. The NatTraversalRule class hides that detail from its owner by implementing a STUN client that is used to automatically discover the public IP address when a STUN server is provided. The owner can find out the public IP addresses of the system via getPublicTransportInfo() and getMediaRelayPublicAddress() without really knowing if that data was explicitly configured or discovered through STUN.

Public Member Functions

 NatTraversalRules ()
virtual ~NatTraversalRules ()
OsStatus loadRules (const UtlString &configFileName)
bool isEnabled (void) const
bool isBehindNat (void) const
TransportData getPublicTransportInfo (void) const
TransportData getProxyTransportInfo (void) const
UtlString getMediaRelayPublicAddress (void) const
UtlString getMediaRelayNativeAddress (void) const
int getMediaRelayXmlRpcPort (void) const
int getMaxMediaRelaySessions (void) const
bool isAggressiveModeSet (void) const
bool isConservativeModeSet (void) const
bool isXmlRpcSecured (void) const
bool isPartOfLocalTopology (const UtlString &host, bool checkIpSubnets=true, bool checkDnsWidlcards=true) const

Private Member Functions

void initializeNatTraversalInfo (void)
UtlString getStunServer (void) const
int getStunRefreshIntervalInSecs (void) const
void announceStunResolvedPublicIpAddress (const UtlString &discoveredPublicIpAddress)

Private Attributes

TiXmlDocumentmpDoc
PatternsmpPatterns
bool mbNatTraveralEnabled
bool mbSystemBehindNat
bool mbAggressiveModeSet
UtlSList mlocalIpV4Subnets
UtlSList mlocalDnsWildcards
TransportData mPublicTransport
TransportData mProxyTransport
UtlString mMediaRelayPublicAddress
bool mbMediaRelayPublicAddressProvidedInConfig
UtlString mMediaRelayNativeAddress
int mMediaRelayXmlRpcPort
int mMaxMediaRelaySessions
bool mbDiscoverPublicIpAddressViaStun
UtlString mStunServer
int mStunRefreshIntervalInSecs
StunClientmpStunClient
bool mbXmlRpcOverSecureTransport

Classes

class  StunClient
 Class that gets used by NatTraversalRules class to resolve the public IP address through STUN whenever the nattraversalrules.xml config file calls for it. More...


Constructor & Destructor Documentation

~NatTraversalRules (  )  [virtual]


Member Function Documentation

OsStatus loadRules ( const UtlString configFileName  ) 

bool isEnabled ( void   )  const

bool isBehindNat ( void   )  const

TransportData getPublicTransportInfo ( void   )  const

TransportData getProxyTransportInfo ( void   )  const

UtlString getMediaRelayPublicAddress ( void   )  const

UtlString getMediaRelayNativeAddress ( void   )  const

int getMediaRelayXmlRpcPort ( void   )  const

int getMaxMediaRelaySessions ( void   )  const

bool isAggressiveModeSet ( void   )  const

bool isConservativeModeSet ( void   )  const

bool isXmlRpcSecured ( void   )  const

bool isPartOfLocalTopology ( const UtlString host,
bool  checkIpSubnets = true,
bool  checkDnsWidlcards = true 
) const

void initializeNatTraversalInfo ( void   )  [private]

UtlString getStunServer ( void   )  const [private]

int getStunRefreshIntervalInSecs ( void   )  const [private]

void announceStunResolvedPublicIpAddress ( const UtlString discoveredPublicIpAddress  )  [private]


Member Data Documentation

TiXmlDocument* mpDoc [private]

Patterns* mpPatterns [private]

bool mbNatTraveralEnabled [private]

bool mbSystemBehindNat [private]

bool mbAggressiveModeSet [private]

int mMediaRelayXmlRpcPort [private]

int mMaxMediaRelaySessions [private]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:50:17 build33 abuild