lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 27 May 2007 09:34:27 -0400
From:	jamal <>
	"Zhang Rui" <>
Subject: Fwd: [PATCH] [-mm] ACPI: export ACPI events via netlink

I can never get these web-browser email clients to work well.
Sorry for sending fscking html earlier.


---------- Forwarded message ----------
From: jamal <>
Date: May 27, 2007 9:29 AM
Subject: Re: [PATCH] [-mm] ACPI: export ACPI events via netlink
To: Zhang Rui <>

On 5/27/07, Zhang Rui <> wrote:
> I need to write a user application to test my patch.
> Netlink messages can be sent/received using the standard socket API.


> But how to receive Genetlink messages from specified genetlink family?
> There is no socket ACPI with such a parameter, right?

Each module has a unique identifier that it receives dynamically on
 insertion at the kernel.

> Do I have to receive all the genetlink messages first?

 No, just the ones for your dynamic id. Try what i described first for
 kernel side on the earlier email. I will repeat it here for clarity.
Then look at genl code and if you have questions i can
Note: You need to discover your dynamic id (the iproute2/genl code has a stub
example code)
 As i told you in the earlier email, in your development:
 - start first by just writting your kernel side.
 - Then use the genl utility - which is part of iproute2 to see if the
 kernel side is "discoverable".

 E.g if i wanted to "discover" currently loaded modules on my laptop, i
 would do this:

 hadi@...sol:~$ genl ctrl ls

 Name: nlctrl
         ID: 0x10  Version: 0x2  header size: 0  max attribs: 6
         commands supported:
                 #1:  ID-0x3  flags-0xe

 Name: nl80211
         ID: 0x11  Version: 0x1  header size: 0  max attribs: 22
         commands supported:
                 #1:  ID-0x1  flags-0xa
                 #2:  ID-0x6  flags-0xa
                 #3:  ID-0x8  flags-0xa
                 #4:  ID-0x3  flags-0xb
                 #5:  ID-0x4  flags-0xb
                 #6:  ID-0x5  flags-0xb
                 #7:  ID-0xa  flags-0xb
                 #8:  ID-0xb  flags-0xa
                 #9:  ID-0xf  flags-0xb
                 #10:  ID-0x10  flags-0xa
                 #11:  ID-0x12  flags-0xb
                 #12:  ID-0x13  flags-0xa
                 #13:  ID-0x15  flags-0xa
                 #14:  ID-0x19  flags-0xb
                 #15:  ID-0x17  flags-0xb
                 #16:  ID-0x18  flags-0xb
                 #17:  ID-0x1a  flags-0xb
                 #18:  ID-0x1b  flags-0xa
                 #19:  ID-0xd  flags-0xb

         ID: 0x12  Version: 0x1  header size: 0  max attribs: 4
         commands supported:
                 #1:  ID-0x1  flags-0xa

 As you can see, i can see from user space the name of the kernel end
 point, its numeric id, what version it is running (so i can make sure
 user space is compatible), what extra header it may have, what the
 maximum number of attributes it can take. The last thing that gets
 listed is the commands, and flags for those commands.

 Lets load tipc kernel module and repeat...


 hadi@...sol:~$ sudo modprobe tipc
 Name: nlctrl
         ID: 0x10  Version: 0x2  header size: 0  max attribs: 6
         commands supported:
                 #1:  ID-0x3  flags-0xe

 [same as before]

 Name: TIPC
         ID: 0x13  Version: 0x1  header size: 8  max attribs: 0
         commands supported:
                 #1:  ID-0x1  flags-0x2


> It would be great if there are any examples on user space communication.

Bug Thomas - he has written some simple example. I also have some but i
 changed laptops and i have to go and dig it up for you.
 I do have plans for making this easier for people - but havent had time.
 If there is persistence - or someone out there wants to be a hero email
 me privately and i will explain it.

> Or should I use libnl library instead?

Why am i answering all these questions if you are fine with using libnl?
Last time you said you couldnt use a library, no?


> Thanks,
> Rui.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists