The NetBSD Project

CVS log for src/usr.sbin/btdevctl/sdp.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.sbin / btdevctl

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Dec 12 22:20:52 2021 UTC (3 years, 1 month ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
fix various typos in comments.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Jun 7 00:12:00 2020 UTC (4 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +15 -48 lines
Update for proplib(3) API changes.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Dec 10 20:38:14 2017 UTC (7 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
Fix fallout from hid factorisation:
- need to install sys/dev/hid/hid.h for userland
- include it where needed - most of the time in place if usb/usbhid.h

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Mar 20 19:46:13 2011 UTC (13 years, 9 months ago) by plunky
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, cherry-xenmp-base, cherry-xenmp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +9 -13 lines
provide more informative error messages

Revision 1.5.6.1: download - view: text, markup, annotated - select for diffs
Sun Nov 21 03:05:06 2010 UTC (14 years, 1 month ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +110 -12 lines
Pull up following revision(s) (requested by plunky in ticket #1407):
	sys/dev/bluetooth/btdev.h: revision 1.9
	sys/arch/iyonix/conf/GENERIC: revision 1.60
	sys/arch/sparc64/conf/GENERIC: revision 1.129
	sys/dev/usb/hid.c: revision 1.30
	sys/dev/usb/hid.h: revision 1.13
	sys/arch/i386/conf/GENERIC: revision 1.983
	usr.sbin/btdevctl/print.c: revision 1.10
	sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.16
	sys/arch/alpha/conf/GENERIC: revision 1.337
	sys/dev/bluetooth/files.bluetooth: revision 1.14
	sys/arch/evbarm/conf/GUMSTIX: revision 1.49
	sys/dev/usb/usbdevs: revision 1.550
	sys/arch/evbppc/conf/OPENBLOCKS266_OPT: revision 1.14
	sys/arch/hpcsh/conf/GENERIC: revision 1.91
	sys/dev/bluetooth/btmagic.c: revision 1.1
	distrib/sets/lists/man/mi: revision 1.1210
	sys/arch/amd64/conf/GENERIC: revision 1.279
	sys/arch/i386/conf/ALL: revision 1.258
	sys/arch/amd64/conf/XEN3_DOM0: revision 1.54
	sys/arch/hpcarm/conf/JORNADA720: revision 1.78
	sys/dev/usb/hid.c: revision 1.29
	share/man/man4/btmagic.4: revision 1.1
hid_get_data() does not work if the size of data is less than
a byte and crosses a byte boundary, and it always returns a
sign-extended value.
fix this by using the algorithm from libusbhid to read bytes,
and provide a hid_get_udata() function to return unsigned data
values.
while here, const args
update DPRINTF to reflect actual function name
add Apple Magic Mouse product-id
regen for Magic Mouse id
allow for vendor-id and product-id properties, passing them
through to child devices
add Magic Mouse driver and manpage btmagic(4)
additionally query the "PnP Information" service record to discover
any USB Forum vendor-id and product-id values and store them in the
property list if found.
add btmagic(4) where other Bluetooth drivers are listed

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Apr 28 06:18:07 2010 UTC (14 years, 8 months ago) by plunky
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +115 -28 lines
additionally query the "PnP Information" service record to discover
any USB Forum vendor-id and product-id values and store them in the
property list if found.

Revision 1.5.8.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:20:19 2009 UTC (15 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +178 -448 lines
Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue May 12 18:39:20 2009 UTC (15 years, 8 months ago) by plunky
Branches: MAIN
CVS tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +180 -451 lines
update to use new sdp(3) and sdp_data(3) APIs

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Apr 15 00:35:04 2009 UTC (15 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +9 -8 lines
Fix -Wsign-compare issues

Revision 1.4.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:36:14 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +16 -18 lines
sync with head.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Apr 20 19:34:23 2008 UTC (16 years, 8 months ago) by plunky
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase
Branch point for: netbsd-5, jym-xensuspend
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +16 -18 lines
use __arraycount macro instead of rolling our own

Revision 1.1.6.2: download - view: text, markup, annotated - select for diffs
Sun Sep 30 03:39:20 2007 UTC (17 years, 3 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.1.6.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.6.1: +4 -4 lines
Catch up on netbsd-4 as of a few days ago.

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Thu Sep 27 16:16:31 2007 UTC (17 years, 3 months ago) by xtraeme
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-1-RELEASE, netbsd-4-0
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.1: +4 -4 lines
Pull up following revision(s) (requested by joerg in ticket #904):
	sbin/veriexecctl/veriexecctl.c: revision 1.29 (via patch)
	common/lib/libprop/prop_string.c: revision 1.9 (via patch)
	distrib/sets/lists/comp/mi: revision 1.1063 (via patch)
	common/lib/libprop/prop_kern.c: revision 1.8 (via patch)
	common/include/prop/prop_string.h: revision 1.2 (via patch)
	common/include/prop/prop_ingest.h: revision 1.2 (via patch)
	usr.sbin/btdevctl/btdevctl.c: revision 1.5 (via patch)
	common/lib/libprop/prop_object_impl.h: revision 1.14 (via patch)
	common/lib/libprop/prop_rb.c: revision 1.7 (via patch)
	common/include/prop/prop_array.h: revision 1.5 (via patch)
	common/lib/libprop/prop_stack.h: revision 1.1 (via patch)
	common/lib/libprop/prop_object_impl.h: revision 1.16 (via patch)
	common/lib/libprop/prop_number.3: revision 1.7 (via patch)
	common/lib/libprop/prop_stack.h: revision 1.2 (via patch)
	common/lib/libprop/prop_stack.c: revision 1.1 (via patch)
	common/lib/libprop/prop_object_impl.h: revision 1.17 (via patch)
	common/lib/libprop/prop_dictionary_util.c: revision 1.2 (via patch)
	common/lib/libprop/prop_dictionary_util.3: revision 1.2 (via patch)
	common/lib/libprop/prop_dictionary.c: revision 1.18 (via patch)
	common/lib/libprop/prop_stack.c: revision 1.2 (via patch)
	common/lib/libprop/prop_object_impl.h: revision 1.18 (via patch)
	common/lib/libprop/prop_dictionary.c: revision 1.19 (via patch)
	common/include/prop/prop_bool.h: revision 1.3 (via patch)
	common/include/prop/prop_dictionary.h: revision 1.7 (via patch)
	common/include/prop/prop_data.h: revision 1.2 (via patch)
	sys/sys/dkio.h: revision 1.14 (via patch)
	usr.sbin/btdevctl/sdp.c: revision 1.4 (via patch)
	common/include/prop/Makefile: revision 1.3 (via patch)
	common/include/prop/prop_number.h: revision 1.5 (via patch)
	common/lib/libprop/prop_object.c: revision 1.14 (via patch)
	common/lib/libprop/prop_object.c: revision 1.15 (via patch)
	common/lib/libprop/prop_object.c: revision 1.16 (via patch)
	common/lib/libprop/prop_bool.3: revision 1.3 (via patch)
	common/lib/libprop/prop_data.3: revision 1.4 (via patch)
	common/lib/libprop/prop_object.3: revision 1.6 (via patch)
	common/lib/libprop/prop_data.c: revision 1.7 (via patch)
	common/lib/libprop/prop_data.c: revision 1.8 (via patch)
	common/lib/libprop/prop_data.c: revision 1.9 (via patch)
	common/lib/libprop/prop_dictionary.c: revision 1.20 (via patch)
	usr.sbin/btdevctl/print.c: revision 1.9 (via patch)
	sbin/veriexecctl/veriexecctl_parse.y: revision 1.22 (via patch)
	common/lib/libprop/prop_number.c: revision 1.12 (via patch)
	common/include/prop/proplib.h: revision 1.5 (via patch)
	common/lib/libprop/prop_number.c: revision 1.13 (via patch)
	common/lib/libprop/prop_number.c: revision 1.14 (via patch)
	common/include/prop/prop_object.h: revision 1.5 (via patch)
	common/lib/libprop/prop_array.3: revision 1.5 (via patch)
	common/include/prop/prop_object.h: revision 1.6 (via patch)
	common/lib/libprop/prop_string.3: revision 1.4 (via patch)
	common/lib/libprop/prop_bool.c: revision 1.10 (via patch)
	common/lib/libprop/Makefile.inc: revision 1.6 (via patch)
	common/lib/libprop/prop_ingest.c: revision 1.2 (via patch)
	common/lib/libprop/prop_bool.c: revision 1.11 (via patch)
	common/lib/libprop/prop_array.c: revision 1.10 (via patch)
	common/lib/libprop/prop_ingest.3: revision 1.3 (via patch)
	common/lib/libprop/prop_bool.c: revision 1.12 (via patch)
	common/lib/libprop/prop_array.c: revision 1.11 (via patch)
	common/lib/libprop/prop_string.c: revision 1.7 (via patch)
	common/lib/libprop/prop_dictionary.3: revision 1.8 (via patch)
	common/lib/libprop/prop_array.c: revision 1.9 (via patch)
	usr.sbin/btdevctl/db.c: revision 1.4 (via patch)
	common/lib/libprop/prop_string.c: revision 1.8 (via patch)
	common/include/prop/plistref.h: revision 1.1 (via patch)
Consider '\r' to be white space. Discussed with and also kept as local
change by freza. With this change, DOS style line endings work.

boolean_t -> bool
TRUE -> true
FALSE -> false

libprop is currently using a recursive parser. While this is fine for
userland, deeply nested arrays and dictionaries can easily overflow
the kernel stack and thereby force a panic.

Fix the internalizer and prop_object_release to use a separate call
stack and alter the dictionary and array handling to not recurse on
the C stack. The default stack has an inline depth of 16 elements,
which should keep the overhead reasonable.

This issue was found by Pavel Cahyna and Jachym Holecek.

Additionally add a limit for prop_object_copyin_ioctl to prevent user
programs from temporary allocating unbound amount of kernel memory.

Allow malloc to fail so that tight loops of userland processes can't
force panics by exhausting the kernel map.

Tested with the sample exploit of Jachym, his test suite and reviewed
by himself (initial patch), Christos Zoulas and Jason Thorpe.
struct plistref does not reference other proplib data types, so split it
in its own header file to be included by dkio.h. Fixes breakage due to
pollution from proplib.h in programs which include ioctl.h. Tested and OK
by dogcow@.

Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.
From Tom Spindler (dogcow@).

Avoid using unbound amount of stack frames in prop_object_equal
by using a dynamic stack as well. Reorder arguments for the internalizer
as the iteration is always present and should go before possibly
NULL arguments.
Reviewed by mjf@ and adrianp@

Revision 1.1.6.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 07:05:36 2007 UTC (17 years, 4 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +64 -2 lines
Sync w/ NetBSD-4-RC_1

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Aug 17 17:59:16 2007 UTC (17 years, 5 months ago) by pavel
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.

From Tom Spindler (dogcow@).

Revision 1.1.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 19 16:04:21 2007 UTC (17 years, 6 months ago) by liamjfoy
Branches: netbsd-4
CVS tags: netbsd-4-0-RC1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +64 -2 lines
Pull up following revision(s) (requested by plunky in ticket #744):
	sys/netbt/l2cap_lower.c: revision 1.6
	sys/dev/bluetooth/btdev.h: revision 1.6
	sys/netbt/sco_socket.c: revision 1.9
	sys/netbt/rfcomm_upper.c: revision 1.3
	sys/netbt/l2cap_socket.c: revision 1.7
	sys/netbt/rfcomm_upper.c: revision 1.5
	lib/libusbhid/usbhid.h: revision 1.5
	sys/netbt/rfcomm_upper.c: revision 1.6
	usr.sbin/btdevctl/btdevctl.c: revision 1.4
	usr.sbin/btdevctl/btdevctl.h: revision 1.3
	usr.sbin/btdevctl/btdevctl.8: revision 1.4
	sys/netbt/rfcomm_session.c: revision 1.5
	sys/netbt/hci.h: revision 1.10
	usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.6
	sys/netbt/hci_link.c: revision 1.11
	usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.7
	usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.8
	sys/dev/bluetooth/btsco.c: revision 1.14
	sys/netbt/rfcomm_session.c: revision 1.9
	usr.sbin/btdevctl/sdp.c: revision 1.2
	share/man/man9/bluetooth.9: revision 1.2
	usr.sbin/btdevctl/sdp.c: revision 1.3
	sys/dev/bluetooth/bthidev.c: revision 1.8
	sys/netbt/l2cap.h: revision 1.4
	sys/netbt/rfcomm.h: revision 1.3
	sys/netbt/l2cap.h: revision 1.5
	sys/netbt/l2cap_misc.c: revision 1.3
	share/man/man4/bluetooth.4: revision 1.5
	lib/libusbhid/usbhid.3: revision 1.11
	sys/netbt/bluetooth.h: revision 1.5
	share/man/man4/bthidev.4: revision 1.8
	sys/netbt/rfcomm_dlc.c: revision 1.3
	usr.sbin/btdevctl/print.c: revision 1.8
	sys/netbt/rfcomm_socket.c: revision 1.7
	sys/netbt/l2cap_signal.c: revision 1.4
	sys/netbt/l2cap_signal.c: revision 1.5
	sys/netbt/l2cap_signal.c: revision 1.7
	sys/netbt/hci_event.c: revision 1.6
	usr.bin/rfcomm_sppd/rfcomm_sppd.1: revision 1.5
	sys/netbt/l2cap_upper.c: revision 1.3
	sys/netbt/l2cap_lower.c: revision 1.2
	usr.sbin/btdevctl/db.c: revision 1.3
	sys/netbt/l2cap_upper.c: revision 1.6
	lib/libusbhid/descr.c: revision 1.5
	sys/netbt/l2cap_upper.c: revision 1.7
	sys/netbt/l2cap_lower.c: revision 1.4
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)
   - ALSO INCLUDES OTHER MINOR FIXES

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Apr 21 06:15:24 2007 UTC (17 years, 8 months ago) by plunky
Branches: MAIN
CVS tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +44 -2 lines
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)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Apr 11 20:01:01 2007 UTC (17 years, 9 months ago) by plunky
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +22 -2 lines
release prop objects after they have been retained by dictionary

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 14 21:16:31 2006 UTC (18 years, 4 months ago) by riz
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +2 -2 lines
Pull up following revision(s) (requested by plunky in ticket #161):
	sys/dev/bluetooth/btdev.h: revision 1.4
	distrib/sets/lists/comp/mi: revision 1.922
	usr.sbin/postinstall/postinstall: revision 1.25
	sys/netbt/hci_unit.c: revision 1.3
	sys/netbt/hci_ioctl.c: revision 1.4
	usr.sbin/sdpd/profile.c: revision 1.2
	usr.sbin/btdevctl/btdevctl.c: revision 1.2
	share/man/man4/Makefile: revision 1.405
	distrib/sets/lists/man/mi: revision 1.930
	distrib/sets/lists/etc/mi: revision 1.176
	usr.sbin/sdpd/profile.c: revision 1.3
	usr.sbin/btdevctl/btdevctl.c: revision 1.3
	etc/MAKEDEV.tmpl: revision 1.62
	distrib/sets/lists/base/mi: revision 1.650
	usr.sbin/btdevctl/btdevctl.h: revision 1.2
	usr.bin/sdpquery/sdpquery.1: revision 1.4
	sys/netbt/rfcomm_session.c: revision 1.2
	usr.sbin/btdevctl/btdevctl.8: revision 1.3
	usr.bin/sdpquery/search.c: revision 1.2
	usr.sbin/sdpd/Makefile: revision 1.2
	sys/dev/bluetooth/Makefile: revision 1.3
	usr.sbin/btdevctl/cfg.c: file removal
	sys/netbt/files.netbt: revision 1.4
	usr.sbin/btdevctl/sdp.c: revision 1.1
	sys/dev/bluetooth/bthidev.c: revision 1.3
	etc/bluetooth/Makefile: revision 1.3
	sys/dev/pcmcia/files.pcmcia: revision 1.51
	sys/dev/bluetooth/bthidev.c: revision 1.4
	sys/dev/bluetooth/bthidev.h: revision 1.3
	usr.sbin/btdevctl/dev.c: file removal
	sys/dev/bluetooth/files.bluetooth: revision 1.10
	sys/arch/i386/conf/GENERIC: revision 1.777
	share/man/man4/ubt.4: revision 1.6
	share/man/man4/bthub.4: revision 1.3
	sys/netbt/hci.h: revision 1.5
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.202
	lib/libsdp/sdp.h: revision 1.2
	usr.sbin/btdevctl/print.c: revision 1.1
	share/man/man4/bthidev.4: revision 1.5
	share/man/man4/btdev.4: file removal
	usr.sbin/btdevctl/print.c: revision 1.2
	sys/arch/i386/conf/GENERIC_LAPTOP: revision 1.205
	usr.sbin/btdevctl/Makefile: revision 1.2
	sys/dev/usb/files.usb: revision 1.70
	sys/netbt/l2cap_signal.c: revision 1.2
	sys/netbt/hci_link.c: revision 1.4
	sys/dev/bluetooth/bthub.c: revision 1.3
	share/man/man4/btsco.4: revision 1.5
	sys/netbt/hci_link.c: revision 1.5
	share/man/man4/btdev.4: revision 1.4
	sys/dev/bluetooth/btkbd.c: revision 1.3
	sys/dev/bluetooth/btdev.c: file removal
	sys/netbt/hci_event.c: revision 1.2
	sys/dev/bluetooth/btsco.h: revision 1.2
	etc/mtree/special: revision 1.101
	sys/dev/bluetooth/btsco.c: revision 1.3
	sys/conf/majors: revision 1.27
	usr.sbin/sdpd/hf.c: revision 1.1
	sys/dev/bluetooth/btsco.c: revision 1.4
	share/man/man5/rc.conf.5: revision 1.107
	sys/dev/bluetooth/btdev.c: revision 1.2
	etc/rc.d/btdevctl: revision 1.2
	usr.sbin/btdevctl/db.c: revision 1.1
	etc/rc.d/btdevctl: revision 1.3
	etc/bluetooth/btdevctl.conf: revision 1.1
	usr.sbin/btdevctl/hid.c: file removal
	sys/arch/i386/conf/GENERIC: revision 1.781
	sys/dev/bluetooth/btdev.h: revision 1.3
Make btdev default count explicit
Fix typo in variable name
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
also include service name in dictionary being sent to kernel.
(this is not used just yet, but it might be in the future and it will
be easier if we dont have to provide code to handle its absence)
clarify the CAVEAT section somewhat
Add service discovery support for the Handsfree profile
Replace static 'FreeBSD' string with operating system name gleaned
from uname(3)
Halt the callout on detach
btsco.c:
 - sco_getopt(..., SO_SCO_MTU, ...) expects the address of a uint16_t,
   not an int. So change sc_mtu's type to uint16_t.
 - Try a little harder to ensure btsco_round_blocksize() does not
   return zero. Prevents a subsequent panic in audio_init_ringbuffer().
	from scw@
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@
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@
guard against a possible situation where the list of l2cap channels is changed
when the bluetooth code is not expecting it to be. During a disconnect, we can
detach the channel that is being disconnected, but its not really safe to detach
any others.
Print explicit 64-bit types using the format macros from int_fmtio.h.
Unbreaks the build for our LP64 ports, where "long long" typically is
not 64 bits.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Sep 10 15:45:56 2006 UTC (18 years, 4 months ago) by plunky
Branches: MAIN
CVS tags: netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
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

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>