Commit Graph

206 Commits

Author SHA1 Message Date
christos 5cd6dae082 Coverity CID 1157: Move deref after check. 2006-04-15 00:03:56 +00:00
christos 9202171a37 Coverity CID 1158: Add a KASSERT to appease coverity. 2006-04-15 00:01:50 +00:00
christos 4364818c59 Coverity CID 1159: Prevent NULL deref. 2006-04-14 23:56:20 +00:00
christos 2b7ed695ce Coverity CID 860: Prevent NULL deref. 2006-04-14 23:53:53 +00:00
christos 5994b27932 compile with no options INET 2005-12-28 09:18:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
elad 0db637f40e Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
2005-12-11 00:01:36 +00:00
dsl d12c019f70 For some peverse reason the ISO code has to have the same template for
it's iso_pcbconnect() as the IP stack.
2005-11-16 20:44:19 +00:00
christos 3ebd13b60c - use memcpy instead of bcopy.
- constify.
2005-05-31 01:37:06 +00:00
christos ee1e2f8883 deal with const cast-aways. 2005-05-30 22:14:52 +00:00
christos d276a994d2 - sprinkle const
- remove unnecessary casts
- change some b*() to mem*()
2005-05-29 21:27:45 +00:00
christos 7cdea212c0 No 0x in front of %p... 2005-05-22 15:54:45 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
perry bcfcddbac1 nuke trailing whitespace 2005-02-26 22:31:44 +00:00
martin 7719036ed6 Avoid use of freed memory. Reported by Ted Unangst on tech-kern. 2005-02-24 08:29:23 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
matt d341be30f4 Change initialzie of domains to use link sets. Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.
2005-01-23 18:41:56 +00:00
peter 396b87b8c2 Convert lo(4) to a clonable device.
This also removes the loif array and changes all code to use the new
lo0ifp pointer which points to the lo0 ifnet structure.

Approved by christos.
2004-12-04 16:10:25 +00:00
matt 11ccf29a76 remove #else clause of #if __STDC__ 2004-04-25 21:13:13 +00:00
matt e50668c7fa Constify protosw arrays. This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.
2004-04-22 01:01:40 +00:00
matt fd2a977729 Add #include "opt_iso.h" if not already there.
Make these compile cleanly when TPCONS is defined.
2004-04-21 23:19:49 +00:00
matt 961e6cb2e5 Add multiple inclusion protection 2004-04-21 23:18:10 +00:00
matt 0b5d1218b5 Add TPCONS option 2004-04-21 23:16:53 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
matt e3b919c754 Constify if.c radix.c and route.c (and fix related fallout). 2004-04-21 04:17:28 +00:00
matt 6a50a009d1 De-__P the header files (and reorder the includes of some C files). 2004-04-20 02:13:26 +00:00
matt a87928f350 ANSI'fy, de-__P(), and constify some read-only data. 2004-04-19 05:16:45 +00:00
matt 591f26e81f Use M_ZERO when appropriate 2004-04-18 18:54:03 +00:00
christos 90e1f431ca adjust to the sbreserve prototype change. 2004-04-17 15:18:53 +00:00
wiz e3fc4b66c3 Spell the plural of suffix "suffixes", not "suffices".
Inspired by PR 24400 by Todd Vierling.
2004-02-13 17:56:17 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
simonb a2facef339 Remove some assigned-to but otherwise unused variables. 2003-10-30 01:43:08 +00:00
christos 36b4e0b6e7 Fix off-by-one in PRC_NCMDS check. From FreeBSD via OpenBSD 2003-09-30 00:01:18 +00:00
wiz cff5e477ad Process has only one c. From miod@openbsd. 2003-09-26 22:23:58 +00:00
christos 51a4dadbfe adjust for SA_SIGINFO changes 2003-09-06 23:56:27 +00:00
itojun 82eb4ce914 change the additional arg to be passed to ip{,6}_output to struct socket *.
this fixes KAME policy lookup which was broken by the previous commit.
2003-08-22 21:53:01 +00:00
jonathan 28b5f5dfab (fast-ipsec): Add hooks to pass IPv4 IPsec traffic into fast-ipsec, if
configured with ``options FAST_IPSEC''.  Kernels with KAME IPsec or
with no IPsec should work as before.

All calls to ip_output() now always pass an additional compulsory
argument: the inpcb associated with the packet being sent,
or 0 if no inpcb is available.

Fast-ipsec tested with ICMP or UDP over ESP. TCP doesn't work, yet.
2003-08-15 03:42:00 +00:00
itojun 9ec3d05b38 remove weird #define MNULL/PCBNULL (NULL should do it just fine) 2003-08-11 15:17:29 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
lukem 9391907df1 add missing __RCSID() 2003-07-14 15:40:37 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
is 04d8fd7e2c Keep pkthdr when prepending new mbuf in front of a given chain.
This keeps us from panic()ing in the interface output routine.
2003-05-25 08:47:54 +00:00
fvdl 00abb49877 if 0 out some redundant asserts. 2003-04-17 12:52:21 +00:00
thorpej f4a068d5c2 Use PAGE_SIZE rather than NBPG. 2003-04-01 01:43:29 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
jdolecek 932e9f001c deobfuscify PRU_CONNECT a bit - split isop_sfaddr and rcb_faddr pointer
assignment to separate statements (and lines), add some comments
2003-02-08 11:11:11 +00:00
thorpej 74e0a051d0 Delete unused variable (result of callout changes). kern/20194. 2003-02-04 07:19:56 +00:00
thorpej 1b84adbe5f New callout implementation. This is based on callwheel implementation
done by Artur Grabowski and Thomas Nordin for OpenBSD, which is more
efficient in several ways than the callwheel implementation that it is
replacing.  It has been adapted to our pre-existing callout API, and
also provides the slightly more efficient (and much more intuitive)
API (adapted to the callout_*() naming scheme) that the OpenBSD version
provides.

Among other things, this shaves a bunch of cycles off rescheduling-in-
the-future a callout which is already scheduled, which the common case
for TCP timers (notably REXMT and KEEP).

The API has been simplified a bit, as well.  The (very confusing to
a good many people) "ACTIVE" state for callouts has gone away.  There
is now only "PENDING" (scheduled to fire in the future) and "EXPIRED"
(has fired, and the function called).

Kernel version bump not done; we'll ride the 1.6N bump that happened
with the malloc(9) change.
2003-02-04 01:21:03 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00