summaryrefslogtreecommitdiff
path: root/attrib
Commit message (Collapse)AuthorAgeFilesLines
...
* attrib: Expose write executeLukasz Rymanowski2014-04-232-0/+9
| | | | This is needed to cover Android API
* attrib: Add API for reliable writeLukasz Rymanowski2014-04-232-0/+23
| | | | | Android expose to application api for reliable write. Therefore we need to add this support to gattrib
* attrib: Improve Attribute Data length checkingClaudio Takahasi2014-04-031-23/+17
| | | | | According to Core SPEC, attribute data list must be grouped in elements of the same size.
* attrib/gatttool: Use define for UUID format checkJakub Tyszkowski2014-03-281-1/+1
|
* attrib: Use const source data pointer for writeJakub Tyszkowski2014-03-282-6/+6
| | | | Source buffer for write operations should be immutable.
* attrib: Remove att_get_* and att_put_* helpersClaudio Takahasi2014-03-251-89/+0
|
* gatt: Move Characteristic properties to attrib/gatt.hClaudio Takahasi2014-03-253-16/+24
| | | | | | Properties are defined by GATT specification. This patch moves and renames the defines related to Characteristic properties bits from attrib/att.h to attrib/gatt.h
* attrib: Minor code optimizationClaudio Takahasi2014-03-241-3/+1
|
* Replace att_put_u16() by put_le16()Claudio Takahasi2014-03-242-25/+25
|
* Replace att_put_uuid() by util.h helpersClaudio Takahasi2014-03-242-11/+24
|
* Replace att_get_uuid128() by bswap_128()Claudio Takahasi2014-03-244-36/+89
| | | | | | GATT/ATT use little-endian byte order format for 128-bit UUID. No matter the system byte order representation, internally the core will handle 128-bit UUID on big-endian format.
* Replace att_get_u16() by get_le16()Claudio Takahasi2014-03-245-36/+37
|
* Replace att_get_uuid16() by get_le16()Claudio Takahasi2014-03-244-8/+15
|
* Replace att_put_uuid16() by put_le16()Claudio Takahasi2014-03-241-1/+2
|
* attrib: Use LE helpers defined in src/shared/util.hClaudio Takahasi2014-03-241-13/+13
|
* attrib: Remove unneeded sdp.h header includeClaudio Takahasi2014-03-242-2/+0
|
* attrib: Fix gatt_primary leaks when a failure occursJohan Hedberg2014-03-201-1/+1
|
* attrib: Use destroy notify for included queryJohan Hedberg2014-03-191-5/+9
|
* attrib: Fix potential leaks with primary discovery contextJohan Hedberg2014-03-191-6/+24
|
* gattrib: Fix pending command handling when getting disconnectedJohan Hedberg2014-03-191-0/+9
|
* core: Fix memory leaks with struct discover_charJohan Hedberg2014-03-191-5/+18
|
* lib: Move GATT UUID to uuid.hClaudio Takahasi2014-02-241-25/+0
| | | | | | This patch moves GATT UUIDs definitions to a common header. uuid.h contains helper functions to manipulate Bluetooth UUIDs and some common BR/EDR services UUIDs.
* attrib: Make btio/btio.h include localMarcel Holtmann2014-01-254-4/+4
|
* attrib: Use full include path for header filesMarcel Holtmann2014-01-252-11/+11
|
* attrib: Add extra PDU checks when decoding Read by Type ResponseAnderson Lizardo2014-01-111-0/+17
| | | | These checks are needed to avoid invalid memory access on bogus PDUs.
* attrib: Fix PDU length check for Read by Type RequestAnderson Lizardo2014-01-111-1/+1
| | | | PDU length must be either 7 or 21 octets.
* attrib: Reject incomplete PDU in dec_find_by_type_resp()Anderson Lizardo2014-01-111-0/+9
| | | | | Otherwise, an incomplete PDU may be silently accepted (with any remaining data discarded).
* attrib: Remove unnecessary local variables from dec_find_by_type_req()Anderson Lizardo2014-01-111-10/+4
| | | | | | | Use number instead of "min_len", which is easier to review (with help of the documented parameter sizes). valuelen is redundant as *vlen can be used directly.
* attrib: Remove unnecessary NULL checks on dec_find_by_type_req()Anderson Lizardo2014-01-111-15/+9
| | | | | Just assume that the caller will pass non-NULL pointers as arguments (which is true for the only current caller of this function).
* attrib: Add extra PDU checks when decoding Read by Group Type ResponseAnderson Lizardo2014-01-111-0/+18
| | | | These checks are needed to avoid invalid memory access on bogus PDUs.
* attrib: Fix PDU length check for Read by Group Type RequestAnderson Lizardo2014-01-111-1/+1
| | | | PDU length must be either 7 or 21 octets.
* attrib: Remove unnecessary checks for PDU length on ATT encodingAnderson Lizardo2014-01-111-85/+46
| | | | | | | | | | Both userspace and kernel enforce a minimum ATT MTU of 23 octets, which is also used as minimum size for buffers passed to ATT encoding functions. Therefore, it is unnecessary to perform these checks on ATT requests that are guaranteed to fit into 23 octets. Also document ATT parameter lengths where a constant is being used for calculating the PDU length.
* attrib: Use att_put_u16() instead of htobs() + memcpy()Anderson Lizardo2014-01-111-3/+1
|
* attrib: Modify gatt_cb_t signatureAnderson Lizardo2014-01-114-16/+14
| | | | | | Use standard C types instead of GLib ones (which are unnecessary here) and move the "status" parameter to the first position, so it is consistent with other callbacks.
* codingstyle: Change __FUNCTION__ to __func__Andrei Emeltchenko2013-09-111-1/+1
| | | | | | | | | | The __func__ macro is part of the C99 standard whereas __FUNCTION__ is a legacy gcc specific alias for it: http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html Additionally, checkpatch.pl that's commonly used to verify coding style also recommends to use __func__ instead of __FUNCTION__.
* attrib: Add support for 128-bit characteristic UUIDs in gatt_service_addDirk-Jan C. Binnema2013-07-302-5/+18
| | | | | | | | Custom GATT services typically use 128-bits UUIDs; this patch allows for using gatt_service_add to define such services by adding a new option GATT_OPT_CHR_UUID, which allows for passing bt_uuid_t* values. Note, a previous patch renamed the old GATT_OPT_CHR_UUID into GATT_OPT_CHR_UUID16.
* attrib: Rename GATT_OPT_CHR_UUID into GATT_OPT_CHR_UUID16Dirk-Jan C. Binnema2013-07-302-3/+3
| | | | | Rename the option for all in-tree users. This frees up GATT_OPT_CHR_UUID to be used for UUIDs of type bt_uuid_t* (in a next patch).
* attrib: Update gatt_service_add size assert for dealing with 128-bit UUIDsDirk-Jan C. Binnema2013-07-301-1/+1
| | | | | | | | | To paraphrase Anderson Lizardo: "h" was overflowing for 128-bit services because the handle is incremented after each attribute is added so at the end we had: 0xffff + 1 == 0 (h is uint16_t). As it seems more complex to try to remove the overflow without affecting the logic too much, we update the assertion.
* attrib: Reduce scope of variable declarations in char_discovered_cb()Anderson Lizardo2013-07-241-4/+5
| | | | This makes it easy to identify where variables are being used.
* attrib: Allow dec_read_resp() to just check if PDU is validAnderson Lizardo2013-07-241-3/+3
| | | | | If a NULL "value" parameter is given, only check whether PDU is valid, without copying attribute value to a buffer.
* attrib: Add encode/decode execute write supportAlvaro Silva2013-07-242-0/+33
| | | | Add functions for encoding/decoding Execute Write Request PDUs.
* attrib: Add encode/decode prepare write supportAlvaro Silva2013-07-242-0/+61
| | | | Add functions for encoding/decoding Prepare Write Request PDUs.
* attrib: Remove unused parameter from enc_write_resp()Alvaro Silva2013-07-242-2/+2
|
* attrib: Fix coding style for various enc_*/dec_* functionsEder Ruiz Maria2013-07-241-7/+10
| | | | | | Fix coding style for enc_read_blob(), enc_read_blob_resp(), dec_read_resp(), enc_error_resp(), enc_find_info_req(), enc_find_info_resp() and enc_prep_write().
* attrib: Simplify prepare_write()Anderson Lizardo2013-07-241-17/+12
| | | | | All parameters can be retrieved from struct write_long_data fields, therefore there is no need to pass them separately.
* attrib: Fix coding style in prepare_write_cb()Anderson Lizardo2013-07-241-5/+5
|
* attrib: Do not use Write Command in gatt_write_char()Anderson Lizardo2013-07-242-13/+11
| | | | | | | | | | | | | Previously, if no callback was given to gatt_write_char(), it was assumed that a "Write Without Response" (which uses Write Command) should be used instead of Write Request. This "shortcut" is unnecessary (there is gatt_write_cmd() for the situations where Write Without Response is required) and just duplicates code. This commit also fixes the few places where gatt_write_cmd() should be used.
* attrib: Rename gatt_find_info() to gatt_discover_char_desc()Anderson Lizardo2013-07-244-5/+6
| | | | | | The old name referred to the underlying ATT PDU (Find Information Request and Find Information Response) and not to the actual GATT procedure (Discover All Characteristic Descriptors).
* gatttool: Remove unused codeEder Ruiz Maria2013-07-242-42/+5
| | | | | Since commit 6a3a89774c6738df4d5b77636c4ce747b7497ae9 the code removed here has no sense.
* attrib: Fix interactive gatttool segfaultSathish Narasimman2013-07-191-1/+2
| | | | | | | | | | | Passing the special character single quote: $gatttool -I [ ][ ][LE]> ' Segmentation fault (core dumped) Checking g_shell_parse_argv fail status (return FALSE on failure), works fine.