include/arpa/inet.h File Reference

#include <netinet/in.h>

Include dependency graph for inet.h:

Go to the source code of this file.

Defines

#define _ABLE_CLIB_ARPA_INET_H   1

Functions

int inet_aton (const char *strptr, struct in_addr *addrptr)
 Convert text into internet address.
in_addr_t inet_addr (const char *strptr)
 Ascii internet address interpretation routine.
char * inet_ntoa (struct in_addr inaddr)
 Convert internet address into textural representation.
int inet_pton (int family, const char *strptr, void *addrptr)
const char * inet_ntop (int family, const void *addrptr, char *strptr, size_t len)


Define Documentation

#define _ABLE_CLIB_ARPA_INET_H   1


Function Documentation

in_addr_t inet_addr ( const char *  strptr  ) 

Ascii internet address interpretation routine.

Parse a string to produce an internet address. The value returned is in network order.

Deprecated:
use inet_aton in preference.
Parameters:
strptr The IP address in ascii represenation (e.g. "127.0.0.1")
Returns:
ip An address in network order

int inet_aton ( const char *  strptr,
struct in_addr addrptr 
)

Convert text into internet address.

Check whether "cp" is a valid ascii representation of an Internet address and convert to a binary address.

This replaces inet_addr, the return value from which cannot distinguish between failure and a local broadcast address.

Deprecated:
use inet_pton and inet_ntop in preference
Parameters:
strptr IP address in ascii represenation (e.g. "127.0.0.1")
addrptr pointer to which to save the ip address in network order
Returns:
1 if cp could be converted to addr, 0 on failure

char* inet_ntoa ( struct in_addr  inaddr  ) 

Convert internet address into textural representation.

Convert numeric IP address into decimal dotted ASCII representation. returns ptr to static buffer. not thread safe.

Parameters:
inaddr The ip address to convert in network order.
Returns:
pointer to a global static buffer that holds the ASCII represenation of addr.

const char* inet_ntop ( int  family,
const void *  addrptr,
char *  strptr,
size_t  len 
)

int inet_pton ( int  family,
const char *  strptr,
void *  addrptr 
)


Generated on Tue Jan 20 14:28:55 2009 for ABLE LIBC by  doxygen 1.5.6