Commit Graph

1279 Commits

Author SHA1 Message Date
matt
3a04cc5c7f Update my copyright to not include advertising clause. 2004-03-22 18:02:12 +00:00
keihan
2ece851d2e Add 10GBASE-LR to IFM_10G_LR. 2004-03-10 14:42:10 +00:00
tron
a188d6072b Don't leak memory if a copyin fails. 2004-03-01 13:54:02 +00:00
ragge
9a3ec25f87 Add media type 10GbaseLR. Change ifmb_baudrate and ifmedia_baudrate()
to u_quad_t instead of int (common speed today exceeds 2Gbit).
2004-02-19 11:58:30 +00:00
jdc
99807188f8 Use m_copydata(), m_adj() and M_PREPEND() to manipulate mbuf's in
bridge_ipf().  Fixes kernel memory corruption that occured when using
m_split() and m_cat().
Idea from OpenBSD.
2004-01-31 20:11:13 +00:00
drochner
ce20d083dc make it compile with !(INET || INET6) 2004-01-29 16:33:14 +00:00
jonathan
638afbfe26 Make bpf_maxbufsize writable via sysctl, as written by Andrew Brown. 2004-01-22 00:32:41 +00:00
jonathan
9369f19096 Fix an Emacs finger-glitch (missing semicolon#). 2004-01-21 23:59:12 +00:00
jonathan
b0a71dcaf5 Update bpf buffer parameters, as per recent discussion on tech-net.
Increase the default bpf buffer size used by naive apps that don't do
BIOCSBLEN, from 8k to 32k.  The former value of 8192 is too small to
hold a normal jumbo Ethernet frame (circa 9k), 16k is a little small
for Large-jumbo (~16k) frames supported by newer gigabit
Ethernet/10Gbe, so (somewhat arbitrarily) increase the default to 32k.

Increase the upper limit to which BIOSBLEN can raise bpf buffer-size
drastically, to 1 Mbyte.  State-of-the-art for packet capture circa
1999 was around 256k; savvy NetBSD developers now use 1 Mbyte.
Note that libpcap has been updated to do binary-search on BIOCSBLEN
values up to 1 Mbyte.

Work is in progress to make both values sysctl'able. Source comments
note that consensus on tech-net is that we should find some heuristic
to set the boot-time default values dynamically, based on system memory.
2004-01-21 22:15:16 +00:00
atatat
b81e36a907 Remove redundant prototypes 2004-01-19 16:12:51 +00:00
atatat
b1c111a62a Sysctl functions called for "generic" nodes should forward "query"
requests (where possible), rather than returning errors.
2003-12-28 22:36:37 +00:00
martin
d59fb7b8a3 Add a new ioctl SPPPGETSTATUSNCP to query the PPP phase and check wether
any NCP is UP.
2003-12-26 23:39:23 +00:00
itojun
235e090dea gi_len is ip_len, so it has to be network byteorder. markus friedl 2003-12-11 00:22:29 +00:00
itojun
aa8a6718f0 use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULL
to check if interface exists, as (1) if_index has different meaning
(2) ifindex2ifnet could become NULL when interface gets destroyed,
since when we have introduced dynamically-created interfaces.  from kame
2003-12-10 11:46:33 +00:00
augustss
e58307e458 Fix spelling mistake in a comment. 2003-12-09 19:33:22 +00:00
scw
a9760a89e4 To cater for VLAN-aware layer 2 ethernet switches which may need to strip
the tag before forwarding the packet, make sure the packet+tag is at least
68 bytes long.

This is necessary because our parent will only pad to 64 bytes (ETHER_MIN_LEN)
and some switches will not pad by themselves after deleting a tag.
2003-12-05 19:35:43 +00:00
atatat
13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
keihan
6979203302 s/netbsd.org/NetBSD.org/g 2003-11-28 08:56:48 +00:00
dyoung
23d8f48692 Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
2003-11-16 09:02:42 +00:00
jonathan
fa24e6f3f8 Add m_tag_delete_nonpesrsistent(), for deleting all packet tags on
mbuf chains which are recycled (e.g., ICMP reflection, loopback
interface).  A consensus was reached that such recycled packets should
behave (more-or-less) the same way if a new chain had been allocated
and the contents copied to that chain.

Some packet tags may in future be marked as "persistent" (e.g., for
mandatory access controls) and should persist across such deletion.
NetBSD as yet hos no persistent tags, so m_tag_delete_nonpersistent()
just deletes all tags. This should not be relied upon.
2003-11-13 01:48:12 +00:00
cl
e6bcfbd5e0 catch up with in_ifaddr -> in_ifaddrhead rename 2003-11-12 13:40:16 +00:00
drochner
14332cf998 fix interface address list traversal in if_detach():
The code was assuming that interface addresses are removed one-by-one.
With IPv6 and multicasts, removal of one address can remove other
addresses as side effect, which caused accesses of free()d memory.
2003-11-11 20:33:46 +00:00
jonathan
88ba77e705 Make per-protocol network input queue stats visible to userland via
sysctl. Add a protocol-independent sysctl handler to show the per-protocol
"struct ifq' statistics. Add IP(v4) specific call to the handler.
Other protocols can show their per-protocol input statistics by
allocating a sysclt node and calling sysctl_ifq() with their own struct ifq *.

As posted to tech-kern plus improvements/cleanup suggested by Andrew Brown.
2003-11-10 20:03:29 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
briggs
953bcec0ab ifmedia_set() should not panic, nor can it really fail. So if there is
some problem setting the media to the requested value (usually IFM_AUTO),
we now force the media selection to IFM_NONE.
This addresses PR/14029 ``panic("ifmedia_set") a little too brutal''
and may address to some degree PR/19504 and PR/23341.
2003-11-03 14:43:32 +00:00
simonb
a2facef339 Remove some assigned-to but otherwise unused variables. 2003-10-30 01:43:08 +00:00
mycroft
8785679414 Mark this initializer in the canonical way so it can be found later. 2003-10-28 22:31:12 +00:00
mycroft
a72eae7293 Fix previous differently. 2003-10-28 20:21:44 +00:00
mycroft
8655a8eb83 Also, if we're going to bail, we should free the memory we just allocated... 2003-10-28 20:16:28 +00:00
mycroft
52beeea9f1 Previous patch created a dead break. 2003-10-28 20:15:19 +00:00
mycroft
a071a627d4 Return a sensible error code in the previous. 2003-10-28 20:13:23 +00:00
christos
82653d230d Fix uninitialized variable warnings.` 2003-10-26 19:09:44 +00:00
christos
125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
dyoung
5cea02e6fe Complete replacement of the old 802.11 layer with the new. 2003-10-13 08:34:15 +00:00
dyoung
690ab87058 Use new 802.11 header files. 2003-10-13 08:02:02 +00:00
dyoung
dd813020b9 Add constants and strings for 802.11 radios with OFDM PHY (802.11a,
802.11g).

Add constants and strings for multi-mode devices (a/b/g).

From FreeBSD/Sam Leffler.
2003-10-13 05:06:44 +00:00
itojun
98d5598feb when dropping M_PKTHDR, need to free m_tag associated with it. 2003-10-03 20:56:11 +00:00
oki
59c580bc38 Correct debug message, mine is myauth, not hisauth. 2003-10-03 10:29:05 +00:00
itojun
2cc4a6b1a7 need to use m_freem(), not m_free(). from iij seil team 2003-10-02 07:13:57 +00:00
itojun
269a200e21 minor KNF 2003-10-02 01:27:20 +00:00
itojun
ae7fc0a7d4 fix out-of-bounds access to ifindex2ifnet[]. found by iij seil team. 2003-10-01 04:22:33 +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
cl
c49d4a7e55 pass signo to fownsignal #ifdef ALTQ 2003-09-22 20:49:39 +00:00
christos
6edc0e184e - pass signo to fownsignal [ok by jd]
- make urg signal handling use fownsignal
- remove out of band detection in sowakeup
2003-09-22 12:59:55 +00:00
jdolecek
1fda9a87e7 kill unused variable in #ifdef ALTQ part, to make this compile
with ALTQ configured in
2003-09-22 03:29:34 +00:00
jdolecek
7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
martin
392a465bb8 Tell copyinstr about the real buffer size (not one byte to few). Add more
error checking. Noticed by Quentin Garnier.
2003-09-16 20:59:04 +00:00
jdc
3fc943e207 Adapt to account for bridge_enqueue()'s extra parameter. 2003-09-16 17:39:12 +00:00
jdc
7454db32b4 Add filter/no filter flag parameter to bridge_enqueue(). 2003-09-16 17:38:24 +00:00