Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inet(4n)

arp(8n)

ifconfig(8n)



ARP(4N)                 COMMAND REFERENCE                 ARP(4N)



NAME
     arp - Address Resolution Protocol

SYNOPSIS
     pseudo-device ether

DESCRIPTION
     ARP is a protocol used to dynamically map between
     DARPAInternet and 10Mb/s Ethernet addresses.  It is used by
     all the 10Mb/s Ethernet interface drivers.

     ARP caches Internet-Ethernet address mappings.  When an
     interface requests a mapping for an address not in the
     cache, ARP queues the message which requires the mapping and
     broadcasts a message on the associated network requesting
     the address mapping.  If a response is provided, the new
     mapping is cached and any pending messages are transmitted.
     ARP will queue at most one packet while waiting for a
     mapping request to be responded to; only the most recently
     ``transmitted'' packet is kept.

     To enable communications with systems which do not use ARP,
     ioctl's are provided to enter and delete entries in the
     Internet-to-Ethernet tables.  Usage:

          #include <sys/ioctl.h>
          #include <sys/socket.h>
          #include <net/if.h>
          struct arpreq arpreq;

          ioctl(s, SIOCSARP, (caddr_t)&arpreq);
          ioctl(s, SIOCGARP, (caddr_t)&arpreq);
          ioctl(s, SIOCDARP, (caddr_t)&arpreq);
     Each ioctl takes the same structure as an argument.
     SIOCSARP sets an ARP entry, SIOCGARP gets an ARP entry, and
     SIOCDARP deletes an ARP entry.  These ioctls may be applied
     to any socket descriptor s, but only by the super-user.  The
     arpreq structure contains:

          /*
           * ARP ioctl request
           */
          struct arpreq {
               struct sockaddr     arp_pa;        /* protocol address */
               struct sockaddr     arp_ha;        /* hardware address */
               int  arp_flags;          /* flags */
          };
          /*  arp_flags field values */
          #define ATF_COM          2    /* completed entry (arp_ha valid) */
          #define   ATF_PERM  4    /* permanent entry */
          #define   ATF_PUBL  8    /* publish (respond for other host) */




Printed 10/17/86                                                1





ARP(4N)                 COMMAND REFERENCE                 ARP(4N)



     The address family for the arp_pa sockaddr must be AF_INET;
     for the arp_ha sockaddr it must be AF_UNSPEC.  The only flag
     bits which may be written are ATF_PERMandATF_PUBL.  ATF_PERM
     causes the entry to be permanent if the ioctl call succeeds.
     The peculiar nature of the ARP tables may cause the ioctl to
     fail if more than 4 (permanent) Internet host addresses hash
     to the same slot.  ATF_PUBL specifies that the ARP code
     should respond to ARP requests for the indicated host coming
     from other machines.  This allows a Sun to act as an " ARP
     server" which may be useful in convincing an ARP-only
     machine to talk to a non-ARP machine.

     ARP watches passively for hosts impersonating the local host
     (i.e. a host which responds to an ARP mapping request for
     the local host's address).

DIAGNOSTICS
     duplicate IP address!!
     sent from ethernet address:
     %x:%x:%x:%x:%x:%x.

     ARP has discovered another
     host on the local network which
     responds to mapping requests
     for its own Internet address.


CAVEATS
     ARP packets on the Ethernet use only 42 bytes of data,
     however, the smallest legal Ethernet packet is 60 bytes (not
     including CRC).  Some systems may not enforce the minimum
     packet size, others will.

SEE ALSO
     inet(4n), arp(8n), ifconfig(8n).




















Printed 10/17/86                                                2



%%index%%
na:72,69;
sy:141,191;
de:332,3500;3976,1129;
di:5105,428;
ca:5533,271;
se:5804,148;
%%index%%000000000117

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