Comtrol eCos User Manual

Page 546

Advertising
background image

Chapter 38. TCP/IP Library Reference

network number without any byte rearrangement.

All numbers supplied as “parts” in a ‘.’ notation may be decimal,

octal, or hexadecimal, as specified in the C language (i.e., a leading 0x

or 0X implies hexadecimal; otherwise, a leading 0 implies octal; other-

wise, the number is interpreted as decimal).

SEE ALSO

byteorder(3), inet(3), networks(5)

HISTORY

The inet_net_ntop and inet_net_pton functions first appeared in BIND

4.9.4.

BSD

June 18, 1997

BSD

ipx

IPX(3)

System Library Functions Manual

IPX(3)

NAME

ipx_addr, ipx_ntoa - IPX address conversion routines

SYNOPSIS

#include

<

sys/types.h>

#include

<

netipx/ipx.h>

struct ipx_addr

ipx_addr(const char *cp);

char *

ipx_ntoa(struct ipx_addr ipx);

DESCRIPTION

The routine ipx_addr() interprets character strings representing IPX

addresses, returning binary information suitable for use in system calls.

The routine ipx_ntoa() takes IPX addresses and returns ASCII strings rep-

resenting the address in a notation in common use:

<

network number>.

<

host number>.

<

port number>

Trailing zero fields are suppressed, and each number is printed in hex-

adecimal, in a format suitable for input to ipx_addr().

Any fields lack-

ing super-decimal digits will have a trailing ‘H’ appended.

An effort has been made to ensure that ipx_addr() be compatible with most

formats in common use.

It will first separate an address into 1 to 3

fields using a single delimiter chosen from period (‘.’), colon (‘:’), or

pound-sign (‘#’).

Each field is then examined for byte separators (colon

or period).

If there are byte separators, each subfield separated is

taken to be a small hexadecimal number, and the entirety is taken as a

network-byte-ordered quantity to be zero extended in the high-network-

442

Advertising