Lines Matching refs:len

58 typedef UINT8 (*tAVDT_MSG_PRS)(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
77 static UINT8 avdt_msg_prs_none(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
78 static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
79 static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
80 static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
81 static UINT8 avdt_msg_prs_multi(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
82 static UINT8 avdt_msg_prs_security_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
83 static UINT8 avdt_msg_prs_discover_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
84 static UINT8 avdt_msg_prs_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
85 static UINT8 avdt_msg_prs_all_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
86 static UINT8 avdt_msg_prs_security_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
87 static UINT8 avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, UINT8 *p, UINT16 len);
272 UINT8 len; in avdt_msg_bld_cfg() local
296 len = p_cfg->codec_info[0] + 1; in avdt_msg_bld_cfg()
297 if( len > AVDT_CODEC_SIZE ) in avdt_msg_bld_cfg()
298 len = AVDT_CODEC_SIZE; in avdt_msg_bld_cfg()
300 memcpy(*p, p_cfg->codec_info, len); in avdt_msg_bld_cfg()
301 *p += len; in avdt_msg_bld_cfg()
308 len = p_cfg->protect_info[0] + 1; in avdt_msg_bld_cfg()
309 if( len > AVDT_PROTECT_SIZE ) in avdt_msg_bld_cfg()
310 len = AVDT_PROTECT_SIZE; in avdt_msg_bld_cfg()
312 memcpy(*p, p_cfg->protect_info, len); in avdt_msg_bld_cfg()
313 *p += len; in avdt_msg_bld_cfg()
470 memcpy(*p, p_msg->security_cmd.p_data, p_msg->security_cmd.len); in avdt_msg_bld_security_cmd()
471 *p += p_msg->security_cmd.len; in avdt_msg_bld_security_cmd()
565 memcpy(*p, p_msg->security_rsp.p_data, p_msg->security_rsp.len); in avdt_msg_bld_security_rsp()
566 *p += p_msg->security_rsp.len; in avdt_msg_bld_security_rsp()
581 static UINT8 avdt_msg_prs_cfg(tAVDT_CFG *p_cfg, UINT8 *p, UINT16 len, UINT8* p_elem, UINT8 sig_id) in avdt_msg_prs_cfg() argument
604 p_end = p + len; in avdt_msg_prs_cfg()
779 static UINT8 avdt_msg_prs_none(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_none() argument
783 UNUSED(len); in avdt_msg_prs_none()
798 static UINT8 avdt_msg_prs_single(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_single() argument
803 if (len != AVDT_LEN_SINGLE) in avdt_msg_prs_single()
830 static UINT8 avdt_msg_prs_setconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_setconfig_cmd() argument
837 if (len < AVDT_LEN_SETCONFIG_MIN) in avdt_msg_prs_setconfig_cmd()
861 len -= 2; in avdt_msg_prs_setconfig_cmd()
862 …err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, &p_msg->hdr.err_param, AVDT_SIG_SETCONFIG); in avdt_msg_prs_setconfig_cmd()
889 static UINT8 avdt_msg_prs_reconfig_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_reconfig_cmd() argument
896 if (len < AVDT_LEN_RECONFIG_MIN) in avdt_msg_prs_reconfig_cmd()
911 len--; in avdt_msg_prs_reconfig_cmd()
912 … err = avdt_msg_prs_cfg(p_msg->config_cmd.p_cfg, p, len, &p_msg->hdr.err_param, AVDT_SIG_RECONFIG); in avdt_msg_prs_reconfig_cmd()
940 static UINT8 avdt_msg_prs_multi(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_multi() argument
948 if (len < AVDT_LEN_MULTI_MIN || (len > AVDT_NUM_SEPS)) in avdt_msg_prs_multi()
955 for (i = 0; i < len; i++) in avdt_msg_prs_multi()
982 static UINT8 avdt_msg_prs_security_cmd(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_security_cmd() argument
987 if (len < AVDT_LEN_SECURITY_MIN) in avdt_msg_prs_security_cmd()
1002 p_msg->security_cmd.len = len - 1; in avdt_msg_prs_security_cmd()
1019 static UINT8 avdt_msg_prs_discover_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_discover_rsp() argument
1027 if (p_msg->discover_rsp.num_seps > (len / 2)) in avdt_msg_prs_discover_rsp()
1029 p_msg->discover_rsp.num_seps = (len / 2); in avdt_msg_prs_discover_rsp()
1064 static UINT8 avdt_msg_prs_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_svccap() argument
1067 …UINT8 err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, &p_msg->hdr.err_param, AVDT_SIG_GETCAP… in avdt_msg_prs_svccap()
1087 static UINT8 avdt_msg_prs_all_svccap(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_all_svccap() argument
1089 …UINT8 err = avdt_msg_prs_cfg(p_msg->svccap.p_cfg, p, len, &p_msg->hdr.err_param, AVDT_SIG_GET_AL… in avdt_msg_prs_all_svccap()
1108 static UINT8 avdt_msg_prs_security_rsp(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_security_rsp() argument
1111 p_msg->security_rsp.len = len; in avdt_msg_prs_security_rsp()
1157 static UINT8 avdt_msg_prs_delay_rpt (tAVDT_MSG *p_msg, UINT8 *p, UINT16 len) in avdt_msg_prs_delay_rpt() argument
1162 if (len != AVDT_LEN_DELAY_RPT) in avdt_msg_prs_delay_rpt()
1164 … AVDT_TRACE_WARNING("avdt_msg_prs_delay_rpt expected len: %u got: %u", AVDT_LEN_DELAY_RPT, len); in avdt_msg_prs_delay_rpt()
1219 curr_msg_len = p_ccb->p_curr_msg->len; in avdt_msg_send()
1230 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) in avdt_msg_send()
1238 (p_ccb->p_curr_msg->len > p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) in avdt_msg_send()
1242 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) / in avdt_msg_send()
1255 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1257 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1261 (p_ccb->p_curr_msg->len > (p_tbl->peer_mtu - AVDT_LEN_TYPE_CONT))) in avdt_msg_send()
1276 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1278 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1295 curr_msg_len -= p_buf->len; in avdt_msg_send()
1319 p_ccb->p_curr_msg->len -= p_buf->len; in avdt_msg_send()
1320 p_ccb->p_curr_msg->offset += p_buf->len; in avdt_msg_send()
1324 p_buf->len += hdr_len; in avdt_msg_send()
1368 if (p_buf->len < avdt_msg_pkt_type_len[pkt_type]) in avdt_msg_asmbl()
1401 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1404 p_ccb->p_rx_msg->len -= 1; in avdt_msg_asmbl()
1425 p_buf->len -= AVDT_LEN_TYPE_CONT; in avdt_msg_asmbl()
1428 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) in avdt_msg_asmbl()
1440 (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len); in avdt_msg_asmbl()
1444 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1445 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1451 p_ccb->p_rx_msg->offset += p_buf->len; in avdt_msg_asmbl()
1452 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1499 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_cmd()
1509 memcpy(p, (UINT8 *) p_scb, p_buf->len); in avdt_msg_send_cmd()
1564 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_rsp()
1626 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_rej()
1667 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_grej()
1734 else if ((msg_type == AVDT_MSG_TYPE_REJ) && (p_buf->len == AVDT_LEN_GEN_REJ)) in avdt_msg_ind()
1766 p_buf->len -= AVDT_LEN_TYPE_SINGLE; in avdt_msg_ind()
1800 msg.hdr.err_code = err = (*avdt_msg_prs_cmd[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()
1805 msg.hdr.err_code = err = (*avdt_msg_prs_rsp[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()