#include <pnat.h>
Inheritance diagram for PNatStrategy:
Public Member Functions | |
Method Handling | |
void | AddMethod (PNatMethod *method) |
PNatMethod * | GetMethod () |
BOOL | RemoveMethod (const PString &meth) |
void | SetPortRanges (WORD portBase, WORD portMax=0, WORD portPairBase=0, WORD portPairMax=0) |
PNatList | GetNATList () |
PNatMethod * | LoadNatMethod (const PString &name) |
PStringList | GetRegisteredList () |
PNatStrategy::PNatStrategy | ( | ) |
Default Contructor
PNatStrategy::~PNatStrategy | ( | ) |
Deconstructor
PNatStrategy::PNatStrategy | ( | ) |
Default Contructor
PNatStrategy::~PNatStrategy | ( | ) |
Deconstructor
void PNatStrategy::AddMethod | ( | PNatMethod * | method | ) |
AddMethod This function is used to add the required NAT Traversal Method. The Order of Loading is important The first added has the highest priority.
PNatMethod* PNatStrategy::GetMethod | ( | ) |
GetMethod This function retrieves the first available NAT Traversal Method. If no available NAT Method is found then NULL is returned.
BOOL PNatStrategy::RemoveMethod | ( | const PString & | meth | ) |
RemoveMethod This function removes a NAT method from the NATlist matching the supplied method name
void PNatStrategy::SetPortRanges | ( | WORD | portBase, | |
WORD | portMax = 0 , |
|||
WORD | portPairBase = 0 , |
|||
WORD | portPairMax = 0 | |||
) |
Set the port ranges to be used on local machine. Note that the ports used on the NAT router may not be the same unless some form of port forwarding is present.
If the port base is zero then standard operating system port allocation method is used.
If the max port is zero then it will be automatically set to the port base + 99.
portMax | Single socket port number base |
portPairBase | Single socket port number max |
portPairMax | Socket pair port number base Socket pair port number max |
PNatList PNatStrategy::GetNATList | ( | ) | [inline] |
Get Loaded NAT Method List
PNatMethod* PNatStrategy::LoadNatMethod | ( | const PString & | name | ) |
PStringList PNatStrategy::GetRegisteredList | ( | ) |