1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="TCP/IP Library Reference"
23 HREF="tcpip-library-reference.html"><LINK
26 HREF="net-common-tcpip-manpages-inet-net.html"><LINK
29 HREF="net-common-tcpip-manpages-iso-addr.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-common-tcpip-manpages-inet-net.html"
65 >Chapter 38. TCP/IP Library Reference</TD
71 HREF="net-common-tcpip-manpages-iso-addr.html"
85 NAME="NET-COMMON-TCPIP-MANPAGES-IPX">ipx</H1
94 >IPX(3) System Library Functions Manual IPX(3)
97 ipx_addr, ipx_ntoa - IPX address conversion routines
100 #include <sys/types.h>
101 #include <netipx/ipx.h>
104 ipx_addr(const char *cp);
107 ipx_ntoa(struct ipx_addr ipx);
110 The routine ipx_addr() interprets character strings representing IPX
111 addresses, returning binary information suitable for use in system calls.
112 The routine ipx_ntoa() takes IPX addresses and returns ASCII strings rep-
113 resenting the address in a notation in common use:
115 <network number>.<host number>.<port number>
117 Trailing zero fields are suppressed, and each number is printed in hex-
118 adecimal, in a format suitable for input to ipx_addr(). Any fields lack-
119 ing super-decimal digits will have a trailing `H' appended.
121 An effort has been made to ensure that ipx_addr() be compatible with most
122 formats in common use. It will first separate an address into 1 to 3
123 fields using a single delimiter chosen from period (`.'), colon (`:'), or
124 pound-sign (`#'). Each field is then examined for byte separators (colon
125 or period). If there are byte separators, each subfield separated is
126 taken to be a small hexadecimal number, and the entirety is taken as a
127 network-byte-ordered quantity to be zero extended in the high-network-
128 order bytes. Next, the field is inspected for hyphens, in which case the
129 field is assumed to be a number in decimal notation with hyphens separat-
130 ing the millenia. Next, the field is assumed to be a number: It is
131 interpreted as hexadecimal if there is a leading `0x' (as in C), a trail-
132 ing `H' (as in Mesa), or there are any super-decimal digits present. It
133 is interpreted as octal is there is a leading `0' and there are no super-
134 octal digits. Otherwise, it is converted as a decimal number.
140 ns(4), hosts(5), networks(5)
143 The precursor ns_addr() and ns_ntoa() functions appeared in 4.3BSD.
146 The string returned by ipx_ntoa() resides in a static memory area. The
147 function ipx_addr() should diagnose improperly formed input, and there
148 should be an unambiguous way to recognize this.
161 SUMMARY="Footer navigation table"
172 HREF="net-common-tcpip-manpages-inet-net.html"
190 HREF="net-common-tcpip-manpages-iso-addr.html"
206 HREF="tcpip-library-reference.html"