
arp(7P) Protocols SunOS 5.5
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 0x2 /∗ completed entry (arp_ha valid) ∗/
#define ATF_PERM 0x4 /∗ permanent entry ∗/
#define ATF_PUBL 0x8 /∗ publish (respond for other host) ∗/
#define ATF_USETRAILERS 0x10 /∗ send trailer packets to host ∗/
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 that may be written are ATF_PUBL and
ATF_USETRAILERS. ATF_PERM makes the entry permanent if the ioctl() request
succeeds. The peculiar nature of the ARP tables may cause the ioctl() request to fail if too
many permanentIP 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 host to act as an “ARP server”, which may be useful in convincing an ARP-
only machine to talk to a non-ARP machine.
ARP is also used to negotiate the use of trailer IP encapsulations; trailers are an alternate
encapsulation used to allow efficient packet alignment for large packets despite variable-
sized headers. Hosts that wish to receive trailer encapsulations so indicate by sending
gratuitous ARP translation replies along with replies to IP requests; they are also sent in
reply to IP translation replies. The negotiationis thus fully symmetrical, in that either or
both hosts may request trailers. The ATF_USETRAILERS flag is used to record the receipt
of such a reply, and enables the transmission of trailer packets to that host.
ARP watches passivelyfor hosts impersonating the local host (that is, a host which
responds to an ARP mapping request for the local host’s address).
SEE ALSO arp(1M), ifconfig(1M), if_tcp(7P), inet(7P)
Plummer, Dave, ‘‘An Ethernet Address Resolution Protocol -or- Converting Network Protocol
Addresses to 48.bit Ethernet Addresses for Transmission on Ethernet Hardware,’’ RFC 826, Net-
work Information Center, SRI International, Menlo Park, Calif., November 1982.
Leffler, Sam, and Michael Karels, ‘‘Trailer Encapsulations,’’ RFC 893, Network Information
Center, SRI International,Menlo Park, Calif., April 1984.
DIAGNOSTICS IP: Hardware address ’%x:%x:%x:%x:%x:%x’ trying to be our address ’%d.%d.%d.%d’!
Duplicate IP address. ARP has discovered another host on the local network which
responds to mapping requests for the Internet address of this system.
7P-18 modified 23 Aug 1994
Kommentare zu diesen Handbüchern