]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/ref/net-common-tcpip-manpages-ns.html
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / doc / html / ref / net-common-tcpip-manpages-ns.html
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.               -->
9 <HTML
10 ><HEAD
11 ><TITLE
12 >ns</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
14 <META
15 NAME="GENERATOR"
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17 "><LINK
18 REL="HOME"
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
21 REL="UP"
22 TITLE="TCP/IP Library Reference"
23 HREF="tcpip-library-reference.html"><LINK
24 REL="PREVIOUS"
25 TITLE="net_addrcmp"
26 HREF="net-common-tcpip-manpages-net-addrcmp.html"><LINK
27 REL="NEXT"
28 TITLE="resolver"
29 HREF="net-common-tcpip-manpages-resolver.html"></HEAD
30 ><BODY
31 CLASS="SECT1"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#0000FF"
35 VLINK="#840084"
36 ALINK="#0000FF"
37 ><DIV
38 CLASS="NAVHEADER"
39 ><TABLE
40 SUMMARY="Header navigation table"
41 WIDTH="100%"
42 BORDER="0"
43 CELLPADDING="0"
44 CELLSPACING="0"
45 ><TR
46 ><TH
47 COLSPAN="3"
48 ALIGN="center"
49 >eCos Reference Manual</TH
50 ></TR
51 ><TR
52 ><TD
53 WIDTH="10%"
54 ALIGN="left"
55 VALIGN="bottom"
56 ><A
57 HREF="net-common-tcpip-manpages-net-addrcmp.html"
58 ACCESSKEY="P"
59 >Prev</A
60 ></TD
61 ><TD
62 WIDTH="80%"
63 ALIGN="center"
64 VALIGN="bottom"
65 >Chapter 38. TCP/IP Library Reference</TD
66 ><TD
67 WIDTH="10%"
68 ALIGN="right"
69 VALIGN="bottom"
70 ><A
71 HREF="net-common-tcpip-manpages-resolver.html"
72 ACCESSKEY="N"
73 >Next</A
74 ></TD
75 ></TR
76 ></TABLE
77 ><HR
78 ALIGN="LEFT"
79 WIDTH="100%"></DIV
80 ><DIV
81 CLASS="SECT1"
82 ><H1
83 CLASS="SECT1"
84 ><A
85 NAME="NET-COMMON-TCPIP-MANPAGES-NS">ns</H1
86 ><TABLE
87 BORDER="5"
88 BGCOLOR="#E0E0F0"
89 WIDTH="70%"
90 ><TR
91 ><TD
92 ><PRE
93 CLASS="SCREEN"
94 >NS(3)                   System Library Functions Manual                  NS(3)
95
96 NAME
97      ns_addr, ns_ntoa - Xerox NS(tm) address conversion routines
98
99 SYNOPSIS
100      #include &lt;sys/types.h&#62;
101      #include &lt;netns/ns.h&#62;
102
103      struct ns_addr
104      ns_addr(char *cp);
105
106      char *
107      ns_ntoa(struct ns_addr ns);
108
109 DESCRIPTION
110      The routine ns_addr() interprets character strings representing XNS
111      addresses, returning binary information suitable for use in system calls.
112      The routine ns_ntoa() takes XNS addresses and returns ASCII strings rep-
113      resenting the address in a notation in common use in the Xerox Develop-
114      ment Environment:
115
116            &lt;network number&#62;.&lt;host number&#62;.&lt;port number&#62;
117
118      Trailing zero fields are suppressed, and each number is printed in hex-
119      adecimal, in a format suitable for input to ns_addr().  Any fields lack-
120      ing super-decimal digits will have a trailing `H' appended.
121
122      Unfortunately, no universal standard exists for representing XNS
123      addresses.  An effort has been made to ensure that ns_addr() be compati-
124      ble with most formats in common use.  It will first separate an address
125      into 1 to 3 fields using a single delimiter chosen from period (`.'),
126      colon (`:'), or pound-sign `#'.  Each field is then examined for byte
127      separators (colon or period).  If there are byte separators, each sub-
128      field separated is taken to be a small hexadecimal number, and the
129      entirety is taken as a network-byte-ordered quantity to be zero extended
130      in the high-network-order bytes.  Next, the field is inspected for
131      hyphens, in which case the field is assumed to be a number in decimal
132      notation with hyphens separating the millenia.  Next, the field is
133      assumed to be a number: It is interpreted as hexadecimal if there is a
134      leading `0x' (as in C), a trailing `H' (as in Mesa), or there are any
135      super-decimal digits present.  It is interpreted as octal is there is a
136      leading `0' and there are no super-octal digits.  Otherwise, it is con-
137      verted as a decimal number.
138
139 RETURN VALUES
140      None.  (See BUGS.)
141
142 SEE ALSO
143      hosts(5), networks(5)
144
145 HISTORY
146      The ns_addr() and ns_toa() functions appeared in 4.3BSD.
147
148 BUGS
149      The string returned by ns_ntoa() resides in a static memory area.  The
150      function ns_addr() should diagnose improperly formed input, and there
151      should be an unambiguous way to recognize this.
152
153 BSD                              June 4, 1993                              BSD
154     </PRE
155 ></TD
156 ></TR
157 ></TABLE
158 ></DIV
159 ><DIV
160 CLASS="NAVFOOTER"
161 ><HR
162 ALIGN="LEFT"
163 WIDTH="100%"><TABLE
164 SUMMARY="Footer navigation table"
165 WIDTH="100%"
166 BORDER="0"
167 CELLPADDING="0"
168 CELLSPACING="0"
169 ><TR
170 ><TD
171 WIDTH="33%"
172 ALIGN="left"
173 VALIGN="top"
174 ><A
175 HREF="net-common-tcpip-manpages-net-addrcmp.html"
176 ACCESSKEY="P"
177 >Prev</A
178 ></TD
179 ><TD
180 WIDTH="34%"
181 ALIGN="center"
182 VALIGN="top"
183 ><A
184 HREF="ecos-ref.html"
185 ACCESSKEY="H"
186 >Home</A
187 ></TD
188 ><TD
189 WIDTH="33%"
190 ALIGN="right"
191 VALIGN="top"
192 ><A
193 HREF="net-common-tcpip-manpages-resolver.html"
194 ACCESSKEY="N"
195 >Next</A
196 ></TD
197 ></TR
198 ><TR
199 ><TD
200 WIDTH="33%"
201 ALIGN="left"
202 VALIGN="top"
203 >net_addrcmp</TD
204 ><TD
205 WIDTH="34%"
206 ALIGN="center"
207 VALIGN="top"
208 ><A
209 HREF="tcpip-library-reference.html"
210 ACCESSKEY="U"
211 >Up</A
212 ></TD
213 ><TD
214 WIDTH="33%"
215 ALIGN="right"
216 VALIGN="top"
217 >resolver</TD
218 ></TR
219 ></TABLE
220 ></DIV
221 ></BODY
222 ></HTML
223 >