Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ net_aton(3N) — HP-UX 5.50

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lan(4)

     NET_ATON(3N)                                         NET_ATON(3N)

     NAME
          net_aton,  net_ntoa  -  network   station   address   string
          conversion routines

     SYNOPSIS
          #include <stdio.h>
          char *net_aton(dstr, sstr, size)
          char *dstr;
          char *sstr;
          int  size;

          char *net_ntoa(dstr, sstr, size)
          char *dstr;
          char *sstr;
          int  size;

     HP-UX COMPATIBILITY
          Level:    HP-UX/OPTIONAL

          Origin:   HP

     DESCRIPTION
          Net_aton interprets the  null-terminated  ASCII  form  of  a
          network station address (e.g. IEEE802.3 address or Ethernet*
          address) contained in  sstr,  placing  the  network-internal
          form of the address in dstr.  Sstr may be in octal, decimal,
          or hexadecimal format.  Size is the required length  of  the
          network-internal  form  and  must be greater than 0 and less
          than 7 (e.g.  6  for  IEEE802.3  and  Ethernet*).   Dstr  is
          returned.

          Net_ntoa converts the network-internal  form  of  a  network
          station  address  contained  in  sstr  into  its (hex) ASCII
          equivalent in dstr.  The length of sstr is input in the size
          parameter. Size must be a value greater than 0 and less than
          7.  Dstr must be at least (2*size+3) bytes in  length.  Dstr
          is   returned  null-terminated,  with  leading  zeroes  when
          appropriate (e.g. "0x00DD0002AD00" not "0xDD0002AD00").

     EXAMPLE
          #include <stdio.h>
          #include <netio.h>
          #define  destination_addr "0x00DD0002AD00"
           ...
          fis arg;
          char str[16];
           ...
          net_aton(arg.value.s, destination_addr, 6);
            /* arg.value.s = "\000\335\000\002\255\000"  */
          net_ntoa(str, arg.value.s, 6);
            /* str = "0x00DD0002AD00\0" */

     Hewlett-Packard               - 1 -             (printed 7/16/86)

     NET_ATON(3N)                                         NET_ATON(3N)

     SEE ALSO
          lan(4).
          HP Network Services/9000 LAN User's Guide

     DIAGNOSTICS
          The value NULL is returned if any error occurs.

          * Ethernet is a trademark of XEROX corporation.

     Hewlett-Packard               - 2 -             (printed 7/16/86)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026