Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Internet Address Module

This module handles internet addresses. More...

Classes

struct  INETADDRESSSTRUCT
struct  INETADDRESSSTRUCT
struct  INETADDRESSSTRUCT

Initializing

These functions are converned with initialisation issues.

CHIPCARD_API ERRORCODE InetAddr_ModuleInit ()
CHIPCARD_API ERRORCODE InetAddr_ModuleFini ()

Construction and destruction

These functions allocate and free administrative data about IP addresses.

CHIPCARD_API INETADDRESSInetAddr_new (AddressFamily af)
CHIPCARD_API void InetAddr_free (INETADDRESS *ia)
CHIPCARD_API ERRORCODE InetAddr_Destroy (INETADDRESSPTR ia)

Get and set address

These functions allow getting and setting of IP addresses either by hostname or host address.

CHIPCARD_API ERRORCODE InetAddr_SetAddress (INETADDRESSPTR ia, const char *addr)
CHIPCARD_API ERRORCODE InetAddr_SetName (INETADDRESSPTR ia, const char *name)
CHIPCARD_API ERRORCODE InetAddr_GetAddress (const INETADDRESS *ia, char *buffer, int bsize)
CHIPCARD_API ERRORCODE InetAddr_GetName (const INETADDRESS *ia, char *buffer, int bsize)

Get and set port

These functions allow getting and setting of the port.

CHIPCARD_API int InetAddr_GetPort (const INETADDRESS *ia)
CHIPCARD_API ERRORCODE InetAddr_SetPort (INETADDRESSPTR ia, int port)

Defines

#define INETADDR_ERROR_MEMORY_FULL   1
#define INETADDR_ERROR_BAD_ADDRESS   2
#define INETADDR_ERROR_BUFFER_OVERFLOW   3
#define INETADDR_ERROR_HOST_NOT_FOUND   4
#define INETADDR_ERROR_NO_ADDRESS   5
#define INETADDR_ERROR_NO_RECOVERY   6
#define INETADDR_ERROR_TRY_AGAIN   7
#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
#define INETADDR_ERROR_UNSUPPORTED   10
#define INETADDR_ERROR_MEMORY_FULL   1
#define INETADDR_ERROR_BAD_ADDRESS   2
#define INETADDR_ERROR_BUFFER_OVERFLOW   3
#define INETADDR_ERROR_HOST_NOT_FOUND   4
#define INETADDR_ERROR_NO_ADDRESS   5
#define INETADDR_ERROR_NO_RECOVERY   6
#define INETADDR_ERROR_TRY_AGAIN   7
#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
#define INETADDR_ERROR_UNSUPPORTED   10
#define INETADDR_ERROR_MEMORY_FULL   1
#define INETADDR_ERROR_BAD_ADDRESS   2
#define INETADDR_ERROR_BUFFER_OVERFLOW   3
#define INETADDR_ERROR_HOST_NOT_FOUND   4
#define INETADDR_ERROR_NO_ADDRESS   5
#define INETADDR_ERROR_NO_RECOVERY   6
#define INETADDR_ERROR_TRY_AGAIN   7
#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
#define INETADDR_ERROR_UNSUPPORTED   10

Enumerations

enum  AddressFamily { AddressFamilyIP = 0, AddressFamilyUnix }
enum  AddressFamily { AddressFamilyIP = 0, AddressFamilyUnix }
enum  AddressFamily { AddressFamilyIP = 0, AddressFamilyUnix }

Variables

typedefCHIPCARD_API struct
INETADDRESSSTRUCT 
INETADDRESS
CHIPCARD_API typedef INETADDRESSINETADDRESSPTR
typedefCHIPCARD_API struct
INETADDRESSSTRUCT 
INETADDRESS
CHIPCARD_API typedef INETADDRESSINETADDRESSPTR
typedefCHIPCARD_API struct
INETADDRESSSTRUCT 
INETADDRESS
CHIPCARD_API typedef INETADDRESSINETADDRESSPTR

Detailed Description

This module handles internet addresses.

This module allows using of internet IP addresses. It is also capable of resolving addresses and hostnames.

Author:
Martin Preuss<martin@libchipcard.de>

Define Documentation

#define INETADDR_ERROR_BAD_ADDRESS   2
 

#define INETADDR_ERROR_BAD_ADDRESS   2
 

#define INETADDR_ERROR_BAD_ADDRESS   2
 

#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
 

#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
 

#define INETADDR_ERROR_BAD_ADDRESS_FAMILY   9
 

#define INETADDR_ERROR_BUFFER_OVERFLOW   3
 

#define INETADDR_ERROR_BUFFER_OVERFLOW   3
 

#define INETADDR_ERROR_BUFFER_OVERFLOW   3
 

#define INETADDR_ERROR_HOST_NOT_FOUND   4
 

#define INETADDR_ERROR_HOST_NOT_FOUND   4
 

#define INETADDR_ERROR_HOST_NOT_FOUND   4
 

#define INETADDR_ERROR_MEMORY_FULL   1
 

#define INETADDR_ERROR_MEMORY_FULL   1
 

#define INETADDR_ERROR_MEMORY_FULL   1
 

#define INETADDR_ERROR_NO_ADDRESS   5
 

#define INETADDR_ERROR_NO_ADDRESS   5
 

#define INETADDR_ERROR_NO_ADDRESS   5
 

#define INETADDR_ERROR_NO_RECOVERY   6
 

#define INETADDR_ERROR_NO_RECOVERY   6
 

#define INETADDR_ERROR_NO_RECOVERY   6
 

#define INETADDR_ERROR_TRY_AGAIN   7
 

#define INETADDR_ERROR_TRY_AGAIN   7
 

#define INETADDR_ERROR_TRY_AGAIN   7
 

#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
 

#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
 

#define INETADDR_ERROR_UNKNOWN_DNS_ERROR   8
 

#define INETADDR_ERROR_UNSUPPORTED   10
 

#define INETADDR_ERROR_UNSUPPORTED   10
 

#define INETADDR_ERROR_UNSUPPORTED   10
 


Enumeration Type Documentation

enum AddressFamily
 

Address family (in most cases this is AddressFamilyIP)

Enumeration values:
AddressFamilyIP 
AddressFamilyUnix 

enum AddressFamily
 

Address family (in most cases this is AddressFamilyIP)

Enumeration values:
AddressFamilyIP 
AddressFamilyUnix 

enum AddressFamily
 

Address family (in most cases this is AddressFamilyIP)

Enumeration values:
AddressFamilyIP 
AddressFamilyUnix 


Function Documentation

CHIPCARD_API ERRORCODE InetAddr_Destroy INETADDRESSPTR  ia  ) 
 

Deinitializes an internet address structure. This frees all ressources allocated by a previous call to InetAddr_Create.

Parameters:
ia pointer to a INETADDRESS variable

CHIPCARD_API void InetAddr_free INETADDRESS ia  ) 
 

CHIPCARD_API ERRORCODE InetAddr_GetAddress const INETADDRESS ia,
char *  buffer,
int  bsize
 

Gets the IP address stored in the INETADDRESS.

Returns:
error code
Parameters:
ia INETADDRESS to use
buffer pointer to a buffer to receive the address
bsize size of the buffer in bytes

CHIPCARD_API ERRORCODE InetAddr_GetName const INETADDRESS ia,
char *  buffer,
int  bsize
 

Gets the host name stored in the INETADDRESS. If there is none, then the IP address stored in the INETADDRESS will be used to resolve the hostname.

Returns:
error code
Parameters:
ia INETADDRESS to use
buffer pointer to a buffer to receive the name
bsize size of the buffer in bytes

CHIPCARD_API int InetAddr_GetPort const INETADDRESS ia  ) 
 

Return the port stored in the INETADDRESS

Parameters:
ia INETADDRESS to use

CHIPCARD_API ERRORCODE InetAddr_ModuleFini  ) 
 

De-Initialize this module.

CHIPCARD_API ERRORCODE InetAddr_ModuleInit  ) 
 

Initialize this module.

CHIPCARD_API INETADDRESS * InetAddr_new AddressFamily  af  ) 
 

CHIPCARD_API ERRORCODE InetAddr_SetAddress INETADDRESSPTR  ia,
const char *  addr
 

Sets the IP address.

Returns:
error code
Parameters:
ia INETADDRESS to manipulate
addr IP address in 3-dot-notation ("1.2.3.4")

CHIPCARD_API ERRORCODE InetAddr_SetName INETADDRESSPTR  ia,
const char *  name
 

Sets the IP name and resolves its address.

Returns:
error code
Parameters:
ia INETADDRESS to manipulate
name hostname whose address is to be resolved in 3-dot-notation

CHIPCARD_API ERRORCODE InetAddr_SetPort INETADDRESSPTR  ia,
int  port
 

Set the port in the given INETADDRESS.

Returns:
error code
Parameters:
ia INETADDRESS to manipulate
port port to set (0-65535)


Variable Documentation

typedefCHIPCARD_API struct INETADDRESSSTRUCT INETADDRESS
 

You shoukd treat this type as opaque. Its members are not part of the API, i.e. they are subject to changes without notice !

typedefCHIPCARD_API struct INETADDRESSSTRUCT INETADDRESS
 

You shoukd treat this type as opaque. Its members are not part of the API, i.e. they are subject to changes without notice !

typedefCHIPCARD_API struct INETADDRESSSTRUCT INETADDRESS
 

You shoukd treat this type as opaque. Its members are not part of the API, i.e. they are subject to changes without notice !

CHIPCARD_API typedef INETADDRESS* INETADDRESSPTR
 

Just a pointer to an INETADDRESS for conveniance.

CHIPCARD_API typedef INETADDRESS* INETADDRESSPTR
 

Just a pointer to an INETADDRESS for conveniance.

CHIPCARD_API typedef INETADDRESS* INETADDRESSPTR
 

Just a pointer to an INETADDRESS for conveniance.


Generated on Sat Feb 11 15:20:28 2006 for libchipcard by  doxygen 1.4.2