Byteorder – Comtrol eCos User Manual

Page 509

Advertising
background image

Chapter 38. TCP/IP Library Reference

The gethostname() function call conforms to X/Open Portability Guide

Issue 4.2 (“XPG4.2”).

HISTORY

The gethostname() function call appeared in 4.2BSD.

BUGS

Host names are limited to MAXHOSTNAMELEN (from

<

sys/param.h>) characters,

currently 256.

This includes the terminating NUL character.

If the buffer passed to gethostname() is smaller than MAXHOSTNAMELEN,

other operating systems may not guarantee termination with NUL.

BSD

June 4, 1993

BSD

byteorder

BYTEORDER(3)

System Library Functions Manual

BYTEORDER(3)

NAME

htonl, htons, ntohl, ntohs, htobe32, htobe16, betoh32, betoh16, htole32,

htole16, letoh32, letoh16, swap32, swap16 - convert values between dif-

ferent byte orderings

SYNOPSIS

#include

<

sys/types.h>

#include

<

machine/endian.h>

u_int32_t

htonl(u_int32_t host32);

u_int16_t

htons(u_int16_t host16);

u_int32_t

ntohl(u_int32_t net32);

u_int16_t

ntohs(u_int16_t net16);

u_int32_t

htobe32(u_int32_t host32);

u_int16_t

htobe16(u_int16_t host16);

u_int32_t

betoh32(u_int32_t big32);

u_int16_t

betoh16(u_int16_t big16);

405

Advertising