Home | History | Annotate | Download | only in netinet
History log of /src/sys/netinet/if_inarp.h
RevisionDateAuthorComments
 1.53  03-Sep-2022  thorpej Convert ARP from a legacy netisr to pktqueue.
 1.52  11-Sep-2020  roy ARP: Use ND rather than our own.

This brings the benefit of Neighbour Unreachability Detection which is
something ARP sorely lacks.

The new timings mirror those of IPv6 and are adjustable via sysctl(8).
Unlike IPv6 ND, these are global and not per interface.
 1.51  21-Feb-2017  ozaki-r Replace malloc for DAD with kmem and move them out of the lock for DAD
 1.50  11-Oct-2016  roy branches: 1.50.2;
Mark arprequest static and introduce arpannounce so that gratuitous
ARP requests are only send from valid addresses.
 1.49  19-Apr-2016  ozaki-r branches: 1.49.2;
Constify rtentry of arpresolve

We don't need to (rather shouldn't) modify rtentry in there.
 1.48  07-Apr-2016  christos - tidy up error messages
- add a length argument to arpresolve()
- add KASSERT for overflow
 1.47  21-May-2015  ozaki-r Make arp_init, in_revarpinput and revarprequest static
 1.46  16-May-2015  roy Separate ARP handling DAD from inet.
This is done by signalling the intent to try tentative addresses
and then clearing the intent once the address is setup.
When the ARP handler is installed (arp_ifinit) then it adds
dad start and stop functions to the address which are used instead
of calling ARP directly.
 1.45  02-May-2015  roy Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and
IN_IFF_DETATCHED to mimic the IPv6 address behaviour.
Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the
ifreq structure.
Add IPv4 DAD detection via the ARP methods described in RFC 5227.
Add sysctls net.inet.ip.dad_count and net.inet.arp.debug.

Discussed on tech-net@
 1.44  30-Sep-2012  dholland branches: 1.44.14;
Requires <sys/queue.h> for LIST_ENTRY and netinet/in.h for struct in_addr.
 1.43  11-Nov-2011  gdt branches: 1.43.10;
Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.

RTF_ANNOUNCE was defined as RTF_PROTO2. The flag is used to indicated
that host should act as a proxy for a link level arp or ndp request.
(If RTF_PROTO2 is used as an experimental flag (as advertised),
various problems can occur.)

This commit provides a first-class definition with its own bit for
RTF_ANNOUNCE, removes the old aliasing definitions, and adds support
for the new RTF_ANNOUNCE flag to netstat(8) and route(8).,

Also, remove unused RTF_ flags that collide with RTF_PROTO1:
netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1
netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1
(Neither of these flags are used anywhere. Both have been removed
to reduce chances of collision with RTF_PROTO1.)

Figuring this out and the diff are the work of Beverly Schwartz of
BBN.

(Passed release build, boot in VM, with no apparently related atf
failures.)

Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073.
 1.42  18-Feb-2009  yamt branches: 1.42.12;
remove unused #define.
 1.41  24-Oct-2008  dyoung branches: 1.41.2; 1.41.8;
Constify the rt_addrinfo argument to the ifa_rtrequest member
function of struct ifaddr.
 1.40  15-Apr-2008  thorpej branches: 1.40.4; 1.40.10;
Make ARP stats per-cpu.
 1.39  04-Mar-2007  christos branches: 1.39.36;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.38  17-Feb-2007  dyoung KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous
parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
in6_src.c, avoid casts by changing several route_in6 pointers
to struct route pointers. Remove unnecessary casts to caddr_t
elsewhere.

Pave the way for eliminating address family-specific route caches:
soon, struct route will not embed a sockaddr, but it will hold
a reference to an external sockaddr, instead. We will set the
destination sockaddr using rtcache_setdst(). (I created a stub
for it, but it isn't used anywhere, yet.) rtcache_free() will
free the sockaddr. I have extracted from rtcache_free() a helper
subroutine, rtcache_clear(). rtcache_clear() will "forget" a
cached route, but it will not forget the destination by releasing
the sockaddr. I use rtcache_clear() instead of rtcache_free()
in rtcache_update(), because rtcache_update() is not supposed
to forget the destination.

Constify:

1 Introduce const accessor for route->ro_dst, rtcache_getdst().

2 Constify the 'dst' argument to ifnet->if_output(). This
led me to constify a lot of code called by output routines.

3 Constify the sockaddr argument to protosw->pr_ctlinput. This
led me to constify a lot of code called by ctlinput routines.

4 Introduce const macros for converting from a generic sockaddr
to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
satocsin, et cetera.
 1.37  18-May-2006  liamjfoy branches: 1.37.14;
Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
 1.36  10-Dec-2005  elad branches: 1.36.4; 1.36.6; 1.36.8; 1.36.12;
Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
 1.35  21-Apr-2004  itojun branches: 1.35.12;
no space between function name and paren: foo (blah) -> foo(blah)
 1.34  18-Apr-2004  matt De __P()
 1.33  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.32  17-Jan-2001  itojun branches: 1.32.24;
pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).

have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).

benefit: the follwoing command now works. previously we need two route(8)
invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0

remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *. it was
introduced by 4.3BSD-reno and never corrected.

XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.
 1.31  20-May-2000  jhawk Install "show arptab" (db_show_arptab) in the ddb command tree.
Move prototype from netinet/if_inarp.h to ddb/db_interface.h.
Change function to have standard ddb parameters (though they're
ignored).
 1.30  30-Mar-2000  simonb Extern decl of arpintrq.
 1.29  05-Aug-1999  sommerfeld branches: 1.29.2;
Implement arp_drain(), which frees packets tied up in the arp cache if
mbufs are in short supply.
Create a (trivial) protocol domain for arp so that the drain routine will
be called from m_reclaim()
 1.28  21-Feb-1999  drochner -always do an RARP if revarpwhoarewe() is called, it might be for another
interface or the server's configuration has changed
-g/c revarpwhoami()
 1.27  10-Feb-1998  perry add/cleanup multiple inclusion protection.
 1.26  15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.25  17-Jan-1997  mikel branches: 1.25.2;
fix my typo; found by Klaus Klein <kleink@layla.inka.de>
 1.24  17-Jan-1997  mikel add prototypes for ethers(3) functions; fixes PR 2471.
fix suggested by Jason Thorpe.
 1.23  09-Oct-1996  thorpej Merge netbsd-1-2 branch back into mainline.
 1.22  11-May-1996  mycroft branches: 1.22.4;
When sending an ARP request, use the interface address for the route, rather
than the first address assigned. This gives slightly different behaviour in
the presence of aliases. From Bill Fenner, via Pete Bentley.
 1.21  13-Feb-1996  christos netinet prototypes
 1.20  12-Jun-1995  mycroft Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.
 1.19  16-May-1995  cgd parenthesize macro arg usage
 1.18  15-May-1995  cgd spacing fixups and KNF. #define ether address size, so it's not
hardcoded as '6' all over.
 1.17  17-Apr-1995  cgd spacing cleaup. also, minor type mixup fixups.
 1.16  13-Apr-1995  cgd be a bit more careful and explicit with types. (basically a large no-op.)
 1.15  10-Apr-1995  mycroft Remove now unneeded #ifdef. Prototype new function.
 1.14  29-Mar-1995  briggs KERNEL -> _KERNEL
 1.13  26-Mar-1995  jtc KERNEL -> _KERNEL
 1.12  06-Mar-1995  glass remove references to arptnew. fix spelling error
 1.11  27-Feb-1995  glass fix some typos. from frank@fwi.uva.nl (Frank van der Linden)
 1.10  29-Jun-1994  cgd New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.9  13-May-1994  mycroft Update to 4.4-Lite networking code, with a few local changes.
 1.8  02-Feb-1994  hpeyerl Multicast is no longer optional.
 1.7  08-Jan-1994  mycroft Fix some inconsistent spacing; spaces at the end of lines, etc.
 1.6  30-Dec-1993  deraadt "struct ether_addr" for ethers(3) functions.
 1.5  13-Dec-1993  hpeyerl >From cmaeda@cs.washington.edu; part of the multicast patches derived
from the Multicast patches for BSDI.

(I am a "big dopey bear" for having forgotten this. Thanx Havard.)
 1.4  05-Sep-1993  cassidy Add definition for reverse address resolution protocol.
 1.3  20-May-1993  cgd more rcsid additions and file header cleanups
 1.2  19-Apr-1993  mycroft Add consistent multiple-inclusion protection.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.22.4.1  17-Jun-1996  gwr Pad the struct arpcom to avoid unnecessary misalignments on m68k ports.
 1.25.2.3  06-Mar-1997  is Wipe out double function prototypes.
 1.25.2.2  18-Feb-1997  is Having converted everything, remove the struct ether_arp definition completely.
Some small cleanup.
STILLTODO: some sanity checks of the (now) variable link level address length
in incoming packets..
 1.25.2.1  07-Feb-1997  is Snapshot of new ARP code.

Our old ARP code was hardwired for 6-byte length medium
addresses, while the protocol is designed for any size.

This snapshot contains a first hack at getting rid of
Ethernet specific data structures. The ep driver is updated
(and tested on the PCI bus), the iy and fpa drivers have been
updated, but not real life tested yet.

If you want to test this with other drivers, you have to update
them first yourself, and probably tag the relevant directories.
Better contact me if you want to do this.
 1.29.2.2  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.29.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.32.24.4  11-Dec-2005  christos Sync with head.
 1.32.24.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.32.24.2  18-Sep-2004  skrll Sync with HEAD.
 1.32.24.1  03-Aug-2004  skrll Sync with HEAD
 1.35.12.3  03-Sep-2007  yamt sync with head.
 1.35.12.2  26-Feb-2007  yamt sync with head.
 1.35.12.1  21-Jun-2006  yamt sync with head.
 1.36.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.36.8.1  24-May-2006  yamt sync with head.
 1.36.6.1  01-Jun-2006  kardel Sync with head.
 1.36.4.1  09-Sep-2006  rpaulo sync with head
 1.37.14.2  12-Mar-2007  rmind Sync with HEAD.
 1.37.14.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.39.36.2  17-Jan-2009  mjf Sync with HEAD.
 1.39.36.1  02-Jun-2008  mjf Sync with HEAD.
 1.40.10.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.40.4.1  04-May-2009  yamt sync with head.
 1.41.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.41.2.1  03-Mar-2009  skrll Sync with HEAD.
 1.42.12.2  30-Oct-2012  yamt sync with head
 1.42.12.1  17-Apr-2012  yamt sync with head
 1.43.10.2  03-Dec-2017  jdolecek update from HEAD
 1.43.10.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.44.14.4  28-Aug-2017  skrll Sync with HEAD
 1.44.14.3  05-Dec-2016  skrll Sync with HEAD
 1.44.14.2  22-Apr-2016  skrll Sync with HEAD
 1.44.14.1  06-Jun-2015  skrll Sync with HEAD
 1.49.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.49.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.50.2.1  21-Apr-2017  bouyer Sync with HEAD

RSS XML Feed