Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

ipv4: IPv4 Address Handling


Data Structures

struct  ipv4addr
 IPv4 address structure. More...


Typedefs

typedef uint16 ipv4port
 IPv4 port number.


Functions

int ipv4_parse (const char *s, ipv4addr *addr, const char **end)
 Parse an IPv4 address.

const char * ipv4_scan (const char *s, ipv4addr *addr)
 Scan a C string for an IPv4 address.

const char * ipv4_format (const ipv4addr *addr)
 Produce a formatted C string from an IPv4 address.


Variables

const ipv4addr IPV4ADDR_ANY
 IPv4 "any" address constant.

const ipv4addr IPV4ADDR_BROADCAST
 IPv4 broadcast address constant.


Function Documentation

const char* ipv4_format const ipv4addr addr  ) 
 

Produce a formatted C string from an IPv4 address.

Note:
The return value is statically allocated. Multiple calls to this function will return pointers to the same string.

int ipv4_parse const char *  start,
ipv4addr addr,
const char **  end
 

Parse an IPv4 address.

Deprecated:
This function is a wrapper for ipv4_scan.
Returns:
Non-zero (true) if parsing succeeded, and sets *end to the first character past the end of the address.

const char* ipv4_scan const char *  start,
ipv4addr addr
 

Scan a C string for an IPv4 address.

Returns:
NULL if parsing failed, otherwise a pointer to the first character after the end of the address.


Generated on Mon Dec 1 13:28:06 2003 for bglibs by doxygen 1.3.3