Commit Graph

41 Commits

Author SHA1 Message Date
plunky fb76dbd4fc change declaration for protosw.h const symbolic strings to static, so that
they can be used by more than one source file without causing duplicate
definitions.
2007-03-31 18:17:13 +00:00
plunky f21bb76883 be more explicit and consistent in use of KASSERT with pointers,
test against NULL
2007-03-30 20:47:02 +00:00
plunky 3d47fad4b8 disallow sending command packets of unexpected length 2007-03-21 06:22:07 +00:00
plunky ac2ed142c1 discard inbound packets if the channel is not open 2007-03-20 20:25:24 +00:00
plunky 298d20388c remove C++ style comments 2007-03-15 19:47:50 +00:00
plunky f42c04d48d clean up the mess that is the channel state, now
lc_state is channel state
	lc_flags is channel flags
2007-03-12 20:34:46 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
plunky 3617998677 add validity check for inbound packets 2007-03-07 20:44:52 +00:00
plunky 5bfc159132 don't reset MTU when invalid value is given 2007-03-06 19:04:31 +00:00
plunky 162ec75621 return ENOPROTOOPT when protocol options are not known 2007-03-05 19:11:54 +00:00
plunky 070f41d51b whitespace 2007-03-05 19:05:57 +00:00
plunky 78a5a02263 add extra validity check for inbound requests 2007-03-05 19:04:46 +00:00
plunky 904dc39982 remove extraneous prototype 2007-03-05 19:02:47 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
kiyohara 10abd6f2e2 Supprot Bluetooth HCI UART (H4) driver and daemon. 2007-02-20 16:53:20 +00:00
elad b2eb9a5389 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 19:07:03 +00:00
alc 86e5639788 CID-3819: `n' is always NULL here, remove dead code. 2006-12-26 00:00:22 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
dyoung c308b1c661 Here are various changes designed to protect against bad IPv4
routing caused by stale route caches (struct route).  Route caches
are sprinkled throughout PCBs, the IP fast-forwarding table, and
IP tunnel interfaces (gre, gif, stf).

Stale IPv6 and ISO route caches will be treated by separate patches.

Thank you to Christoph Badura for suggesting the general approach
to invalidating route caches that I take here.

Here are the details:

Add hooks to struct domain for tracking and for invalidating each
domain's route caches: dom_rtcache, dom_rtflush, and dom_rtflushall.

Introduce helper subroutines, rtflush(ro) for invalidating a route
cache, rtflushall(family) for invalidating all route caches in a
routing domain, and rtcache(ro) for notifying the domain of a new
cached route.

Chain together all IPv4 route caches where ro_rt != NULL.  Provide
in_rtcache() for adding a route to the chain.  Provide in_rtflush()
and in_rtflushall() for invalidating IPv4 route caches.  In
in_rtflush(), set ro_rt to NULL, and remove the route from the
chain.  In in_rtflushall(), walk the chain and remove every route
cache.

In rtrequest1(), call rtflushall() to invalidate route caches when
a route is added.

In gif(4), discard the workaround for stale caches that involves
expiring them every so often.

Replace the pattern 'RTFREE(ro->ro_rt); ro->ro_rt = NULL;' with a
call to rtflush(ro).

Update ipflow_fastforward() and all other users of route caches so
that they expect a cached route, ro->ro_rt, to turn to NULL.

Take care when moving a 'struct route' to rtflush() the source and
to rtcache() the destination.

In domain initializers, use .dom_xxx tags.

KNF here and there.
2006-12-09 05:33:04 +00:00
plunky 24f1ec09dc Do not use the output buffer to store data unless we mean it to go in
the packet, as there is a problem with overwriting information while we
still need it (opt->length in particular) which causes connections to
fail.
2006-12-07 21:36:27 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow 55ddfc9aae change the MOWNER_INIT define to take two args; fix extant struct mowner
decls to use it. Makes options MBUFTRACE compile again and not whinge about
missing structure declarations. (Also makes initialization consistent.)
2006-10-10 21:49:14 +00:00
christos 82e1169df4 fix empty if 2006-10-04 15:49:59 +00:00
plunky b1b95bf647 Reduce memory usage by not allocating a chunk for a bitmask. 2006-10-01 10:13:54 +00:00
plunky 9fcb439a02 fix silent dependencies (uintN_t) 2006-10-01 06:08:08 +00:00
plunky 264c79359e Endian issues:
hci_event.c:
 - Convert memo->response.clock_offset to host-endian.

hci_ioctl.c:
 - printf format tweak (size_t)

hci_link.c:
 - Convert memo->response.clock_offset from host-endian.
 - Tweak a DIAGNOSTIC message.

l2cap_signal.c:
 - In l2cap_recv_config_req(), rp->scid is little-endian so make sure
   we convert from host-endian.

	from scw@
2006-09-11 22:12:39 +00:00
plunky 00d762682c hci_link.c:
- In hci_link_free(), do not unlink items from a LIST queue within
   a LIST_FOREACH() iterator.

rfcomm_session.c:
 - In rfcomm_session_recv_mcc_nsc(), do not unlink items from a LIST
   queue within a LIST_FOREACH() iterator.

	from scw@
2006-09-11 22:08:38 +00:00
plunky 4f1cbddc12 update to bluetooth device attachment:
remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
2006-09-10 15:45:55 +00:00
plunky 8e2dcba5fc add newline to (debug) printf 2006-08-28 08:19:53 +00:00
christos 39f8ec7651 add missing initializers. 2006-08-28 00:13:44 +00:00
plunky c980b109dd BluetootH SCO Audio update.
Provide an ioctl to set the SCO mtu value in the controller and
place limits in the SCO code such that only packets of this size
may be sent.

Move the mtu option from btsco(4) and btdevctl(8), to the
btconfig(8) program.

Remove temporary BLUETOOTH_SCO kernel option, and enable SCO
socket access.

Fix incoming connection handling for btsco(4) and SCO sockets.

Fix documentation to reflect the new world order.
2006-08-27 11:41:58 +00:00
christos 35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
tron b504a17332 Bluetooth fixes by Iain Hibbert:
- Enable listening and incoming connections for SCO links.
2006-07-26 10:20:56 +00:00
tron 1b42d7e7dc Bluetooth fixes by Iain Hibbert:
- Clarify some deprecated commands from the 2.0 spec.
2006-07-26 10:13:49 +00:00
tron 0429374bbb Bluetooth fixes by Iain Hibbert:
- Utilise cached inquiry results when making connections.
2006-07-26 10:10:06 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
gdamore df112a3055 Wait a little longer, because some devices (eg bt3c) take a few seconds to
enable when they are loading firmware so we need to wait a bit longer.

Patch from Iain Hibbert, at his request.
2006-07-17 19:20:16 +00:00
drochner f7c7c95eb6 make some bluetooth devices just devices, not interface attributes 2006-06-21 17:14:13 +00:00
gdamore d106438030 Make include of opt_bluetooth.h unconditional. 2006-06-19 22:38:55 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00