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

9    in.h

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

Palm OS® Developer Suite

     

The <in.h> header defines functions useful for converting between Internet host and network addresses.

Structures and Types ^TOP^

sockaddr_in Struct ^TOP^

Purpose

Defines a structure used to store Internet addresses.

Declared In

posix/netinet/in.h

Prototype

struct sockaddr_in {
   sa_family_t sin_family;
   in_port_t sin_port;
   struct in_addr sin_addr;
   uint8_t sin_zero[8];
}

Fields

sin_family
AF_INET.
sin_port
The port number.
sin_addr
The IP address.
sin_zero
The address value.

Functions and Macros ^TOP^

htonl Function ^TOP^

Purpose

Converts 32-bit values between host byte order and network byte order.

Declared In

posix/netinet/in.h

Prototype

uint32_t htonl (
   uint32_t host32
)

Parameters

host32
The value being converted.

Returns

Returns an unsigned integer.

Compatibility

This function is not in the C99 specification.

See Also

gethostbyname(), getservent()

htons Function ^TOP^

Purpose

Converts 16-bit values between host byte order and network byte order.

Declared In

posix/netinet/in.h

Prototype

uint16_t htons (
   uint16_t host16
)

Parameters

host16
The value being converted.

Returns

Returns an unsigned short integer.

Compatibility

This function is not in the C99 specification.

See Also

gethostbyname(), getservent()

ntohl Function ^TOP^

Purpose

Converts 32-bit values between network byte order and host byte order.

Declared In

posix/netinet/in.h

Prototype

uint32_t ntohl (
   uint32_t net32
)

Parameters

net32
The value being converted.

Returns

Returns an unsigned integer.

Compatibility

This function is not in the C99 specification.

See Also

gethostbyname(), getservent()

ntohs Function ^TOP^

Purpose

Converts 16-bit values between network byte order and host byte order.

Declared In

posix/netinet/in.h

Prototype

uint16_t ntohs (
   uint16_t net16
)

Parameters

net16
The value being converted.

Returns

Returns an unsigned short integer.

Compatibility

This function is not in the C99 specification.

See Also

gethostbyname(), getservent()