Exported functions
[WpcObj programmer's guide]

This is the introduction

Photone scales an electronic boze-condensate even in case of strong local indignations of environment. Plasma formation in parallel. Hydrodynamic blow aspherical overturns quantum, thus defect of weight is not formed. Suspension as that is demanded by thermodynamics laws, pushes away a quasar, occurrence of a feedback and system self-excitation as a result is possible. The dark matter as that is demanded by thermodynamics laws, concentrates hydrodynamic blow - all further far is beyond current research and will not be considered here. The crystal stretches atom both at heating, and at cooling.

Functions

void WpcInitLogger (WpcLogger *logger=NULL)
 Initializes logging subsystem.
void LOG_MESSAGE (WpcLogLevel lev, string str)
 Write message to the default logging object if possible.
void LOG_FORMAT (WpcLogLevel lev, string str,...)
 Write formatted message to the default logging object if possible.
unsigned short WpcCalcChecksum (unsigned char *buff, unsigned int nbytes)
 Calculates checksum for IP packets.
unsigned short WpcCalcTcpChecksum (unsigned char *buff, int nbytes, bpf_u_int32 target, bpf_u_int32 source)
 Calculates checksum for TCP or UDP packets.
bpf_u_int32 WpcGetNextHop (bpf_u_int32 target)
 Gets IP address of the next hop to the target.
bpf_u_int32 WpcGetNextHop (string target)
 Gets IP address of the next hop to the target.
bool WpcGetArpRecord (bpf_u_int32 target, WpcMacAddr *mac)
 Gets MAC address of the target.
bool WpcGetArpRecord (string target, WpcMacAddr *mac)
 Gets MAC address of the target.
bool WpcIsLocalIP (bpf_u_int32 target)
 Returns true if the given IP address is local.
WpcAddressWpcResolve (string target)
 Gets IP address of the the target.
WpcAdapterWpcGetBestAdapter (string target)
 Creates WpcAdapter object best to operate with target.
WpcAdapterWpcGetBestAdapter (bpf_u_int32 target)
 Creates WpcAdapter object best to operate with target.


Function Documentation

void LOG_FORMAT ( WpcLogLevel  lev,
string  str,
  ... 
)

Write formatted message to the default logging object if possible.

void LOG_MESSAGE ( WpcLogLevel  lev,
string  str 
)

Write message to the default logging object if possible.

unsigned short WpcCalcChecksum ( unsigned char *  buff,
unsigned int  nbytes 
)

Calculates checksum for IP packets.

This function also used to perform calculation process for high-level protocols (TCP or UDP)

unsigned short WpcCalcTcpChecksum ( unsigned char *  buff,
int  nbytes,
bpf_u_int32  target,
bpf_u_int32  source 
)

Calculates checksum for TCP or UDP packets.

bool WpcGetArpRecord ( string  target,
WpcMacAddr mac 
)

Gets MAC address of the target.

bool WpcGetArpRecord ( bpf_u_int32  target,
WpcMacAddr mac 
)

Gets MAC address of the target.

WpcAdapter& WpcGetBestAdapter ( bpf_u_int32  target  ) 

Creates WpcAdapter object best to operate with target.

Parameters:
target IPv4 address of the target
Returns:
the WpcAdapter object or generates exception
Exceptions:
WpcError if the adapters list can't be generated

Todo:
Implements interface selection for UNIX

WpcAdapter& WpcGetBestAdapter ( string  target  ) 

Creates WpcAdapter object best to operate with target.

Parameters:
target String representation of the target. Whether IP address or hostname
Returns:
the WpcAdapter object or generates exception
Exceptions:
WpcError if the adapters list can't be generated

bpf_u_int32 WpcGetNextHop ( string  target  ) 

Gets IP address of the next hop to the target.

bpf_u_int32 WpcGetNextHop ( bpf_u_int32  target  ) 

Gets IP address of the next hop to the target.

void WpcInitLogger ( WpcLogger logger = NULL  ) 

Initializes logging subsystem.

Creates defaultLogger as default WpcLogger implementation or sets it to given derived class instance

Parameters:
logger object. If NULL when WpcLogger created.

bool WpcIsLocalIP ( bpf_u_int32  target  ) 

Returns true if the given IP address is local.

WpcAddress* WpcResolve ( string  target  ) 

Gets IP address of the the target.

Returns:
pointer to new WpcAddress object, or NULL in cause of error

Todo:
Implement IPv6 resolving



 
©2009 Positive Technologies
 
Generated on Fri May 22 18:17:00 2009 for wpcObj by 
 
 
1.5.7
 
Get wpcObj at SourceForge.net. Fast, secure and Free Open Source software downloads