Home | History | Annotate | Download | only in netinet
History log of /src/sys/netinet/ip.h
RevisionDateAuthorComments
 1.39  17-Apr-2022  andvar fix various typos in comments.
 1.38  03-Feb-2021  roy CTASSERT -> __CTASSERT to unbreak userland build.

While here move __packed in tcp_debug.h back to where it was and
note removal warrants more investigation.
 1.37  03-Feb-2021  roy Sprinkle CTASSERT to enforce on-wire layout without __packed
 1.36  03-Feb-2021  roy Remove __packed from various network structures

They are already network aligned and adding the __packed attribute
just causes needless compiler warnings about accssing members of packed
objects.
 1.35  28-Aug-2020  riastradh branches: 1.35.2;
netinet: Include the needful so include order doesn't matter.
 1.34  02-Nov-2012  christos fix typo
 1.33  02-Nov-2012  christos make this standalone, like every others (except OpenBSD)
 1.32  24-Jul-2011  christos branches: 1.32.2; 1.32.8; 1.32.12; 1.32.14;
Fill in missing IPTOS defines (from Linux/OpenBSD)
 1.31  25-Dec-2007  perry Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
 1.30  21-Dec-2007  matt Add fix for ip_id information leakage. Since the leakage information is
primarily used with TCP SYN and RST packets and such packets are less than
the smallest sized packet that an IP stack is allowed to fragment, we simply
set ip_id to 0 for all packets 68 bytes or less.
 1.29  17-Dec-2006  christos branches: 1.29.20; 1.29.26; 1.29.28; 1.29.32;
According to ANSI c the only portably defined bitfields are unsigned int ones.
 1.28  05-Sep-2006  rpaulo branches: 1.28.2; 1.28.4;
Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
 1.27  10-Dec-2005  elad branches: 1.27.4; 1.27.8;
Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
 1.26  25-Apr-2004  jonathan branches: 1.26.12;
Initial commit of a port of the FreeBSD implementation of RFC 2385
(MD5 signatures for TCP, as used with BGP). Credit for original
FreeBSD code goes to Bruce M. Simpson, with FreeBSD sponsorship
credited to sentex.net. Shortening of the setsockopt() name
attributed to Vincent Jardin.

This commit is a minimal, working version of the FreeBSD code, as
MFC'ed to FreeBSD-4. It has received minimal testing with a ttcp
modified to set the TCP-MD5 option; BMS's additions to tcpdump-current
(tcpdump -M) confirm that the MD5 signatures are correct. Committed
as-is for further testing between a NetBSD BGP speaker (e.g., quagga)
and industry-standard BGP speakers (e.g., Cisco, Juniper).


NOTE: This version has two potential flaws. First, I do see any code
that verifies recieved TCP-MD5 signatures. Second, the TCP-MD5
options are internally padded and assumed to be 32-bit aligned. A more
space-efficient scheme is to pack all TCP options densely (and
possibly unaligned) into the TCP header ; then do one final padding to
a 4-byte boundary. Pre-existing comments note that accounting for
TCP-option space when we add SACK is yet to be done. For now, I'm
punting on that; we can solve it properly, in a way that will handle
SACK blocks, as a separate exercise.

In case a pullup to NetBSD-2 is requested, this adds sys/netipsec/xform_tcp.c
,and modifies:

sys/net/pfkeyv2.h,v 1.15
sys/netinet/files.netinet,v 1.5
sys/netinet/ip.h,v 1.25
sys/netinet/tcp.h,v 1.15
sys/netinet/tcp_input.c,v 1.200
sys/netinet/tcp_output.c,v 1.109
sys/netinet/tcp_subr.c,v 1.165
sys/netinet/tcp_usrreq.c,v 1.89
sys/netinet/tcp_var.h,v 1.109
sys/netipsec/files.netipsec,v 1.3
sys/netipsec/ipsec.c,v 1.11
sys/netipsec/ipsec.h,v 1.7
sys/netipsec/key.c,v 1.11
share/man/man4/tcp.4,v 1.16
lib/libipsec/pfkey.c,v 1.20
lib/libipsec/pfkey_dump.c,v 1.17
lib/libipsec/policy_token.l,v 1.8
sbin/setkey/parse.y,v 1.14
sbin/setkey/setkey.8,v 1.27
sbin/setkey/token.l,v 1.15

Note that the preceding two revisions to tcp.4 will be
required to cleanly apply this diff.
 1.25  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.24  01-Apr-2003  dogcow branches: 1.24.2;
bring into conformance with RFC 3514
 1.23  05-Mar-2002  itojun bring in latest ALTQ from kjc. ALTQify some of the drivers.
 1.22  24-Oct-2001  itojun it may fix PR14124.
 1.21  02-May-2000  sommerfeld branches: 1.21.6; 1.21.8; 1.21.12;
One more __attribute__((__packed__)) to dissuade egcs from making
unwarranted asumptions about the structure's alignment.
 1.20  20-Nov-1999  thorpej Add the `packed' attribute to structures which describe wire protocol data.
 1.19  01-Jul-1999  itojun branches: 1.19.2; 1.19.8;
IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.
 1.18  10-Feb-1998  perry branches: 1.18.8; 1.18.10; 1.18.12;
add/cleanup multiple inclusion protection.
 1.17  05-Jan-1998  thorpej Finishing merging 4.4BSD-Lite2 netinet. At this point, the only changes
left were SCCS IDs and Copyright dates.
 1.16  11-Dec-1996  mycroft Minor change to a comment.
 1.15  25-Oct-1996  thorpej Make length and offset fields unsigned. From Kevin M. Lahey <kml@nas.nasa.gov>
 1.14  21-Sep-1996  perry commit fix in pr 2772 -- the IP input code was assuming that the
reserved (must be zero) flag must necessarily be zero. We now define
an IP_RF (by analogy to IP_DF and IP_MF) and mask it out when necessary.
 1.13  14-Sep-1996  mrg move the packet filter hooks in to a saner location. while i'm here, rename
PACKET_FILTER to PFIL_HOOKS.
 1.12  12-Sep-1996  mrg forward decl. struct mbuf (for now).
 1.11  12-Sep-1996  explorer Move an #ifdef _KERNEL up above all the packet filter stuff. This
could very well break the packet filter stuff, but it will make things
like rcp.c compile, and rcp.c should not need to include sys/mbuf.h
to do so...
 1.10  06-Sep-1996  mrg add packet filter interface code. see pfil(9) for more details. you
need the PACKET_FILTER option to enable this code. currently, ipfilter
version 3.1.1-beta has been converted to use this new interface.
 1.9  15-May-1995  cgd branches: 1.9.6;
"routine" precedence has a value of 0.
 1.8  17-Apr-1995  cgd spacing cleaup. also, minor type mixup fixups.
 1.7  13-Apr-1995  cgd be a bit more careful and explicit with types. (basically a large no-op.)
 1.6  29-Jun-1994  cgd New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.5  13-May-1994  mycroft Update to 4.4-Lite networking code, with a few local changes.
 1.4  08-Jan-1994  mycroft Fix some inconsistent spacing; spaces at the end of lines, etc.
 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.3  05-Jan-1998  thorpej Import sys/netinet from 4.4BSD-Lite2 for reference purposes.
 1.1.1.2  05-Jan-1998  thorpej Import sys/netinet from 4.4BSD-Lite for reference purposes.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.2  11-Dec-1996  mycroft From trunk:
Ignore the reserved fragment flag when checking ip_off.
 1.9.6.1  10-Nov-1996  thorpej Update from trunk:
- Make ip_len and ip_off unsigned.
- Make sure we don't accept or transmit packets larger than the
maximim IP packet size.
This fixes the so-called `death ping' bug.

Sum of work from Bill Fenner <fenner@parc.xerox.com>,
Kevin Lahey <kml@nas.nasa.gov>, and myself.

Thanks to Curt Sampson, Jukka Marin, and Kevin Lahey for testing
this under NetBSD 1.2
 1.18.12.2  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.18.12.1  28-Jun-1999  itojun KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce. this may not compile
due to multiple reasons.
 1.18.10.1  01-Jul-1999  thorpej Sync w/ -current.
 1.18.8.1  05-May-2000  cgd Pull up revisions 1.20-1.21 (requested by sommerfeld):
Add "__attribute__((__packed__))" to structures used to describe
on-the-wire data, to prevent egcs from making unwarranted assumptions
about the alignment of these structures.
 1.19.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.21.12.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.21.8.2  16-Mar-2002  jdolecek Catch up with -current.
 1.21.8.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.21.6.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.21.6.1  14-Nov-2001  nathanw Catch up to -current.
 1.24.2.4  11-Dec-2005  christos Sync with head.
 1.24.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.24.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.24.2.1  03-Aug-2004  skrll Sync with HEAD
 1.26.12.3  21-Jan-2008  yamt sync with head
 1.26.12.2  30-Dec-2006  yamt sync with head.
 1.26.12.1  21-Jun-2006  yamt sync with head.
 1.27.8.1  14-Sep-2006  yamt sync with head.
 1.27.4.1  09-Sep-2006  rpaulo sync with head
 1.28.4.1  18-Dec-2006  yamt sync with head.
 1.28.2.1  12-Jan-2007  ad Sync with head.
 1.29.32.1  02-Jan-2008  bouyer Sync with HEAD
 1.29.28.1  26-Dec-2007  ad Sync with head.
 1.29.26.1  18-Feb-2008  mjf Sync with HEAD.
 1.29.20.1  09-Jan-2008  matt sync with HEAD
 1.32.14.1  17-Aug-2017  martin Pull up following revision(s) (requested by mrg in ticket #721):
include/resolv.h: revision 1.40
sys/netinet/ip.h: revision 1.33-1.34
fix typo
make this standalone, like every others (except OpenBSD)
add <netinet/in.h> because it is needed for sockaddr_in.
 1.32.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.8.1  28-Nov-2012  riz Pull up following revision(s) (requested by christos in ticket #721):
include/resolv.h: revision 1.40
sys/netinet/ip.h: revision 1.33
sys/netinet/ip.h: revision 1.34
fix typo
make this standalone, like every others (except OpenBSD)
add <netinet/in.h> because it is needed for sockaddr_in.
 1.32.2.1  16-Jan-2013  yamt sync with (a bit old) head
 1.35.2.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed