* netlink question
@ 2002-04-10 11:20 Balazs Scheidler
2002-04-11 11:41 ` jamal
0 siblings, 1 reply; 8+ messages in thread
From: Balazs Scheidler @ 2002-04-10 11:20 UTC (permalink / raw)
To: netdev
Hi,
As I need to communicate between two parts of the kernel (a core TCP part,
and a loaded module), Andi suggested to use netlink for this purpose.
Since I'm not too familiar with Netlink (and I saw only userspace-kernel
communication using netlink), I'd need some introductory material about
netlink. Is some information about the subject available? Sample code would
be sufficient as well.
I've tried google but didn't find too much until now, so some help would be
appreciated.
TIA,
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: netlink question
2002-04-10 11:20 Balazs Scheidler
@ 2002-04-11 11:41 ` jamal
0 siblings, 0 replies; 8+ messages in thread
From: jamal @ 2002-04-11 11:41 UTC (permalink / raw)
To: Balazs Scheidler; +Cc: netdev
On Wed, 10 Apr 2002, Balazs Scheidler wrote:
> Hi,
>
> As I need to communicate between two parts of the kernel (a core TCP part,
> and a loaded module), Andi suggested to use netlink for this purpose.
>
> Since I'm not too familiar with Netlink (and I saw only userspace-kernel
> communication using netlink), I'd need some introductory material about
> netlink. Is some information about the subject available? Sample code would
> be sufficient as well.
>
Look at notifier_chain_un/register(),un/register_netdevice_notifier(),
and their usage. You could also look at the usage of netdev_state_change()
cheers,
jamal
^ permalink raw reply [flat|nested] 8+ messages in thread
* netlink question
@ 2009-02-10 20:33 Giacomo
0 siblings, 0 replies; 8+ messages in thread
From: Giacomo @ 2009-02-10 20:33 UTC (permalink / raw)
To: netfilter-devel
Dear netfilter list.
I would like to ask you about a strange issue.
I wrote a software that communicates with kernel space via the netlink socket.
A data structure of 212 byte (+16 byte of netlink header) used to
travel from user to kernel space and viceversa
without any problem.
Inside kernel space, socket buffer is allocated with alloc_skb
together with GFP_ATOMIC flag.
Since a couple of fields in the structure have changed
from __u32 source_ip to __u32 source_ip[50];
and equivalently __u32 dest_ip became __u32 dest_ip[50];
__u16 sport; -> __u16 sport[50];
__u16 dport; -> __u16 dport[50];
kernel began to crash, reporting, among other messages "scheduling
while atomic".
The data structure is now grown up to 788bytes (+16 netlink header).
I introduced in the functions responsible of netlink communication
some printks reporting the value of
in_atomic();
while with little data structures I always read in_atomic() == 0, in
the same actions, but with the bigger
data structure, sometimes i read in_atomic() == 1
Is there a possible reason for this behaviour?
If yes, how should the behaviour be corrected?
Thanks in advance.
Giacomo, Italy.
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
* Aprile 2008: iqfire-wall, un progetto
open source che implementa un
filtro di pacchetti di rete per Linux,
e` disponibile per il download qui:
http://sourceforge.net/projects/ipfire-wall
* Informazioni e pagina web ufficiale:
http://www.giacomos.it/iqfire/index.html
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Netlink Question
@ 2014-08-11 19:21 C. McPherson
2014-08-12 8:42 ` Arend van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: C. McPherson @ 2014-08-11 19:21 UTC (permalink / raw)
To: backports
I have some private WiFi ioctl's that are associated with a couple of
drivers and I would like to convert those private ioctl's into netlink.
Does anyone know if there is any documentation on this or a URL that I
could reference before I attempt?
Thanks in advance
Clyde
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Netlink Question
2014-08-11 19:21 Netlink Question C. McPherson
@ 2014-08-12 8:42 ` Arend van Spriel
2014-08-12 9:32 ` Krishna Chaitanya
0 siblings, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2014-08-12 8:42 UTC (permalink / raw)
To: C. McPherson; +Cc: backports, linux-wireless@vger.kernel.org
+ linux-wireless
Not really a backports question so adding linux-wireless
On 08/11/2014 09:21 PM, C. McPherson wrote:
> I have some private WiFi ioctl's that are associated with a couple of
> drivers and I would like to convert those private ioctl's into netlink.
> Does anyone know if there is any documentation on this or a URL that I
> could reference before I attempt?
I guess the "private WiFi ioctl's" you are referring to are the ones
used in Android wpa_supplicant driver_cmd lib? There is no real cookbook
on how to add nl80211 commands (maybe I am wrong here), but there are
sufficient patches to be found in the linux-wireless archive. A recent
one about key management offload adds a couple of commands and
attributes which may give an idea what is needed:
http://mid.gmane.org/1406076875-8549-1-git-send-email-clanctot@qca.qualcomm.com
Obviously, you need to modify the "couple of drivers" to deal with the
nl80211 netlink commands.
Regards,
Arend
> Thanks in advance
> Clyde
>
> --
> To unsubscribe from this list: send the line "unsubscribe backports" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Netlink Question
2014-08-12 8:42 ` Arend van Spriel
@ 2014-08-12 9:32 ` Krishna Chaitanya
2014-08-13 19:01 ` C. McPherson
0 siblings, 1 reply; 8+ messages in thread
From: Krishna Chaitanya @ 2014-08-12 9:32 UTC (permalink / raw)
To: Arend van Spriel; +Cc: C. McPherson, backports, linux-wireless@vger.kernel.org
On Tue, Aug 12, 2014 at 2:12 PM, Arend van Spriel <arend@broadcom.com> wrote:
>
> + linux-wireless
>
> Not really a backports question so adding linux-wireless
>
> On 08/11/2014 09:21 PM, C. McPherson wrote:
>>
>> I have some private WiFi ioctl's that are associated with a couple of
>> drivers and I would like to convert those private ioctl's into netlink.
>> Does anyone know if there is any documentation on this or a URL that I
>> could reference before I attempt?
>
>
> I guess the "private WiFi ioctl's" you are referring to are the ones used in Android wpa_supplicant driver_cmd lib? There is no real cookbook on how to add nl80211 commands (maybe I am wrong here), but there are sufficient patches to be found in the linux-wireless archive. A recent one about key management offload adds a couple of commands and attributes which may give an idea what is needed:
>
> http://mid.gmane.org/1406076875-8549-1-git-send-email-clanctot@qca.qualcomm.com
>
> Obviously, you need to modify the "couple of drivers" to deal with the nl80211 netlink commands.
>
We had same requirement in our driver, we have patched the iw to send
custom commands specific to our hardware and used NL80211_CMD_TESTMODE
to process and send it to driver.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Netlink Question
2014-08-12 9:32 ` Krishna Chaitanya
@ 2014-08-13 19:01 ` C. McPherson
2014-08-14 8:18 ` Arend van Spriel
0 siblings, 1 reply; 8+ messages in thread
From: C. McPherson @ 2014-08-13 19:01 UTC (permalink / raw)
To: Krishna Chaitanya, Arend van Spriel
Cc: backports, linux-wireless@vger.kernel.org
On 08/12/2014 05:32 AM, Krishna Chaitanya wrote:
> On Tue, Aug 12, 2014 at 2:12 PM, Arend van Spriel <arend@broadcom.com> wrote:
>> + linux-wireless
>>
>> Not really a backports question so adding linux-wireless
>>
>> On 08/11/2014 09:21 PM, C. McPherson wrote:
>>> I have some private WiFi ioctl's that are associated with a couple of
>>> drivers and I would like to convert those private ioctl's into netlink.
>>> Does anyone know if there is any documentation on this or a URL that I
>>> could reference before I attempt?
>>
>> I guess the "private WiFi ioctl's" you are referring to are the ones used in Android wpa_supplicant driver_cmd lib? There is no real cookbook on how to add nl80211 commands (maybe I am wrong here), but there are sufficient patches to be found in the linux-wireless archive. A recent one about key management offload adds a couple of commands and attributes which may give an idea what is needed:
>>
>> http://mid.gmane.org/1406076875-8549-1-git-send-email-clanctot@qca.qualcomm.com
>>
>> Obviously, you need to modify the "couple of drivers" to deal with the nl80211 netlink commands.
>>
> We had same requirement in our driver, we have patched the iw to send
> custom commands specific to our hardware and used NL80211_CMD_TESTMODE
> to process and send it to driver.
> --
> To unsubscribe from this list: send the line "unsubscribe backports" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Yeah thanks a lot, I could use NL80211_CMD_TESTMODE, I'll have to check
that out. I was also thinking about using NL80211_CMD_VENDOR. These
IOCTL's are not and will not be used by wpa_supplicant (but I will check
out the URL you sent), they are just some custom commands we use with
several chipsets.
-Clyde
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Netlink Question
2014-08-13 19:01 ` C. McPherson
@ 2014-08-14 8:18 ` Arend van Spriel
0 siblings, 0 replies; 8+ messages in thread
From: Arend van Spriel @ 2014-08-14 8:18 UTC (permalink / raw)
To: C. McPherson, Krishna Chaitanya; +Cc: backports, linux-wireless@vger.kernel.org
On 08/13/2014 09:01 PM, C. McPherson wrote:
>
> On 08/12/2014 05:32 AM, Krishna Chaitanya wrote:
>> On Tue, Aug 12, 2014 at 2:12 PM, Arend van Spriel <arend@broadcom.com>
>> wrote:
>>> + linux-wireless
>>>
>>> Not really a backports question so adding linux-wireless
>>>
>>> On 08/11/2014 09:21 PM, C. McPherson wrote:
>>>> I have some private WiFi ioctl's that are associated with a couple of
>>>> drivers and I would like to convert those private ioctl's into netlink.
>>>> Does anyone know if there is any documentation on this or a URL that I
>>>> could reference before I attempt?
>>>
>>> I guess the "private WiFi ioctl's" you are referring to are the ones
>>> used in Android wpa_supplicant driver_cmd lib? There is no real
>>> cookbook on how to add nl80211 commands (maybe I am wrong here), but
>>> there are sufficient patches to be found in the linux-wireless
>>> archive. A recent one about key management offload adds a couple of
>>> commands and attributes which may give an idea what is needed:
>>>
>>> http://mid.gmane.org/1406076875-8549-1-git-send-email-clanctot@qca.qualcomm.com
>>>
>>>
>>> Obviously, you need to modify the "couple of drivers" to deal with
>>> the nl80211 netlink commands.
>>>
>> We had same requirement in our driver, we have patched the iw to send
>> custom commands specific to our hardware and used NL80211_CMD_TESTMODE
>> to process and send it to driver.
>> --
>> To unsubscribe from this list: send the line "unsubscribe backports" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> Yeah thanks a lot, I could use NL80211_CMD_TESTMODE, I'll have to check
> that out. I was also thinking about using NL80211_CMD_VENDOR. These
> IOCTL's are not and will not be used by wpa_supplicant (but I will check
> out the URL you sent), they are just some custom commands we use with
> several chipsets.
If you are using recent kernel or backports package, I would say go for
the vendor command. It is quite similar to TESTMODE except that it is
always enabled, ie. not depending on kernel config.
However, if the custom commands would add functionality that might be
interesting to linux-wireless drivers in general you may consider adding
them as nl80211 commands.
Regards,
Arend
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-14 8:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 19:21 Netlink Question C. McPherson
2014-08-12 8:42 ` Arend van Spriel
2014-08-12 9:32 ` Krishna Chaitanya
2014-08-13 19:01 ` C. McPherson
2014-08-14 8:18 ` Arend van Spriel
-- strict thread matches above, loose matches on Subject: below --
2009-02-10 20:33 netlink question Giacomo
2002-04-10 11:20 Balazs Scheidler
2002-04-11 11:41 ` jamal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.