Detailed Description
Types and methods to parse IP address strings.
Introduction
IP v4 and v6 addresses can be parsed using the fiftyoneDegreesIpParseAddress and fiftyoneDegreesIpParseAddresses methods.
Collaboration diagram for IP:
Structs
struct | fiftyoneDegreesEvidenceIpAddress
IP address structure containing the bytes of a v4 or v6 IP address. More...
|
Enumerations
enum | fiftyoneDegreesEvidenceIpType { FIFTYONE_DEGREES_EVIDENCE_IP_TYPE_IPV4 = 0,
FIFTYONE_DEGREES_EVIDENCE_IP_TYPE_IPV6 = 1,
FIFTYONE_DEGREES_EVIDENCE_IP_TYPE_INVALID = 2
}
Enum indicating the type of IP address. More...
|
Functions
void | fiftyoneDegreesIpFreeAddresses (void(*free)(void *), fiftyoneDegreesEvidenceIpAddress *addresses)
Free a linked list of IP addresses. More...
|
fiftyoneDegreesEvidenceIpAddress * | fiftyoneDegreesIpParseAddress (void *(*malloc)(size_t), const char *start, const char *end)
Parse a single IP address string. More...
|
fiftyoneDegreesEvidenceIpAddress * | fiftyoneDegreesIpParseAddresses (void *(*malloc)(size_t), const char *start)
Parse a list of IP addresses and return as a linked list. More...
|
Enumeration Type Documentation
Function Documentation
◆ fiftyoneDegreesIpFreeAddresses()
void fiftyoneDegreesIpFreeAddresses | ( | void(*)(void *) | free, |
fiftyoneDegreesEvidenceIpAddress * | addresses | ||
) |
Free a linked list of IP addresses.
This can also be a single IP address as this is equivalent to a linked list with a size of 1.
- Parameters
-
- free - method to free the IP addresses
- addresses - head of the linked list
◆ fiftyoneDegreesIpParseAddress()
fiftyoneDegreesEvidenceIpAddress* fiftyoneDegreesIpParseAddress | ( | void *(*)(size_t) | malloc, |
const char * | start, | ||
const char * | end | ||
) |
Parse a single IP address string.
- Parameters
-
- malloc - method to allocate the IP address
- start - of the string containing the IP address to parse
- end - of the string containing the IP address to parse
- Returns
- pointer to the parsed IP address
◆ fiftyoneDegreesIpParseAddresses()
fiftyoneDegreesEvidenceIpAddress* fiftyoneDegreesIpParseAddresses | ( | void *(*)(size_t) | malloc, |
const char * | start | ||
) |
Parse a list of IP addresses and return as a linked list.
- Parameters
-
- malloc - method to allocate IP addresses
- start - of the string containing the IP addresses to parse
- Returns
- pointer to the head of the linked list