2008-10-17 14:51:31

by alok barsode

[permalink] [raw]
Subject: Questions regarding NetLink APIs.

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.



2008-10-30 13:10:13

by alok barsode

[permalink] [raw]
Subject: [PATCH] NetLink patches.

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.


Attachments:
0001-Adding-net-bluetooth-netlink.c-for-netlink-support.patch (2.55 kB)
0002-Registering-general-netlink-family-bluetooth.patch (1.26 kB)
Download all attachments

2008-10-23 04:48:38

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Questions regarding NetLink APIs.

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