BSD 4_4 development
[unix-history] / usr / share / man / cat3 / ntoa.0
index fc5abc0..f8e9f6f 100644 (file)
-
-
-
-INET(3)                       1990                       INET(3)
-
-
+INET(3)                     BSD Programmer's Manual                    INET(3)
 
 N\bNA\bAM\bME\bE
 
 N\bNA\bAM\bME\bE
-     inet_aton, inet_addr, inet_network, inet_ntoa,
-     inet_makeaddr, inet_lnaof, inet_netof - Internet address
-     manipulation routines
+     i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn, i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br, i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk, i\bin\bne\bet\bt_\b_n\bnt\bto\boa\ba, i\bin\bne\bet\bt_\b_m\bma\bak\bke\bea\bad\bdd\bdr\br, i\bin\bne\bet\bt_\b_l\bln\bna\bao\bof\bf,
+     i\bin\bne\bet\bt_\b_n\bne\bet\bto\bof\bf - Internet address manipulation routines
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/s\bso\boc\bck\bke\bet\bt.\b.h\bh>\b>
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<n\bne\bet\bti\bin\bne\bet\bt/\b/i\bin\bn.\b.h\bh>\b>
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<a\bar\brp\bpa\ba/\b/i\bin\bne\bet\bt.\b.h\bh>\b>
 
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/s\bso\boc\bck\bke\bet\bt.\b.h\bh>\b>
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<n\bne\bet\bti\bin\bne\bet\bt/\b/i\bin\bn.\b.h\bh>\b>
      #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<a\bar\brp\bpa\ba/\b/i\bin\bne\bet\bt.\b.h\bh>\b>
 
-     i\bin\bnt\bt i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn(\b(c\bcp\bp,\b, p\bpi\bin\bn)\b)
-     c\bch\bha\bar\br *\b*c\bcp\bp;\b;
-     s\bst\btr\bru\buc\bct\bt i\bin\bn_\b_a\bad\bdd\bdr\br *\b*p\bpi\bin\bn;\b;
+     _\bi_\bn_\bt
+     i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn(_\bc_\bh_\ba_\br _\b*_\bc_\bp, _\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br _\b*_\bp_\bi_\bn);
 
 
-     u\bun\bns\bsi\big\bgn\bne\bed\bd l\blo\bon\bng\bg i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br(\b(c\bcp\bp)\b)
-     c\bch\bha\bar\br *\b*c\bcp\bp;\b;
+     _\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\bl_\bo_\bn_\bg
+     i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br(_\bc_\bh_\ba_\br _\b*_\bc_\bp);
 
 
-     u\bun\bns\bsi\big\bgn\bne\bed\bd l\blo\bon\bng\bg i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk(\b(c\bcp\bp)\b)
-     c\bch\bha\bar\br *\b*c\bcp\bp;\b;
+     _\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\bl_\bo_\bn_\bg
+     i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk(_\bc_\bh_\ba_\br _\b*_\bc_\bp);
 
 
-     c\bch\bha\bar\br *\b*i\bin\bne\bet\bt_\b_n\bnt\bto\boa\ba(\b(i\bin\bn)\b)
-     s\bst\btr\bru\buc\bct\bt i\bin\bn_\b_a\bad\bdd\bdr\br i\bin\bn;\b;
+     _\bc_\bh_\ba_\br _\b*
+     i\bin\bne\bet\bt_\b_n\bnt\bto\boa\ba(_\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br _\bi_\bn);
 
 
-     s\bst\btr\bru\buc\bct\bt i\bin\bn_\b_a\bad\bdd\bdr\br i\bin\bne\bet\bt_\b_m\bma\bak\bke\bea\bad\bdd\bdr\br(\b(n\bne\bet\bt,\b, l\bln\bna\ba)\b)
-     i\bin\bnt\bt n\bne\bet\bt,\b, l\bln\bna\ba;\b;
+     _\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br
+     i\bin\bne\bet\bt_\b_m\bma\bak\bke\bea\bad\bdd\bdr\br(_\bi_\bn_\bt _\bn_\be_\bt, _\bi_\bn_\bt _\bl_\bn_\ba);
 
 
-     u\bun\bns\bsi\big\bgn\bne\bed\bd l\blo\bon\bng\bg i\bin\bne\bet\bt_\b_l\bln\bna\bao\bof\bf(\b(i\bin\bn)\b)
-     s\bst\btr\bru\buc\bct\bt i\bin\bn_\b_a\bad\bdd\bdr\br i\bin\bn;\b;
+     _\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\bl_\bo_\bn_\bg
+     i\bin\bne\bet\bt_\b_l\bln\bna\bao\bof\bf(_\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br _\bi_\bn);
 
 
-     u\bun\bns\bsi\big\bgn\bne\bed\bd l\blo\bon\bng\bg i\bin\bne\bet\bt_\b_n\bne\bet\bto\bof\bf(\b(i\bin\bn)\b)
-     s\bst\btr\bru\buc\bct\bt i\bin\bn_\b_a\bad\bdd\bdr\br i\bin\bn;\b;
+     _\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\bl_\bo_\bn_\bg
+     i\bin\bne\bet\bt_\b_n\bne\bet\bto\bof\bf(_\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br _\bi_\bn);
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     The routines _\bi_\bn_\be_\bt__\ba_\bt_\bo_\bn, _\bi_\bn_\be_\bt__\ba_\bd_\bd_\br and _\bi_\bn_\be_\bt__\bn_\be_\bt_\bw_\bo_\br_\bk interpret
-     character strings representing numbers expressed in the
-     Internet standard "." notation.  The _\bi_\bn_\be_\bt__\ba_\bt_\bo_\bn routine
-     interprets the specified character string as an Internet
-     address, placing the address into the structure provided.
-     It returns 1 if the string was successfully interpreted, or
-     0 if the string is invalid.  The _\bi_\bn_\be_\bt__\ba_\bd_\bd_\br and _\bi_\bn_\be_\bt__\bn_\be_\bt_\bw_\bo_\br_\bk
-     functions return numbers suitable for use as Internet
-     addresses and Internet network numbers, respectively.  The
-     routine _\bi_\bn_\be_\bt__\bn_\bt_\bo_\ba takes an Internet address and returns an
-     ASCII string representing the address in "." notation.  The
-     routine _\bi_\bn_\be_\bt__\bm_\ba_\bk_\be_\ba_\bd_\bd_\br takes an Internet network number and a
-     local network address and constructs an Internet address
-     from it.  The routines _\bi_\bn_\be_\bt__\bn_\be_\bt_\bo_\bf and _\bi_\bn_\be_\bt__\bl_\bn_\ba_\bo_\bf break apart
-     Internet host addresses, returning the network number and
-     local network address part, respectively.
-
-     All Internet addresses are returned in network order (bytes
-     ordered from left to right).  All network numbers and local
-
-
-
-Printed 7/27/90               June                             1
-
-
+     The routines i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn(), i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br() and i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk() interpret char-
+     acter strings representing numbers expressed in the Internet standard `.'
+     notation.  The i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn() routine interprets the specified character
+     string as an Internet address, placing the address into the structure
+     provided.  It returns 1 if the string was successfully interpreted, or 0
+     if the string is invalid.  The i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br() and i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk() functions
+     return numbers suitable for use as Internet addresses and Internet net-
+     work numbers, respectively.  The routine i\bin\bne\bet\bt_\b_n\bnt\bto\boa\ba() takes an Internet
+     address and returns an ASCII string representing the address in `.' nota-
+     tion.  The routine i\bin\bne\bet\bt_\b_m\bma\bak\bke\bea\bad\bdd\bdr\br() takes an Internet network number and a
+     local network address and constructs an Internet address from it.  The
+     routines i\bin\bne\bet\bt_\b_n\bne\bet\bto\bof\bf() and i\bin\bne\bet\bt_\b_l\bln\bna\bao\bof\bf() break apart Internet host address-
+     es, returning the network number and local network address part, respec-
+     tively.
+
+     All Internet addresses are returned in network order (bytes ordered from
+     left to right).  All network numbers and local address parts are returned
+     as machine format integer values.
 
 
+I\bIN\bNT\bTE\bER\bRN\bNE\bET\bT A\bAD\bDD\bDR\bRE\bES\bSS\bSE\bES\bS
+     Values specified using the `.' notation take one of the following forms:
 
 
+           a.b.c.d
+           a.b.c
+           a.b
+           a
 
 
+     When four parts are specified, each is interpreted as a byte of data and
+     assigned, from left to right, to the four bytes of an Internet address.
+     Note that when an Internet address is viewed as a 32-bit integer quantity
+     on the VAX the bytes referred to above appear as ``d.c.b.a''. That is,
+     VAX bytes are ordered from right to left.
 
 
-INET(3)                       1990                       INET(3)
+     When a three part address is specified, the last part is interpreted as a
+     16-bit quantity and placed in the right-most two bytes of the network ad-
+     dress.  This makes the three part address format convenient for specify-
+     ing Class B network addresses as ``128.net.host''.
 
 
+     When a two part address is supplied, the last part is interpreted as a
+     24-bit quantity and placed in the right most three bytes of the network
+     address.  This makes the two part address format convenient for specify-
+     ing Class A network addresses as ``net.host''.
 
 
+     When only one part is given, the value is stored directly in the network
+     address without any byte rearrangement.
 
 
-     address parts are returned as machine format integer values.
+     All numbers supplied as ``parts'' in a `.' notation may be decimal, oc-
+     tal, 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).
 
 
-I\bIN\bNT\bTE\bER\bRN\bNE\bET\bT A\bAD\bDD\bDR\bRE\bES\bSS\bSE\bES\bS
-     Values specified using the "." notation take one of the fol-
-     lowing forms:
-         a.b.c.d
-         a.b.c
-         a.b
-         a
-     When four parts are specified, each is interpreted as a byte
-     of data and assigned, from left to right, to the four bytes
-     of an Internet address.  Note that when an Internet address
-     is viewed as a 32-bit integer quantity on the VAX the bytes
-     referred to above appear as "d.c.b.a".  That is, VAX bytes
-     are ordered from right to left.
-
-     When a three part address is specified, the last part is
-     interpreted as a 16-bit quantity and placed in the right-
-     most two bytes of the network address.  This makes the three
-     part address format convenient for specifying Class B net-
-     work addresses as "128.net.host".
-
-     When a two part address is supplied, the last part is inter-
-     preted as a 24-bit quantity and placed in the right most
-     three bytes of the network address.  This makes the two part
-     address format convenient for specifying Class A network
-     addresses as "net.host".
-
-     When only one part is given, the value is stored directly in
-     the network address 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; oth-
-     erwise, a leading 0 implies octal; otherwise, the number is
-     interpreted as decimal).
+D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
+     The constant INADDR_NONE is returned by i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br() and i\bin\bne\bet\bt_\b_n\bne\bet\btw\bwo\bor\brk\bk()
+     for malformed requests.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
-     gethostbyname(3), getnetent(3), hosts(5), networks(5),
+     gethostbyname(3),  getnetent(3),  hosts(5),  networks(5),
 
 
-D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
-     The constant I\bIN\bNA\bAD\bDD\bDR\bR_\b_N\bNO\bON\bNE\bE is returned by _\bi_\bn_\be_\bt__\ba_\bd_\bd_\br and
-     _\bi_\bn_\be_\bt__\bn_\be_\bt_\bw_\bo_\br_\bk for malformed requests.
+H\bHI\bIS\bST\bTO\bOR\bRY\bY
+     These functions appeared in 4.2BSD.
 
 B\bBU\bUG\bGS\bS
 
 B\bBU\bUG\bGS\bS
-     The value INADDR_NONE (0xffffffff) is a valid broadcast
-     address, but _\bi_\bn_\be_\bt__\ba_\bd_\bd_\br cannot return that value without
-     indicating failure.  The newer _\bi_\bn_\be_\bt__\ba_\bt_\bo_\bn function does not
-     share this problem.  The problem of host byte ordering
-     versus network byte ordering is confusing.  The string
-     returned by _\bi_\bn_\be_\bt__\bn_\bt_\bo_\ba resides in a static memory area.
-     Inet_addr should return a struct in_addr.
-
-
-
-Printed 7/27/90               June                             2
-
+     The value INADDR_NONE (0xffffffff) is a valid broadcast address, but
+     i\bin\bne\bet\bt_\b_a\bad\bdd\bdr\br() cannot return that value without indicating failure.  The
+     newer i\bin\bne\bet\bt_\b_a\bat\bto\bon\bn() function does not share this problem.  The problem of
+     host byte ordering versus network byte ordering is confusing.  The string
+     returned by i\bin\bne\bet\bt_\b_n\bnt\bto\boa\ba() resides in a static memory area.
 
 
+     Inet_addr should return a _\bs_\bt_\br_\bu_\bc_\bt _\bi_\bn_\b__\ba_\bd_\bd_\br.
 
 
+4.2 Berkeley Distribution        June 4, 1993                                2