99 Protocols arp(7P)
100
101 The xarpreq structure contains:
102
103 /*
104 * Extended ARP ioctl request
105 */
106 struct xarpreq {
107 struct sockaddr_storage xarp_pa; /* protocol address */
108 struct sockaddr_dl xarp_ha; /* hardware address */
109 int xarp_flags; /* arp_flags field values */
110 };
111 #define ATF_COM 0x2 /* completed entry (arp_ha valid) */
112 #define ATF_PERM 0x4 /* permanent (non-aging) entry */
113 #define ATF_PUBL 0x8 /* publish (respond for other host) */
114 #define ATF_USETRAILERS 0x10 /* send trailer pckts to host */
115 #define ATF_AUTHORITY 0x20 /* hardware address is authoritative */
116
117 The address family for the [x]arp_pa sockaddr must be
118 AF_INET. The ATF_COM flag bits ([x]arp_flags) cannot be
119 altered. ATF_USETRAILER is not implemented on Solaris and
120 is retained for compatibility only. ATF_PERM makes the
121 entry permanent (disables aging) if the ioctl() request
122 succeeds. ATF_PUBL specifies that the system should respond
123 to ARP requests for the indicated protocol address coming
124 from other machines. This allows a host to act as an "ARP
125 server," which may be useful in convincing an ARP-only
126 machine to talk to a non-ARP machine. ATF_AUTHORITY indi-
127 cates that this machine owns the address. ARP does not
128 update the entry based on received packets.
129
130 The address family for the arp_ha sockaddr must be
131 AF_UNSPEC.
132
133 Before invoking any of the SIOC*XARP ioctls, user code must
134 fill in the xarp_pa field with the protocol (IP) address
135 information, similar to the BSD variant. The SIOC*XARP
136 ioctls come in two (legal) varieties, depending on
137 xarp_ha.sdl_nlen:
138 1. if sdl_nlen = 0, it behaves as an extended BSD ioctl.
139 The kernel uses the IP address to determine the network
154 be set to the size of hardware address length and the
155 hardware address itself must be placed in the
156 LLADDR/sdl_data[] area. (EINVAL will be returned if user
157 specified sdl_alen does not match the address length of the
158 identified interface).
159
160 On return from the kernel on a SIOCGXARP ioctl, the kernel
161 fills in the name of the interface (excluding terminating
162 NULL) and its hardware address, one after another, in the
163 sdl_data/LLADDR area; if the two are larger than can be held
164 in the 244 byte sdl_data[] area, an ENOSPC error is
165 returned. Assuming it fits, the kernel will also set
166 sdl_alen with the length of hardware address, sdl_nlen with
167 the length of name of the interface (excluding terminating
168 NULL), sdl_type with an IFT_* value to indicate the type of
169 the media, sdl_slen with 0, sdl_family with AF_LINK and
170 sdl_index (which if not 0) with system given index for the
171 interface. The information returned is very similar to that
172 returned via routing sockets on an RTM_IFINFO message.
173
174 ARP performs duplicate address detection for local
175 addresses. When a logical interface is brought up (IFF_UP)
176 or any time the hardware link goes up (IFF_RUNNING), ARP
177 sends probes (ar$spa == 0) for the assigned address. If a
178 conflict is found, the interface is torn down. See
179 ifconfig(1M) for more details.
180
181 ARP watches for hosts impersonating the local host, that is,
182 any host that responds to an ARP request for the local
183 host's address, and any address for which the local host is
184 an authority. ARP defends local addresses and logs those
185 with ATF_AUTHORITY set, and can tear down local addresses on
186 an excess of conflicts.
187
188 ARP also handles UNARP messages received from other nodes.
189 It does not generate these messages.
190
191 PACKET EVENTS
192 The arp driver registers itself with the netinfo interface.
193 To gain access to these events, a handle from
|
99 Protocols arp(7P)
100
101 The xarpreq structure contains:
102
103 /*
104 * Extended ARP ioctl request
105 */
106 struct xarpreq {
107 struct sockaddr_storage xarp_pa; /* protocol address */
108 struct sockaddr_dl xarp_ha; /* hardware address */
109 int xarp_flags; /* arp_flags field values */
110 };
111 #define ATF_COM 0x2 /* completed entry (arp_ha valid) */
112 #define ATF_PERM 0x4 /* permanent (non-aging) entry */
113 #define ATF_PUBL 0x8 /* publish (respond for other host) */
114 #define ATF_USETRAILERS 0x10 /* send trailer pckts to host */
115 #define ATF_AUTHORITY 0x20 /* hardware address is authoritative */
116
117 The address family for the [x]arp_pa sockaddr must be
118 AF_INET. The ATF_COM flag bits ([x]arp_flags) cannot be
119 altered. ATF_USETRAILERS is not implemented on Solaris and
120 is retained for compatibility only. ATF_PERM makes the
121 entry permanent (disables aging) if the ioctl() request
122 succeeds. ATF_PUBL specifies that the system should respond
123 to ARP requests for the indicated protocol address coming
124 from other machines. This allows a host to act as an "ARP
125 server," which may be useful in convincing an ARP-only
126 machine to talk to a non-ARP machine. ATF_AUTHORITY indi-
127 cates that this machine owns the address. ARP does not
128 update the entry based on received packets.
129
130 The address family for the arp_ha sockaddr must be
131 AF_UNSPEC.
132
133 Before invoking any of the SIOC*XARP ioctls, user code must
134 fill in the xarp_pa field with the protocol (IP) address
135 information, similar to the BSD variant. The SIOC*XARP
136 ioctls come in two (legal) varieties, depending on
137 xarp_ha.sdl_nlen:
138 1. if sdl_nlen = 0, it behaves as an extended BSD ioctl.
139 The kernel uses the IP address to determine the network
154 be set to the size of hardware address length and the
155 hardware address itself must be placed in the
156 LLADDR/sdl_data[] area. (EINVAL will be returned if user
157 specified sdl_alen does not match the address length of the
158 identified interface).
159
160 On return from the kernel on a SIOCGXARP ioctl, the kernel
161 fills in the name of the interface (excluding terminating
162 NULL) and its hardware address, one after another, in the
163 sdl_data/LLADDR area; if the two are larger than can be held
164 in the 244 byte sdl_data[] area, an ENOSPC error is
165 returned. Assuming it fits, the kernel will also set
166 sdl_alen with the length of hardware address, sdl_nlen with
167 the length of name of the interface (excluding terminating
168 NULL), sdl_type with an IFT_* value to indicate the type of
169 the media, sdl_slen with 0, sdl_family with AF_LINK and
170 sdl_index (which if not 0) with system given index for the
171 interface. The information returned is very similar to that
172 returned via routing sockets on an RTM_IFINFO message.
173
174 The ARP ioctls have several additional restrictions and
175 enhancements when used in conjunction with IPMP:
176
177 * The ARP mappings for IPMP data and test addresses are
178 managed by the kernel, and thus cannot be changed
179 through any ARP ioctls, though they may be retrieved
180 using *SIOCGARP* or *SIOCGXARP*.
181
182 * ARP mappings for a given IPMP group must be consistent
183 across the group. Therefore, ARP mappings cannot be
184 associated with individual underlying IP interfaces in
185 an IPMP group, and must instead be associated with the
186 corresponding IPMP IP interface.
187
188 * Proxy ARP mappings for an IPMP group are automatically
189 managed by the kernel. Specifically, if the hardware
190 address in a *SIOCSARP* or *SIOCSXARP* request matches
191 the hardware address of an IP interface in an IPMP
192 group, and the IP address is not local to the system,
193 the kernel will regard this as a IPMP Proxy ARP entry.
194 This IPMP Proxy ARP entry will have its hardware
195 address automatically adjusted in order to keep the IP
196 address reachable (provided the IPMP group has not
197 entirely failed).
198
199 ARP performs duplicate address detection for local
200 addresses. When a logical interface is brought up (IFF_UP)
201 or any time the hardware link goes up (IFF_RUNNING), ARP
202 sends probes (ar$spa == 0) for the assigned address. If a
203 conflict is found, the interface is torn down. See
204 ifconfig(1M) for more details.
205
206 ARP watches for hosts impersonating the local host, that is,
207 any host that responds to an ARP request for the local
208 host's address, and any address for which the local host is
209 an authority. ARP defends local addresses and logs those
210 with ATF_AUTHORITY set, and can tear down local addresses on
211 an excess of conflicts.
212
213 ARP also handles UNARP messages received from other nodes.
214 It does not generate these messages.
215
216 PACKET EVENTS
217 The arp driver registers itself with the netinfo interface.
218 To gain access to these events, a handle from
|