This module handles internet addresses.
More...
This module handles internet addresses.
This module allows using of internet IP addresses. It is also capable of resolving addresses and hostnames.
- Author
- Martin Preussmarti.nosp@m.n@li.nosp@m.bchip.nosp@m.card.nosp@m..de
◆ GWEN_INETADDR_CAPS_AF_TCP
#define GWEN_INETADDR_CAPS_AF_TCP 0x00000001 |
◆ GWEN_INETADDR_CAPS_AF_UNIX
#define GWEN_INETADDR_CAPS_AF_UNIX 0x00000002 |
◆ GWEN_INETADDR_ERROR_BAD_ADDRESS
#define GWEN_INETADDR_ERROR_BAD_ADDRESS 2 |
◆ GWEN_INETADDR_ERROR_BAD_ADDRESS_FAMILY
#define GWEN_INETADDR_ERROR_BAD_ADDRESS_FAMILY 9 |
◆ GWEN_INETADDR_ERROR_BUFFER_OVERFLOW
#define GWEN_INETADDR_ERROR_BUFFER_OVERFLOW 3 |
◆ GWEN_INETADDR_ERROR_HOST_NOT_FOUND
#define GWEN_INETADDR_ERROR_HOST_NOT_FOUND 4 |
◆ GWEN_INETADDR_ERROR_MEMORY_FULL
#define GWEN_INETADDR_ERROR_MEMORY_FULL 1 |
◆ GWEN_INETADDR_ERROR_NO_ADDRESS
#define GWEN_INETADDR_ERROR_NO_ADDRESS 5 |
◆ GWEN_INETADDR_ERROR_NO_RECOVERY
#define GWEN_INETADDR_ERROR_NO_RECOVERY 6 |
◆ GWEN_INETADDR_ERROR_TRY_AGAIN
#define GWEN_INETADDR_ERROR_TRY_AGAIN 7 |
◆ GWEN_INETADDR_ERROR_TYPE
#define GWEN_INETADDR_ERROR_TYPE "InetAddr" |
◆ GWEN_INETADDR_ERROR_UNKNOWN_DNS_ERROR
#define GWEN_INETADDR_ERROR_UNKNOWN_DNS_ERROR 8 |
◆ GWEN_INETADDR_ERROR_UNSUPPORTED
#define GWEN_INETADDR_ERROR_UNSUPPORTED 10 |
◆ GWEN_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 !
Definition at line 97 of file inetaddr.h.
◆ GWEN_AddressFamily
Address family (in most cases this is AddressFamilyIP)
Enumerator |
---|
GWEN_AddressFamilyIP | Internet Protocol (IP)
|
GWEN_AddressFamilyUnix | |
Definition at line 85 of file inetaddr.h.
◆ GWEN_InetAddr_dup()
◆ GWEN_InetAddr_free()
◆ GWEN_InetAddr_GetAddress()
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 |
◆ GWEN_InetAddr_GetCapabilities()
◆ GWEN_InetAddr_GetName()
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 |
◆ GWEN_InetAddr_GetPort()
Return the port stored in the INETADDRESS
- Parameters
-
◆ GWEN_InetAddr_new()
◆ GWEN_InetAddr_SetAddress()
Sets the IP address.
- Returns
- error code
- Parameters
-
ia | INETADDRESS to manipulate |
addr | IP address in 3-dot-notation ("1.2.3.4") |
◆ GWEN_InetAddr_SetName()
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 |
◆ GWEN_InetAddr_SetPort()
Set the port in the given INETADDRESS.
- Returns
- error code
- Parameters
-
ia | INETADDRESS to manipulate |
port | port to set (0-65535) |