gmcgarry
4bb1ed1308
ioctl commands are unsigned long. ABI change to mrt6_ioctl() will affect 64-bit platforms.
2008-06-24 10:35:14 +00:00
dyoung
132e9baecf
Cosmetic: join lines.
2008-05-22 22:25:05 +00:00
dyoung
a8ad22e5d9
Don't cast to void * unnecessarily.
2008-05-22 01:06:39 +00:00
dyoung
e47d9e31bc
Cosmetic: don't cast NULL unnecessarily.
2008-05-22 01:05:38 +00:00
drochner
0a6f1919c0
protocol "drain" functions can be called in interrupt context, so
...
don't acquire softnet_lock
approved by ad
2008-05-21 17:08:07 +00:00
dyoung
9e7ef562d2
Simplify RT_DPRINTF() calls.
2008-05-15 01:33:28 +00:00
dyoung
ec34b3825c
Change bzero() to memset(), non-overlapping bcopy() to memcpy().
...
Remove unnecessary casts to struct route *.
2008-05-13 17:53:52 +00:00
dyoung
323b0fda0c
Compare route with NULL instead of testing truth. Where applicable,
...
s/0/NULL/. s/u_char/uint8_t/. Remove superfluous curly braces.
2008-05-11 20:19:44 +00:00
bouyer
993c458b34
Sync with ipv4 icmp_input(): make sure the mbuf is writable and
...
contains the entire icmp message befre calling icmp6_input().
should fix "panic: mbuf too short for IPv6 header" seen by several peoples.
2008-05-07 11:28:37 +00:00
ad
2bbb14eaa4
Back out previous. It broke the build.
2008-05-05 13:41:29 +00:00
ad
b407147f14
Move zlib out of net/ and into kern/. It would probably be better to use
...
the reachover Makefiles and libz, but this is already here and it works.
2008-05-04 23:07:09 +00:00
thorpej
b129a80c20
Simplify the interface to netstat_sysctl() and allocate space for
...
the collated counters using kmem_alloc().
PR kern/38577
2008-05-04 07:22:14 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
yamt
fb7535aecb
udp6_init: fix a comment.
2008-04-28 15:01:39 +00:00
ad
15e29e981b
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@.
2008-04-24 11:38:36 +00:00
thorpej
caf49ea572
Make IPSEC and FAST_IPSEC stats per-cpu. Use <net/net_stats.h> and
...
netstat_sysctl().
2008-04-23 06:09:04 +00:00
thorpej
33326077b1
Use <net/net_stats.h> / netstat_sysctl().
2008-04-23 05:26:50 +00:00
thorpej
0e499be12d
Make pim6 stats per-cpu.
2008-04-15 05:40:15 +00:00
thorpej
27c227fe6e
Explicitly include <sys/percpu.h>.
2008-04-15 05:23:33 +00:00
thorpej
16497cdf28
Make raw6 stats per-cpu.
2008-04-15 05:13:37 +00:00
thorpej
c2da059bc6
Make udp6 stats per-cpu.
2008-04-15 04:43:25 +00:00
thorpej
0dd41b37de
Make ip6 and icmp6 stats per-cpu.
2008-04-15 03:57:04 +00:00
thorpej
7ff8d08aae
Make IP, TCP, UDP, and ICMP statistics per-CPU. The stats are collated
...
when the user requests them via sysctl.
2008-04-12 05:58:22 +00:00
thorpej
3f466bce48
Change IPv6 stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 23:37:43 +00:00
thorpej
aa8724ff7b
Change ICMP6 stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old icmp6stat structure; old netstat
binaries will continue to work properly.
2008-04-08 15:04:35 +00:00
thorpej
88d65e9212
Change IP stats from a structure to an array of uint64_t's.
...
Note: This is ABI-compatible with the old ipstat structure; old netstat
binaries will continue to work properly.
2008-04-07 06:31:27 +00:00
xtraeme
cc926059e9
Make this build again after thorpej's changes to udpstat.
2008-04-06 23:36:43 +00:00
dyoung
4957795396
Use ip6_clearpktopts() to destroy the IPv6 PCB's in6p_outputopts,
...
so that there's no chance of either leaking memory, or leaving
dangling pointers to a route cache.
2008-03-20 20:32:00 +00:00
dyoung
ff82b311dd
No code ever sets struct ip6_pktopts member ip6po_m, so get rid of
...
it.
2008-03-19 08:10:18 +00:00
yamt
b714b9dd42
in6_cksum: use IN6_IS_SCOPE_EMBEDDABLE.
2008-03-10 22:34:40 +00:00
yamt
15b5bc3e70
in6_cksum: avoid using -> operator and use (char *) arithmetics instead.
...
reviewed by Joerg Sonnenberger. he pointed out that the original code
was written that way so that the compiler will explicitly not assume that
the alignment of the data is correct. although i don't know if it really
matters or not, being safer is not a problem.
2008-03-10 22:29:13 +00:00
yamt
6ff0e4eec3
in6_cksum: constify
2008-03-09 22:05:50 +00:00
matt
58bb9f6508
Convert to ansi definitions from old-style definitons.
...
Remember that func() is not ansi, func(void) is.
2008-02-27 19:54:27 +00:00
matt
c939552209
Convert to ansi definitions from old-style definitons.
...
Remember that func() is not ansi, func(void) is.
2008-02-27 19:40:56 +00:00
joerg
862a285bde
Explicitly predict panic conditions as false.
2008-02-12 13:05:55 +00:00
joerg
db0043926a
Provide a simplified inplace version of in6_cksum.
...
Tested by is@ on amd64.
2008-02-12 13:02:24 +00:00
bjs
5fb9f423de
ip_newid() -> ip_newid(NULL) due to Matt Thomas' commit some hours ago;
...
The function now requires a pointer (to struct in_ifaddr) as an argument,
i.e. it is no longer ip_newid(void).
Fixes ipsec+inet6 kernel builds.
2008-02-06 07:42:43 +00:00
joerg
6e869e402d
Refactor in_cksum/in4_cksum/in6_cksum implementations:
...
- All three functions are included in the kernel by default.
They call a backend function cpu_in_cksum after possibly
computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
The default implementation is moderate fast on most platforms
and provides a 32bit accumulator with 16bit addends for L32 platforms
and a 64bit accumulator with 32bit addends for L64 platforms.
It handles edge cases like very large mbuf chains (could happen with
native IPv6 in the future) and provides a good base for new native
implementations.
- Modify i386 and amd64 assembly to use the new interface.
This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00
dyoung
19dd9ed4a7
Use rtcache_validate() instead of rtcache_getrt(). Shorten staircase
...
in in6_losing().
2008-01-14 04:16:45 +00:00
dyoung
6a0b0c88d2
Use rtcache_lookup() instead of rtcache_lookup() + rtcache_getrt().
2008-01-14 04:14:37 +00:00
dyoung
1386ee4adf
Good-bye, rtcache_check(). Call both rtcache_validate() and
...
rtcache_update(,1) instead of rtcache_check().
2008-01-12 02:58:58 +00:00
dyoung
45485bd0b7
Save some rtcache_getrt() calls.
2008-01-10 08:06:11 +00:00
dyoung
1c6cf449e1
Constify.
2008-01-04 23:35:00 +00:00
dyoung
a4455600d4
Replace rtcache_down() with rtcache_validate() and update rtcache_down()
...
uses.
2008-01-04 23:26:44 +00:00
perry
b6a2ef7569
Convert many of the uses of __attribute__ to equivalent
...
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
dyoung
72fa642a86
Poison struct route->ro_rt uses in the kernel by changing the name
...
to _ro_rt. Use rtcache_getrt() to access a route cache's struct
rtentry *.
Introduce struct ifnet->if_dl that always points at the interface
identifier/link-layer address. Make code that treated the first
ifaddr on struct ifnet->if_addrlist as the interface address use
if_dl, instead.
Remove stale debugging code from net/route.c. Move the rtflush()
code into rtcache_clear() and delete rtflush(). Delete rtalloc(),
because nothing uses it any more.
Make ND6_HINT an inline, lowercase subroutine, nd6_hint.
I've done my best to convert IP Filter, the ISO stack, and the
AppleTalk stack to rtcache_getrt(). They compile, but I have not
tested them. I have given the changes to PF, GRE, IPv4 and IPv6
stacks a lot of exercise.
2007-12-20 19:53:29 +00:00
lukem
456279df8f
use __KERNEL_RCSID()
2007-12-11 12:29:11 +00:00
degroote
939a0dbd0a
Kill _IP_VHL ifdef (from netinet/ip.h history, it has never been used in NetBSD so ...)
2007-12-09 18:27:39 +00:00
dyoung
b579a81e92
Use ifa_insert(), ifa_remove().
2007-12-06 00:28:36 +00:00
dyoung
b8f324fabd
Extract common code, creating a subroutine if_purgeaddrs(ifp,
...
family, purgeaddr) which applies function `purgeaddr' to each
address on `ifp' belonging to `family'.
2007-12-05 23:47:17 +00:00