summaryrefslogtreecommitdiff
path: root/src/eir.c
Commit message (Collapse)AuthorAgeFilesLines
* core: Check if device has RSILuiz Augusto von Dentz2023-03-101-0/+3
| | | | | This checks if device is advertising an RSI and if so disregards if it is not discoverable since other members can be.
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-4/+4
| | | | | | | | | | | This replaces the uses of g_memdup with util_memdup since the former has been deprecated: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations] g_memdup2 requires bumping glib version which would likely have its own problems thus why util_memdup was introduced.
* src: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 62 GPL-2.0-or-later : 51 BSD-2-Clause : 2 License: LGPL-2.1-or-later src/adv_monitor.c src/adv_monitor.h src/shared/mainloop-glib.c src/shared/btp.c src/shared/tester.c src/shared/btsnoop.c src/shared/gatt-helpers.h src/shared/log.h src/shared/util.h src/shared/mainloop-ell.c src/shared/hci-crypto.c src/shared/mainloop.c src/shared/hfp.h src/shared/mainloop-notify.c src/shared/io-mainloop.c src/shared/btsnoop.h src/shared/uhid.h src/shared/util.c src/shared/ringbuf.c src/shared/btp.h src/shared/shell.h src/shared/io-glib.c src/shared/queue.h src/shared/gatt-server.h src/shared/crypto.c src/shared/crypto.h src/shared/io-ell.c src/shared/timeout-glib.c src/shared/mgmt.c src/shared/gatt-db.c src/shared/mainloop-notify.h src/shared/hfp.c src/shared/timeout-ell.c src/shared/shell.c src/shared/hci.c src/shared/log.c src/shared/ringbuf.h src/shared/gatt-helpers.c src/shared/queue.c src/shared/tty.h src/shared/timeout-mainloop.c src/shared/tester.h src/shared/gap.h src/shared/mgmt.h src/shared/gatt-db.h src/shared/uhid.c src/shared/mainloop.h src/shared/timeout.h src/shared/att-types.h src/shared/pcap.c src/shared/gap.c src/shared/att.c src/shared/pcap.h src/shared/hci.h src/shared/gatt-client.h src/shared/io.h src/shared/gatt-client.c src/shared/ad.c src/shared/att.h src/shared/gatt-server.c src/shared/hci-crypto.h src/shared/ad.h License: GPL-2.0-or-later src/attrib-server.h src/advertising.h src/textfile.c src/attrib-server.c src/uinput.h src/log.h src/eir.h src/sdpd.h src/sdpd-request.c src/service.h src/sdpd-database.c src/adapter.h src/plugin.h src/uuid-helper.h src/plugin.c src/main.c src/sdp-xml.c src/error.h src/oui.c src/device.c src/agent.h src/sdp-client.c src/oui.h src/device.h src/gatt-database.c src/error.c src/backtrace.c src/sdpd-server.c src/adapter.c src/log.c src/agent.c src/backtrace.h src/sdp-xml.h src/hcid.h src/dbus-common.h src/uuid-helper.c src/storage.c src/profile.c src/advertising.c src/storage.h src/dbus-common.c src/profile.h src/sdpd-service.c src/eir.c src/sdp-client.h src/gatt-database.h src/gatt-client.h src/rfkill.c src/gatt-client.c src/service.c src/textfile.h License: BSD-2-Clause src/shared/ecc.h src/shared/ecc.c
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* device: Add implementation of AdvertisingDataLuiz Augusto von Dentz2018-05-021-0/+27
| | | | | | | | This adds the implementation of AdvertisingData property: [CHG] Device 00:1B:DC:07:31:88 AdvertisingData Key: 0x26 [CHG] Device 00:1B:DC:07:31:88 AdvertisingData Value: 01 01 00 ...
* core/eir: Fix service data parsingLuiz Augusto von Dentz2015-04-171-0/+4
| | | | The UUID type was not being set correctly.
* core/eir: Add support for parsing service dataLuiz Augusto von Dentz2015-04-141-0/+80
|
* core: Use local libbluetooth includesMarcel Holtmann2015-02-281-3/+3
|
* core: Add Manufacturer Specific Data EIR fieldAlfonso Acosta2014-10-251-0/+22
| | | | Add data structure and parsing support.
* eir: Use unsigned int for flags in struct eir_dataSzymon Janc2014-03-221-1/+1
| | | | | | | | | | | This adds assumption that if flags field is not present in EIR all flags are unset: "The Flags data type shall be included when any of the Flag bits are non-zero, otherwise the Flags data type may be omitted." This also fix reporting non-discoverable LE devices as limited discoverable due to no explicit check for flags == -1 as empty flags.
* Replace bt_get_le32() by get_le32()Claudio Takahasi2014-03-211-1/+1
|
* Replace bt_get_le16() by get_le16()Claudio Takahasi2014-03-211-3/+3
|
* Replace bt_put_le16() by put_le16()Claudio Takahasi2014-03-141-1/+2
|
* eir: Remove GLib usage from service UUID allocationJohan Hedberg2014-01-211-10/+4
|
* core: Don't use GLib allocators for bt_uuid2string and bt_name2stringJohan Hedberg2014-01-211-3/+15
|
* Rename glib-helper to uuid-helperJohan Hedberg2014-01-211-1/+1
|
* eir: Add support for parsing DeviceID infoSzymon Janc2014-01-181-0/+10
|
* eir: Prefer bool over gbooleanJohan Hedberg2014-01-171-4/+5
|
* core: Remove useless eir parsing function return valueAndrei Emeltchenko2013-12-101-5/+3
| | | | | | | Currently eir_parse always return 0 but it is checked throughout the code (in android/bluetooth code as well in src/adapteri, etc) for return value (err < 0) which never happens. Make function eir_parse return void. This fixes warnings from static analyzer tools.
* core: Parse the TX power level from EIR dataMarcel Holtmann2013-01-271-0/+7
|
* core: Only set EIR data pointer after confirming it points to valid memoryJohan Hedberg2013-01-221-1/+2
| | | | | Even though we do not access the memory it's still safer not to have any pointers to it until we know it's valid.
* core: Make hash & randomizer const in EIR APIJohan Hedberg2013-01-061-1/+1
|
* core: Fix missing const qualifier in EIR parsing APIJohan Hedberg2013-01-061-8/+12
|
* core: Remove unused eir functionsJohan Hedberg2012-12-141-59/+0
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. The patch needs to be split up and the gdbus/ changes were bogus compared to the original commit message. Conflicts: Makefile.am Makefile.obexd profiles/cyclingspeed/cyclingspeed.c profiles/heartrate/heartrate.c src/error.c
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | Instead of trying to include config.h in each file over the tree and possibly forgetting to include it, give a "-include config.h" argument to the compiler so it's guaranteed that a) it will be included for all source files and b) it will be the first header included. gdbus/ directory is left out, since it would break other projects using it.
* core: Move UTF-8 validation of device names into eir.cJohan Hedberg2012-12-041-4/+25
|
* adapter: Constify pointer returned by adapter_get_addressSzymon Janc2012-10-051-1/+1
|
* eir: Add support for creating proper OOB EIRSzymon Janc2012-10-031-13/+26
| | | | Address and total length field are mandatory part of OOB EIR.
* eir: Remove struct uuid_infoSzymon Janc2012-10-031-13/+16
| | | | | | Remove struct uuid_info and convert functions to use sdp_record_t list instead. This will allow to easily use services list from struct btd_adapter to create EIR.
* eir: Return number of bytes written by eir_create_oobSzymon Janc2012-10-031-1/+3
| | | | In OOB EIR is not zero padded.
* eir: Remove support for creating EIR with tx_power fieldsSzymon Janc2012-10-031-8/+1
| | | | This field is not used for OOB EIR.
* eir: Rename eir_create to eir_create_oobSzymon Janc2012-10-031-1/+1
| | | | | | | With mgmt interface EIR is created by kernel. Renaming this function makes it clear what is a purpose of it in userspace. It also contains support for EIR data types that shall be transmitted only over OOB channel.
* eir: Add support for creating EIR with CoD fieldSzymon Janc2012-10-031-1/+17
| | | | This will be used to create EIR to be send over OOB channel.
* eir: Add support creating EIR with hash and randomizer fieldsSzymon Janc2012-10-031-3/+25
| | | | This will be used to create EIR to be send over OOB channel.
* eir: Add eir_parse_oob functionSzymon Janc2012-10-031-0/+25
| | | | | This will parse EIR received over OOB. Such EIR contains mandatory and optional part.
* eir: Store class in struct eir_data as uint32_tSzymon Janc2012-10-031-1/+2
| | | | | This simplify code as class is stored on storage as uint32_t and had to be converted to it in few places.
* eir: Add support for parsing SSP hash and randomizerSzymon Janc2012-10-031-0/+16
| | | | This will be used over OOB mechanism.
* eir: Use bt_get_* helper functions to access unaligned memorySzymon Janc2012-09-051-2/+4
|
* eir: Keep parsed eir_data on errorChen Ganir2012-05-151-5/+3
| | | | | | Do not discard already parsed eir_data on eir data length error. Data corruption may occur, but this does not mean that we need to ignore already parsed valid eir data.
* eir: Fix incorrect eir_has_data_type() parsingSyam Sidhardhan2012-04-161-2/+2
| | | | | Updating the "parsed" variable twice inside the for loop, leads to incorrect parsing.
* eir: Fix incorrect eir_length() parsingSyam Sidhardhan2012-04-161-2/+2
| | | | | | | | | | | | | | | | | Issue: The COD value displayed via dbus during inquiry is wrong. This is because of the incorrect return length of the eir_length(), which leads to appending the COD at wrong location. Analysis: After appending the COD at the end of the eir data, we can see there are some '00' present in the eir field length in the eir file. XX:XX:XX:XX:XX:XX 07095359414D5043020A040B0312111F110C110E110311 0000000000000000000000040D000142 Fix: Corrected the length calculation in eir_length(), which is determining, which position the COD should append
* build: Remove glib-compat.h supportMarcel Holtmann2012-04-161-1/+0
|
* eir: Read GAP appearance from advertising dataBruna Moreira2012-03-301-0/+7
| | | | This was introduced on Core Specification Supplement (CSS) v1.
* Add support for setting VID source in DeviceID from config fileSzymon Janc2012-03-281-4/+3
| | | | | | This allows to set if VID source is Bluetooth SIG or USB. Assigner is provided as string {bluetooth,usb} and fallback to usb if none is set in config.
* eir: Add eir_length() functionJohan Hedberg2012-01-181-0/+23
|
* eir: Add eir_append_data functionJohan Hedberg2012-01-171-0/+11
|
* eir: Rename eir_has_complete_name to eir_has_data_typeJohan Hedberg2012-01-171-2/+2
|
* eir: Move EIR data type defines to eir.hJohan Hedberg2012-01-171-13/+0
|
* eir: Simplify parsing with clear helper variablesJohan Hedberg2012-01-171-15/+14
|