Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

10    inet.h

Palm OS® Protein C/C++ Compiler Language & Library Reference

Palm OS® Developer Suite

     

The <inet.h> header defines several functions useful for Internet address manipulation.

Functions and Macros ^TOP^

inet_addr Function ^TOP^

Purpose

Interprets the specified character string and returns a number suitable for use as an Internet address.

Declared In

posix/arpa/inet.h

Prototype

in_addr_t inet_addr (
   const char *cp
)

Parameters

cp
A character string.

Returns

Returns a number suitable for use as an Internet address.

Comments

This is a standard network function.

Compatibility

This function is not in the C99 specification.

See Also

inet_network()

inet_aton Function ^TOP^

Purpose

Interprets the specified character string as an Internet address, placing the address into the structure provided.

Declared In

posix/arpa/inet.h

Prototype

int inet_aton (
   const char *cp,
   struct in_addr *addr
)

Parameters

cp
A character string.
addr
An Internet address.

Returns

Returns 1 if the string was successfully interpreted, or zero (0) if the string is invalid.

Comments

This is a non-standard network function.

Compatibility

This function is not in the C99 specification.

This function is a Palm OS extension (not present in C99 or Unix).

inet_lnaof Function ^TOP^

Purpose

Breaks apart the specified Internet host address and returns the local network address part (in host order).

Declared In

posix/arpa/inet.h

Prototype

in_addr_t inet_lnaof (
   struct in_addr in
)

Parameters

in
An Internet address.

Returns

Returns the local network address (in host order).

Comments

This is a non-standard network function.

Compatibility

This function is not in the C99 specification.

This function is a Palm OS extension (not present in C99 or Unix).

See Also

inet_netof()

inet_makeaddr Function ^TOP^

Purpose

Takes an Internet network number and a local network address (both in host order) and constructs an Internet address from it.

Declared In

posix/arpa/inet.h

Prototype

struct in_addr inet_makeaddr (
   int net,
   int lna
)

Parameters

net
An Internet network number.
lna
A local network address.

Returns

Returns an Internet address.

Comments

This is a non-standard network function.

Compatibility

This function is not in the C99 specification.

This function is a Palm OS extension (not present in C99 or Unix).

inet_netof Function ^TOP^

Purpose

Breaks apart the specified Internet host address and returns the network number part (in host order).

Declared In

posix/arpa/inet.h

Prototype

in_addr_t inet_netof (
   struct in_addr in
)

Parameters

in
An Internet address.

Returns

Returns the network number (in host order).

Comments

This is a non-standard network function.

Compatibility

This function is not in the C99 specification.

This function is a Palm OS extension (not present in C99 or Unix).

See Also

inet_lnaof()

inet_network Function ^TOP^

Purpose

Interprets the specified character string and returns a number suitable for use as an Internet network number.

Declared In

posix/arpa/inet.h

Prototype

in_addr_t inet_network (
   const char *cp
)

Parameters

cp
A character string.

Returns

Returns a number suitable for use as an Internet network number.

Comments

This is a non-standard network function.

Compatibility

This function is not in the C99 specification.

This function is a Palm OS extension (not present in C99 or Unix).

See Also

inet_addr()

inet_ntoa Function ^TOP^

Purpose

Takes an Internet address and returns an ASCII string representing the address.

Declared In

posix/arpa/inet.h

Prototype

const char *inet_ntoa (
   struct in_addr in
)

Parameters

in
An Internet address.

Returns

Returns a pointer to an ASCII string representing the address.

Comments

This is a standard network function.

Compatibility

This function is not in the C99 specification.

inet_ntop Function ^TOP^

Purpose

Converts a network format address to presentation format.

Declared In

posix/arpa/inet.h

Prototype

const char *inet_ntop (
   int af,
   const void *src,
   char *dst,
   size_t size
)

Parameters

af
The address family.
src
The source buffer.
dst
The destination buffer.
size
The size of the destination buffer.

Returns

Returns a pointer to the destination buffer. Otherwise, NULL is returned if a system error occurs and the global variable errno is set to indicate the error.

Comments

This is a standard network function.

Compatibility

This function is not in the C99 specification.

inet_pton Function ^TOP^

Purpose

Converts a presentation format address to network format.

Declared In

posix/arpa/inet.h

Prototype

int inet_pton (
   int af,
   const char *src,
   void *dst
)

Parameters

af
The address family.
src
The printable form as specified in a character string.
dst
The destination string.

Returns

Returns 1 if the address was valid for the specified address family, or zero (0) if the address was not parseable in the specified address family, or -1 if some system error occurred (in which case the global variable errno is set to indicate the error).

Comments

This is a standard network function.

Compatibility

This function is not in the C99 specification.