Commit Graph

1152 Commits

Author SHA1 Message Date
itojun 8466cf281c consistency; use tokenbroadcastaddr, not ether*. 2003-05-01 02:34:20 +00:00
bjh21 ca2c1040cf Expose IF_NAMESIZE for POSIX and X/Open applications. 2003-04-30 18:50:26 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
bjh21 c4987984da Accept standard IEEE 802.3 names for Ethernet medium types.
Suggested by Christos, IIRC.
2003-04-23 23:16:43 +00:00
salo f35804411a depreceated->deprecated 2003-04-17 22:55:29 +00:00
kml 0ad9e0dccc Host AP power saving support. The Host AP notices that the power
saving bit is set in incoming frames from a station, and buffers the
outgoing frames for the station until they are polled for.  This
requires support in the driver to set a bit in the TIM bitmap sent
during 802.11 beacons.

So far, support for power saving in Host AP mode is only available
for the PRISM2 chipset.
2003-04-08 04:31:23 +00:00
christos e950c1ac8f PR/20844: Iain Hibbert: PPP Compressors cannot be loaded as LKM 2003-03-27 17:50:06 +00:00
bouyer 013798abf2 Make promiscous mode work on vlans: introduce a new link-layer m_flag
M_PROMISC. In ether_input(), flag packets comming from an interface in
promiscous mode which are not for us M_PROMISC instead of droping them.
Drop M_PROMISC packets which are not passed to vlan_input(). M_PROMISC
packets passed to vlan_input() will be looped back to ether_input()
the M_PROMISC flag will be handled appropriately.
Clear M_PROMISC before giving the packet to bridge, as bridge has its own
checks for local MAC addresses.
This also makes bridges on vlan working.
2003-03-25 13:29:39 +00:00
bouyer 4a3c894eef Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will keep
  all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path cost of
an interface. Display the interface path cost with the others STP parameters.
2003-03-19 10:34:33 +00:00
matt e2765c0933 Allow a machine-dependent definition of schednetisr. 2003-03-15 07:51:06 +00:00
dsl 30630417a8 Validate pgid arg to TIOCSPGRP 2003-03-13 10:24:38 +00:00
dsl 53d2320e25 Check that the process/process group id passed to TIOCSPRP is in the session
of the current process.
2003-03-13 10:18:35 +00:00
christos 35f9126434 Fix the fallout from potr malloc changes 2003-03-05 22:56:46 +00:00
aymeric 95d6206a6c ignore multicast PPPoE packets ASAP.
This improves performance a lot on slow machines behind a cable modem.
Protect it with PPPOE_SERVER as a reminder that this will have to be changed
if we add PPPoE server code in the kernel one day.
2003-03-02 10:50:14 +00:00
martin a3248903e4 Backout previous, I'm on crack obviously. 2003-03-01 15:50:15 +00:00
martin b15e7fee31 Initialize sc to NULL, it could be used uninitialized otherwise when
searching for our sc by host unique tag.
2003-03-01 15:24:36 +00:00
aymeric 038e238665 when looking up a Host-Uniq tag, do not consider NULL as a valid
(struct pppoe_softc *). Although we do not generate such tags, other hosts
could and some actually do.
2003-03-01 15:10:13 +00:00
perseant eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
matt 70e05a774b Fix tpyo. 2003-02-26 07:47:42 +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
dyoung 595c6d88b2 Add support for Prism monitor mode. From Kevin Lahey
<kml@patheticgeek.net>.

This patch does NOT add monitor mode support for the Lucent radios.

awi(4) was only modified for compatibility with the new mediaopt.
It does NOT support monitor mode.

Tested by Kevin, Daniel Carosone, and I.
2003-02-25 01:57:35 +00:00
simonb ac161ae918 Remove assigned-to but not used variable. 2003-02-23 04:20:06 +00:00
perseant 6b857c229e Add ipf packet-filtering option to if_bridge. The option is controlled at
compile-time by BRIDGE_IPF, and at runtime by brconfig with the {ipf,-ipf}
option on a per-bridge basis.

As a side-effect, add PFIL_HOOKS processing to if_bridge.
2003-02-15 00:46:30 +00:00
martin fd690f8523 PADT is always send with ethertype PPPOE_DISCOVERY, no matter if we
have reached session state or not.

Fixes PR kern/20203 by Shoichi Miyake.
2003-02-04 20:52:23 +00:00
thorpej 882dec6ba3 Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.
2003-02-03 23:50:59 +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
tron 0cbe3d790b Use MRU negotiated with remote system as MTU. This fixes PR kern/18850
by Curt Sampson.
2003-01-28 15:36:38 +00:00
jmmv 190a36975b Fix typo: realy -> really. Okay'ed by wiz. 2003-01-22 11:47:05 +00:00
simonb f77e8353aa Remove a break after a goto. 2003-01-19 23:45:33 +00:00
simonb 221db74413 Remove variable that is only assigned too but not referenced. 2003-01-19 23:44:03 +00:00
simonb af85a1483e Fix code in #ifdef WICACHE block to use renamed constants and
struct members.
Remove a break after a return.
2003-01-19 23:17:21 +00:00
simonb 4d6d90e127 Remove variable that is only assigned too but not referenced. 2003-01-19 23:13:46 +00:00
wiz f585195db2 bandwidth, not bandwith. 2003-01-18 12:02:40 +00:00
itojun 40606ab8f2 switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation.  it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized.  from Joel Wilsson
2003-01-17 08:11:49 +00:00
jdolecek 384748874a Ethernet multicast entries are malloc'd M_IFMADDR, and thus should
be freed as M_IFMADDR too.
Fix supplied in PR kern/19037 by Sean Boudreau
2003-01-12 12:26:23 +00:00
martin 2e5336f7a8 Fix broken error handling in case M_PREPEND fails.
Noticed by Matthias Scheeler.
2003-01-07 20:02:10 +00:00
wiz 45ad5c9584 successful with only one l. 2003-01-06 12:46:05 +00:00
wiz 617b132aac Spell output with two ts. 2003-01-04 23:43:02 +00:00
kristerw 83b5a18c99 Restore the system priority level in case of errors.
OK:ed by martin.
2002-12-28 21:09:14 +00:00
martin 501da0e586 In do not call pppoe_abort_connect if we fail to send the initial PADI
packet - there is nothing to abort.
In pppoe_abort_connect rearange state handling slightly to avoid calls
to the PPP LCP state machine get into an infinite recursion.

This should fix the symptoms of PR kern/19500, but does not touch the
real cause for the lossage described there.
2002-12-25 11:54:33 +00:00
jdolecek 6973160773 count input/output bytes for tun device
Problem reported and patch provided in PR kern/19554 by Michael van Elst
2002-12-25 08:40:20 +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
christos f5ff34bbc6 si_ -> sel_ 2002-11-26 18:51:18 +00:00
thorpej d6f8cc841d Avoid strict-alias warnings. 2002-11-25 01:55:21 +00:00
scw fc3c6f554f Quell an uninitialised variable warning. 2002-11-24 11:38:51 +00:00
itojun e34d5a243d more pickier packet validation, based on
draft-savola-v6ops-6to4-security-00.txt.  sync w/kame
2002-11-17 19:29:31 +00:00
dyoung 1cfe0913f5 Fix typo: IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK becomes
IEEE80211_FC0_SUBTYPE_CF_ACK_CF_POLL. This is the name the IEEE
802.11 specification indicates.
2002-11-16 06:08:31 +00:00
chs 7d8622764c when there are multiple matches for the requested media, select the first
matching instance rather than the last one.  this restores the behaviour
in the multiple-match case to what it was when all the drivers only allowed
instance 0 (and in particular, makes autonegotiation of the on-board fxp
on my DK440LX board work again by default, which has two PHYs that both
advertise "auto").  as discussed on tech-net.
2002-11-12 16:54:45 +00:00
itojun 50a545a34b remove all entries in rt timer queue on ip_mtudisc change, instead of
destroying the queue.
2002-11-12 02:10:13 +00:00
itojun 96910acf99 add an argument to rt_timer_remove_all(), to specify if we need to call
timeout routine on removal.
2002-11-12 01:37:30 +00:00