Commit Graph

115 Commits

Author SHA1 Message Date
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
christos 27c51b847a Make this compile again. Use ALIGNED_POINTER to determine if we need to
align, taking a hint from the comment:
    "the following code is not needed on a vax"
2006-04-23 00:13:19 +00:00
christos c591e825ed Coverity CID 1161: Protect against NULL deref or mbuf, by returning EINVAL. 2006-04-14 23:31:33 +00:00
christos 6d29e52f5a Coverity CID 1160: Fix obvious bug introduced with m_len... 2006-04-14 23:25:46 +00:00
rpaulo e59b73f458 On ns_err_input(), if the message type is TOO_BIG, we should call spp
or idp control input routines, not drop it.
Should fix CID 742.
2006-04-06 18:46:32 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
elad 58e7332bdf Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
2005-12-11 00:02:28 +00:00
rpaulo 49cb186c8e Implement the net.ns.spp sysctl subtree with only two children:
net.ns.spp.debug and net.ns.spp.debx. They will be used by trsp(8).
2005-09-06 02:52:38 +00:00
rpaulo 4ea601be16 Rename the 'wakeup' variable to 'reaswakeup' so that it doesn't colide
with the wakeup() function defined in sys/proc.h.
2005-09-06 02:44:55 +00:00
perry bcfcddbac1 nuke trailing whitespace 2005-02-26 22:31:44 +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
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
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
matt af6ed48cd8 Remove non-__STDC__ code. 2004-04-21 02:33:28 +00:00
matt 7836b0179d Don't declare prurequests or tcpstates. Let them come in from the
appropriate include files.
2004-04-21 02:30:56 +00:00
matt b0e01dddf8 ANSI'fy and de-__P 2004-04-19 00:10:48 +00:00
matt 4531ee830e Use M_ZERO as appropriate. 2004-04-18 19:14:42 +00:00
wiz 73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
itojun 4b26585bd4 s/in_ifaddr/in_ifaddrhead/. not really tested 2003-11-14 15:04:48 +00:00
itojun d9ff160bd7 when dropping M_PKTHDR, need to free m_tag chain. 2003-10-03 20:57:29 +00:00
christos 36b4e0b6e7 Fix off-by-one in PRC_NCMDS check. From FreeBSD via OpenBSD 2003-09-30 00:01:18 +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
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
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
itojun 26d2e41250 fix mistake in rev 1.30; needed to subtract ip header len 2003-06-26 21:59:42 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
simonb c7c3561c3d Move the declaration and setting of the "param" variable inside
#ifdef NS_ERRPRINTFS blocks.
2003-01-20 02:12:21 +00:00
simonb 70ed5e58b0 Remove variable that is only assigned too but not referenced. 2003-01-20 01:38:43 +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
thorpej a2a9c5391d Move netns config defns to netns/files.netns. 2002-10-10 23:04:33 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
itojun c00fa8dfd9 avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACE
optimization made last year.  should solve PR 17867 and 10195.

IP_HDRINCL behavior of raw ip socket is kept unchanged.  we may want to
provide IP_HDRINCL variant that does not swap endian.
2002-08-14 00:23:27 +00:00
itojun 514ea24105 audit bitmask test mistake (s/&&/&/). from openbsd 2002-08-08 15:08:55 +00:00
matt 13e5187f62 More commons eliminated. 2002-05-12 20:23:49 +00:00
matt 2364682526 Eliminate use of commons. 2002-05-12 19:09:12 +00:00
lukem 4f2ad95259 add RCSIDs 2001-11-13 00:56:55 +00:00
thorpej e45efd967f Deprecate the "m_act" alias of "m_nextpkt" (m_act is a historical
name), and just use m_nextpkt everywhere.
2001-10-18 20:17:24 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
abs 8e18beaa86 Use SPPDEBUG not TCPDEBUG here 2001-07-08 16:14:22 +00:00
jdolecek 934f52d4ff Sprinkle couple of cosmetic changes - use 'extern' in headers, make
some stuff static, const as appropriate, use static TAILQ_HEAD_INITIALIZER()
instead TAILQ_INIT() call.
2001-06-19 07:37:16 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
thorpej 20fe4e2d96 Add a protosw flag, PR_ABRTACPTDIS (Abort on Accept of Disconnected
Socket), and add it to the protocols that use that behavior (all
PR_LISTEN protocols except for PF_LOCAL stream sockets).
2001-03-21 19:22:27 +00:00
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
chs 545ce9be22 remove unused macro. 2000-04-10 02:19:29 +00:00
augustss 8529438fe6 Remove register declarations. 2000-03-30 12:51:13 +00:00