[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: btuart and SOCKET Bluetooth CF
On Wed, 20 Jan 2010, KIYOHARA Takashi wrote:
> > Further, I think for simplicity you don't need to interpret the HCI packet
> > header directly during output, just use the m->m_pkthdr.len value which is
> > correct.
> What do you meaning?
> Please more explain.
+ hci_acldata_hdr_t hdr;
this "hdr" is not needed, we don't need to examine the packet to find that
information, as the type and length values are already known..
+ m_copydata(m, 0, sizeof(hdr), &hdr);
so, not needed
+ m_adj(m, sizeof(hdr.type));
+ dtlh->type = hdr.type | BTUART_DTL_HEADER_TYPE;
dtlh->type = HCI_ACL_DATA_PKT | BTUART_DTL_HEADER_TYPE;
+ dtlh->len =
+ htole16(sizeof(hdr) - sizeof(hdr.type) + le16toh(hdr.length));
dtlh->len = htole16(m->m_pkthdr.len);
Main Index |
Thread Index |