Network


Data Structures

struct  oslNetConfig

Functions

int oslIsWlanPowerOn ()
int oslIsWlanConnected ()
int oslGetNetConfigs (struct oslNetConfig *result)
int oslIsNetActive ()
int oslNetInit ()
int oslNetTerm ()
int oslGetIPaddress (char *IPaddress)
int oslConnectToAP (int config, int timeout, int(*apctlCallback)(int state))
int oslDisconnectFromAP ()
int oslGetAPState ()
int oslResolveAddress (char *address, char *resolvedIP)
int oslNetGetFile (const char *url, const char *filepath)
int oslNetPostForm (const char *url, char *data, char *response, unsigned int responsesize)

Detailed Description

Network functions

Function Documentation

int oslIsWlanPowerOn (  ) 

Checks if the WLAN switch is powered on (returns 1, else 0).

int oslIsWlanConnected (  ) 

Checks if the WLAN is connected to an Access Point (returns 1, else 0).

int oslGetNetConfigs ( struct oslNetConfig result  ) 

Gets the network configs.

struct oslNetConfig configs[OSL_MAX_NET_CONFIGS];
int numconfigs = oslGetNetConfigs(configs);

int oslIsNetActive (  ) 

Returns 1 or 0 indicating whether the network is initialized or not

int oslNetInit (  ) 

Inits network

int oslNetTerm (  ) 

Terminates network

int oslGetIPaddress ( char *  IPaddress  ) 

Gets the current IP address (when connected to an Access Point)

int oslConnectToAP ( int  config,
int  timeout,
int(*)(int state)  apctlCallback 
)

Tries to connect to an Access Point using the given configuration

Parameters:
int config Index of the configuration to use
int timeout Timeout (in seconds) for the connection
int (*apctlCallback)(int state) Pointer to a callback function. It will be called with the current state

int oslDisconnectFromAP (  ) 

Disconnectes from the Access Point

int oslGetAPState (  ) 

Gets the current Access Point state

int oslResolveAddress ( char *  address,
char *  resolvedIP 
)

Resolves an address to its IP address

int oslNetGetFile ( const char *  url,
const char *  filepath 
)

Get a file from the web and save it

int oslNetPostForm ( const char *  url,
char *  data,
char *  response,
unsigned int  responsesize 
)

Posts a web form


Generated on Wed Feb 24 10:25:35 2010 by  doxygen 1.5.9