Home | History | Annotate | Download | only in netinet
History log of /src/sys/netinet/ip_encap.h
RevisionDateAuthorComments
 1.28  07-Dec-2022  knakahara Refactor ip_encap.[ch]

- remove encap_attach() which is no longer used
- remove USE_RADIX code in ip_encap.c, which is used for
encap_attach() only
- remove mask members in encaptab
 1.27  07-Dec-2022  knakahara Implement encap_attach_addr() which is used by IP-encaped tunnels.

The tunnels attached by encap_attach() can process receiving packets
fastly as the softc is searched by radix-tree. However, the tunnels
cannot use priority function which decides tunnel's softc by not only
source and destination but also other informations.
On the other hand, the tunnels attached by encap_attach_func() can
use priority function. However, the tunnels can be slow receiving
processing as the softc is searched by linear search (and uses each
priority function).

encap_attach_addr() can be used for tunnels which is fixed tunnel
source address and tunnel destination address. The tunnels attached
by encap_attach_addr() is searched by thmap(9), so the receiving processing
can be fast. Moreover, the tunnels can use priority function.
 1.26  07-Dec-2022  knakahara refactor: use typedef for ip_encap priority function
 1.25  14-Sep-2018  maxv Use non-variadic function pointer in protosw::pr_input.
 1.24  28-Feb-2018  maxv branches: 1.24.2; 1.24.4;
Remove unused mbuf tags.
 1.23  15-Nov-2017  knakahara Add argument to encapsw->pr_input() instead of m_tag.
 1.22  04-Jul-2016  knakahara branches: 1.22.10;
make encap_lock_{enter,exit} interruptable.
 1.21  04-Jul-2016  knakahara use pserialize(9) and psref(9) (1/2) : without ip_encap radix tree care
 1.20  04-Jul-2016  knakahara let gif(4) promise softint(9) contract (2/2) : ip_encap side

The last commit does not care encaptab. This commit fixes encaptab race which
is used not only gif(4).
 1.19  29-Feb-2016  knakahara remove unnecessary declarations and fix KNF

Thanks to riastradh@
 1.18  26-Feb-2016  knakahara To eliminate gif_softc_list linear search, add extra argument to encapsw.pr_ctlinput().
 1.17  26-Jan-2016  knakahara eliminate variable argument in encapsw
 1.16  26-Jan-2016  knakahara implement encapsw instead of protosw and uniform prototype.

suggested and advised by riastradh@n.o, thanks.

BTW, It seems in_stf_input() had bugs...
 1.15  22-Jan-2016  riastradh Back out previous change to introduce struct encapsw.

This change was intended, but Nakahara-san had already made a better
one locally! So I'll let him commit that one, and I'll try not to
step on anyone's toes again.
 1.14  22-Jan-2016  riastradh Don't abuse struct protosw for ip_encap -- introduce struct encapsw.

Mostly mechanical change to replace it, culling some now-needless
boilerplate around all the users.

This does not substantively change the ip_encap API or eliminate
abuse of sketchy pointer casts -- that will come later, and will be
easier now that it is not tangled up with struct protosw.
 1.13  25-Nov-2008  pooka branches: 1.13.26; 1.13.44;
Make dom_maxrtkey of inet/inet6domain the size of the ip_encap pack
structures. This is far from optimal, but gets rid of iffy
#ifdef INET in radix.c. The radix bonsai still needs lots of love
before loading domains dynamically is possible...
 1.12  24-Apr-2008  ad branches: 1.12.2; 1.12.8; 1.12.10;
Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
 1.11  17-Feb-2007  dyoung branches: 1.11.38; 1.11.40;
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.10  10-Dec-2005  elad branches: 1.10.26;
Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
 1.9  06-Jun-2005  martin branches: 1.9.2;
Since we decided "const struct mbuf *" would not do the right thing (tm),
remove ~all const from mbuf pointers.
 1.8  03-Jun-2005  martin Sprinkle some const
 1.7  02-Jun-2005  tron Change the first argument of the encapsulation check function from
"const struct mbuf *" to "struct mbuf *". Without this change the
actual implementation cannot even use m_copydata() on the mbuf chain
which is broken.
 1.6  02-Feb-2005  perry de-__P -- will ANSIfy .c files later.
 1.5  17-Aug-2004  itojun branches: 1.5.4; 1.5.6;
initialize max_keylen for ip_encap.c earlier
 1.4  18-Apr-2004  matt De __P()
 1.3  17-Jan-2003  itojun branches: 1.3.2;
switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation. it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized. from Joel Wilsson
 1.2  21-Dec-2001  itojun use radix table for inbound tunnel lookup (would increase performance
for machines with a lot of tunnels).
update route cache for IPvX-over-IPv6 tunnel on path MTU discovery.
snyc with kame
 1.1  19-Apr-2000  itojun branches: 1.1.6; 1.1.8; 1.1.10;
introduce sys/netinet/ip_encap.c, to dispatch inbound packets
to protocol handlers, based on src/dst (for ip proto #4/41).
see comment in ip_encap.c for details of the problem we have.
there are too many protocol specs for ip proto #4/41.
backward compatibility with MROUTING case is now provided in ip_encap.c.

fix ipip to work with gif (using ip_encap.c). sorry for breakage.

gif now uses ip_encap.c.

introduce stf pseudo interface (implements 6to4, another IPv6-over-IPv4 code
with ip proto #41).
 1.1.10.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.8.2  17-Jan-2003  thorpej Sync with HEAD.
 1.1.8.1  08-Jan-2002  nathanw Catch up to -current.
 1.1.6.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.1.6.1  19-Apr-2000  bouyer file ip_encap.h was added on branch thorpej_scsipi on 2000-11-20 18:10:25 +0000
 1.3.2.7  11-Dec-2005  christos Sync with head.
 1.3.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.3.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2  25-Aug-2004  skrll Sync with HEAD.
 1.3.2.1  03-Aug-2004  skrll Sync with HEAD
 1.5.6.1  12-Feb-2005  yamt sync with head.
 1.5.4.1  29-Apr-2005  kent sync with -current
 1.9.2.2  26-Feb-2007  yamt sync with head.
 1.9.2.1  21-Jun-2006  yamt sync with head.
 1.10.26.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.40.1  18-May-2008  yamt sync with head.
 1.11.38.2  17-Jan-2009  mjf Sync with HEAD.
 1.11.38.1  02-Jun-2008  mjf Sync with HEAD.
 1.12.10.1  19-Jan-2009  skrll Sync with HEAD.
 1.12.8.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12.2.1  04-May-2009  yamt sync with head.
 1.13.44.2  09-Jul-2016  skrll Sync with HEAD
 1.13.44.1  19-Mar-2016  skrll Sync with HEAD
 1.13.26.1  03-Dec-2017  jdolecek update from HEAD
 1.22.10.1  10-Dec-2017  snj Pull up following revision(s) (requested by knakahara in ticket #419):
sys/net/if_stf.c: revision 1.103
sys/net/if_stf.h: revision 1.8
sys/netinet/in_gif.c: revision 1.89
sys/netinet/in_gif.h: revision 1.17
sys/netinet/in_l2tp.c: revision 1.4
sys/netinet/ip_encap.c: revision 1.66
sys/netinet/ip_encap.h: revision 1.23
sys/netinet/ip_mroute.c: revision 1.148
sys/netinet6/in6_gif.c: revision 1.87
sys/netinet6/in6_gif.h: revision 1.16
sys/netinet6/in6_l2tp.c: revision 1.7
sys/netipsec/xform.h: revision 1.13
sys/netipsec/xform_ipip.c: revision 1.55
Add argument to encapsw->pr_input() instead of m_tag.
 1.24.4.1  10-Jun-2019  christos Sync with HEAD
 1.24.2.1  30-Sep-2018  pgoyette Ssync with HEAD

RSS XML Feed