Commit Graph

11 Commits

Author SHA1 Message Date
plunky
1e2b8c6e0e prevent local socket address from being changed after socket is
in use (connect or listen)
2010-01-04 19:20:05 +00:00
plunky
34ca69b754 When the special L2CAP_PSM_ANY value is used for listening sockets,
select the next unused PSM from the dynamic range (0x1001->)
2009-09-25 19:44:57 +00:00
plunky
fd7356a917 Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core
2008-08-06 15:01:23 +00:00
msaitoh
8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
plunky
f5db72e7b7 Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.

    - L2CAP or RFCOMM connections can require the baseband radio link
    mode be any of:
	authenticated (devices are paired)
	encrypted (implies authentication)
	secured (encryption, plus generate new link key)

    - for sockets, the mode is set using setsockopt(2) and the socket
    connection will be aborted if the mode change fails.

    - mode settings will be applied during connection establishment, and
    for safety, we enter a wait state and will only proceed when the mode
    settings are successfuly set.

    - It is possible to change the mode on already open connections, but
    not possible to guarantee that data already queued (from either end)
    will not be delivered. (this is a feature, not a bug)

    - bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
    "secure" options

    - btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
    keyboards (which are required to support it)
2007-04-21 06:15:22 +00:00
plunky
844c714a45 rework ordering of error conditions for setopt, prefer to return EINVAL
rather than EBUSY.
2007-04-06 17:09:00 +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
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
plunky
162ec75621 return ENOPROTOOPT when protocol options are not known 2007-03-05 19:11:54 +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