Marcel,
I had a few queries regarding the netlink APIs. I have been referring to
net/wireless/nl80211.c for reference.
1. Would the ioctls on raw sock(BTPROTO_HCI), be converted into netlink
commands?
eg HCIGETDEVLIST (NLBLUETOOTH_CMD_GET_DEVLIST),
HCIGETDEVINFO (NLBLUETOOTH_CMD_GET_DEV_INFO),
HCIDEVUP (NLBLUETOOTH_CMD_DEVUP) .. etc
2. Would the netlink attributes consist of HCI Ioctl requests
structures ? or individual structure members?
eg:
[NLBLUETOOTH_ATTR_DEV_INFO] = {.len = sizeof(struct hci_dev_info)}
3. Would it be a separate kernel module?
Thanks,
Alok.
Marcel,
Attaching 2 patches for netlink support.
1. Adds net/bluetooth/netlink.c for netlink support with initialization
and exit functions.
2. Registers a generic netlink family "bluetooth".
Let me know if anything needs to be modified.
Thanks,
Alok.
Hi Alok,
> I had a few queries regarding the netlink APIs. I have been referring to
> net/wireless/nl80211.c for reference.
>
> 1. Would the ioctls on raw sock(BTPROTO_HCI), be converted into netlink
> commands?
> eg HCIGETDEVLIST (NLBLUETOOTH_CMD_GET_DEVLIST),
> HCIGETDEVINFO (NLBLUETOOTH_CMD_GET_DEV_INFO),
> HCIDEVUP (NLBLUETOOTH_CMD_DEVUP) .. etc
yes.
> 2. Would the netlink attributes consist of HCI Ioctl requests
> structures ? or individual structure members?
> eg:
>
> [NLBLUETOOTH_ATTR_DEV_INFO] = {.len = sizeof(struct hci_dev_info)}
No. We will have the parameters inside the structure as direct
attributes.
> 3. Would it be a separate kernel module?
No. It will be within bluetooth.ko.
Regards
Marcel