Lines Matching refs:len

222                                        attr.len, 0, attr.value);
234 if (attr.len <= (tcb.payload_size - GATT_HDR_SIZE)) {
238 attr.handle, attr.len, 0, attr.value);
307 p_rsp_value->len != p_clcb->counter ||
309 p_rsp_value->len)) {
318 if ((p_attr->offset += p_rsp_value->len) >= p_attr->len) exec = true;
334 uint16_t to_send = p_attr->len - p_attr->offset;
347 VLOG(1) << StringPrintf("offset =0x%x len=%d", offset, to_send);
373 tGATT_CLCB* p_clcb, uint16_t len,
388 while (len >= 4) {
393 len -= 4;
419 UNUSED_ATTR uint8_t op_code, uint16_t len,
424 if (len < GATT_INFO_RSP_MIN_LEN) {
435 len -= 1;
442 while (len >= uuid_len + 2) {
450 len -= (uuid_len + 2);
509 UNUSED_ATTR uint16_t len, uint8_t* p_data) {
516 if (len < 4) {
565 uint8_t op_code, uint16_t len,
573 LOG(ERROR) << StringPrintf("value resp op_code = %s len = %d",
574 gatt_dbg_op_name(op_code), len);
576 if (len < GATT_PREP_WRITE_RSP_MIN_LEN) {
585 value.len = len - 4;
587 memcpy(value.value, p, value.len);
609 void gatt_process_notification(tGATT_TCB& tcb, uint8_t op_code, uint16_t len,
623 if (len < GATT_NOTIFICATION_MIN_LEN) {
630 value.len = len - 2;
631 memcpy(value.value, p, value.len);
697 uint8_t op_code, uint16_t len,
709 if (len < GATT_READ_BY_TYPE_RSP_MIN_LEN) {
717 if ((value_len > (tcb.payload_size - 2)) || (value_len > (len - 1))) {
725 op_code, value_len, (tcb.payload_size - 2), (len - 1));
733 len -= 1;
735 while (len >= (handle_len + value_len)) {
806 p_clcb->counter = len - 2;
841 len -= (value_len + 2);
856 len -= (value_len + handle_len);
890 UNUSED_ATTR uint8_t op_code, uint16_t len,
897 p_clcb->counter = len;
906 if ((len + offset) > GATT_MAX_ATTR_LEN)
907 len = GATT_MAX_ATTR_LEN - offset;
909 p_clcb->counter += len;
911 memcpy(p_clcb->p_attr_buf + offset, p, len);
915 if (len == (tcb.payload_size -
917 len + offset < GATT_MAX_ATTR_LEN) {
920 "len=%d new offset=%d",
921 offset, len, p_clcb->counter);
941 if (len == Uuid::kNumBytes128) {
979 void gatt_process_mtu_rsp(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, uint16_t len,
984 if (len < GATT_MTU_RSP_MIN_LEN) {
1056 uint16_t len, uint8_t* p_data) {
1058 if (len >= tcb.payload_size) {
1060 "%s: invalid indicate pkt size: %d, PDU size: %d", __func__, len + 1,
1065 gatt_process_notification(tcb, op_code, len, p_data);
1089 /* The message has to be smaller than the agreed MTU, len does not count
1091 if (len >= tcb.payload_size) {
1093 "%s: invalid response pkt size: %d, PDU size: %d", __func__, len + 1,
1099 gatt_process_error_rsp(tcb, p_clcb, op_code, len, p_data);
1103 gatt_process_mtu_rsp(tcb, p_clcb, len, p_data);
1107 gatt_process_read_info_rsp(tcb, p_clcb, op_code, len, p_data);
1112 gatt_process_read_by_type_rsp(tcb, p_clcb, op_code, len, p_data);
1118 gatt_process_read_rsp(tcb, p_clcb, op_code, len, p_data);
1122 gatt_process_find_type_value_rsp(tcb, p_clcb, len, p_data);
1130 gatt_process_prep_write_rsp(tcb, p_clcb, op_code, len, p_data);