Re: [PATCH bluez RFC 2/3] doc: hci-protocol: Add sock option BT_RCV_VENDOR_PKT for HCI_CHANNEL_USER
From: Luiz Augusto von Dentz
Date: Tue Jul 21 2026 - 10:17:15 EST
Hi Zijun,
On Tue, Jul 21, 2026 at 5:07 AM Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx> wrote:
>
> On 7/20/2026 10:10 PM, Luiz Augusto von Dentz wrote:
> >> +-----------------------------------
> >> +
> >> +Enable receiving vendor HCI frames, requires hci_channel to be set to
> >> +HCI_CHANNEL_USER.
> >> +
> >> +Default is disabled.
> >> +
> >> +Example:
> >> +
> >> +.. code-block::
> >> +
> >> + int enable = 1;
> >> + int err;
> >> +
> >> + err = setsockopt(fd, SOL_BLUETOOTH, BT_RCV_VENDOR_PKT, &enable,
> >> + sizeof(enable));
> >> +
> > I don't think we have any socket option with this name, besides this
> > should really go as an HCI packet with an H4 header set accordingly.
>
> Hi Luiz,
>
> I named it after BT_SNDMTU/BT_RCVMTU, but that may not be a good fit.
> Any preferred name?
> Happy to rename.
I mean we don't need it, you just prefix with packet type 0xff and the
kernel should accept it.
--
Luiz Augusto von Dentz