<div dir="ltr">just to say that I've a better understanding of netlink and that I solved the problem though I can't point out the problem since I've made many changes.<br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, Mar 27, 2013 at 8:14 PM, Teto <span dir="ltr"><<a href="mailto:mattator@gmail.com" target="_blank">mattator@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there,<br>
<br>
I am quite new to kernel development and netlink. I am trying to get a<br>
linux module communicate with an userspace daemon. It is hard to find<br>
up to date documentation or tutorials so I came up (with difficulty)<br>
with the following code but I am not sure if this is the recommanded<br>
way (I've seen people using netlink_kernel_create but I don't use it<br>
for instnace). The problem is that my module should print a message<br>
on dmesg via printk when it receives a netlink packet but nothing<br>
happens.<br>
<br>
<br>
A lot of code follows but it shouldn't be too hard to read for netlink<br>
specialists such as yourselves since it's mainly copy/paste of<br>
examples on the Internet, that is very classical without any personal<br>
logic.<br>
<br>
<br>
================================================<br>
==== USER SPACE CODE: lig_daemon.c ===<br>
================================================<br>
#include <netlink/netlink.h><br>
#include <netlink/genl/genl.h><br>
#include <netlink/genl/ctrl.h><br>
#include <netlink/genl/mngt.h><br>
#include <stdlib.h><br>
#include <stdio.h><br>
#include"../lig_module/lig_module.h"<br>
<br>
<br>
static int parse_cb(struct nl_msg *msg, void *arg)<br>
{<br>
printf("callbacl called\n");<br>
// return genl_handle_msg(msg, NULL);<br>
}<br>
<br>
<br>
<br>
int main()<br>
{<br>
struct nl_sock *sk = 0;<br>
int ret = 0;<br>
int family_id = 0;<br>
// struct sk_buff *skb = 0;<br>
void *msg_head;<br>
<br>
struct nl_msg *msg;<br>
struct s_lig_result *user_hdr;<br>
<br>
<br>
printf("Starting LIG DAEMON\n");<br>
<br>
sk = nl_socket_alloc();<br>
<br>
if(!sk) {<br>
printf("could not allocate socket\n");<br>
return EXIT_FAILURE;<br>
}<br>
<br>
<br>
if(nl_connect(sk, NETLINK_GENERIC) != 0)<br>
{<br>
printf("could not connect socket\n");<br>
goto fail_connect;<br>
<br>
}<br>
<br>
<br>
/** 2nd parameter refers to family name defined in <a href="http://gnl_family.name" target="_blank">gnl_family.name</a> */<br>
family_id = genl_ctrl_resolve (sk, LIG_FAMILY_NAME);<br>
if(family_id < 0 )<br>
{<br>
printf("error obtaining family\n");<br>
goto failure;<br>
}<br>
<br>
printf("Family No:\t%d\n", family_id);<br>
<br>
<br>
if (!(msg = nlmsg_alloc()))<br>
{<br>
printf("Could not allocate a new message");<br>
goto failure;<br>
}<br>
<br>
<br>
user_hdr = genlmsg_put(msg,<br>
NL_AUTO_PORT, /* port Netlink port<br>
or NL_AUTO_PORT */<br>
NL_AUTO_SEQ, /* Sequence number of<br>
message or NL_AUTO_SEQ*/<br>
family_id, /* Numeric family identifier*/<br>
0,<br>
<br>
0, /* flags (optional ) */<br>
ELC_RESULTS, /* command identifier */<br>
VERSION_NR /* version */<br>
);<br>
<br>
<br>
if (!user_hdr)<br>
{<br>
printf("Could not generate a new message");<br>
goto failure;<br>
<br>
}<br>
<br>
ret = nla_put_string(msg, ELA_EID, "stuff");<br>
if(ret != 0)<br>
{<br>
printf("Could not add string");<br>
goto skb_failure;<br>
}<br>
<br>
// else we fill the struct<br>
// user_hdr->number_of_remote_rlocs = 2;<br>
// user_hdr->number_of_local_rlocs = 1;<br>
<br>
<br>
<br>
<br>
/* finalize the message */<br>
<br>
ret =nl_send_auto ( sk, msg);<br>
<br>
/* send message (skb, pid) */<br>
if(ret < 0)<br>
{<br>
printf("Could not send message");<br>
goto skb_failure;<br>
}<br>
<br>
<br>
nl_socket_modify_cb( sk, NL_CB_VALID, NL_CB_CUSTOM, parse_cb, NULL);<br>
<br>
<br>
//returns -10 => NLE_OPNOTSUPP<br>
ret = nl_recvmsgs_default( sk );<br>
printf("After receive %i.\n", ret);<br>
if( ret < 0)<br>
{<br>
printf("Error: %s\n", nl_geterror(ret) );<br>
}<br>
<br>
<br>
<br>
<br>
// free allocated struct<br>
nlmsg_free(msg);<br>
nl_socket_free(sk);<br>
<br>
<br>
printf("End of DAEMON\n");<br>
return EXIT_SUCCESS;<br>
<br>
<br>
<br>
skb_failure:<br>
nlmsg_free(msg);<br>
<br>
failure:<br>
fail_connect:<br>
nl_socket_free(sk);<br>
<br>
<br>
return EXIT_FAILURE;<br>
}<br>
<br>
<br>
<br>
================================================<br>
==== KERNEL MODULE CODE: lig_module.h, just a bunch of definitions ===<br>
================================================<br>
#ifndef LIG_MODULE_H<br>
#define LIG_MODULE_H<br>
<br>
<br>
<br>
<br>
/* attributes (variables): the index in this enum is used as a<br>
reference for the type,<br>
* userspace application has to indicate the corresponding type<br>
* the policy is used for security considerations<br>
*/<br>
enum E_LIG_ATTRIBUTE {<br>
ELA_RLOCS_NUMBER,<br>
ELA_EID,<br>
ELA_MAX<br>
<br>
};<br>
<br>
<br>
/* protocol version */<br>
#define VERSION_NR 1<br>
<br>
/*the name of this family, used by userspace application */<br>
#define LIG_FAMILY_NAME "LIG_FAMILY"<br>
<br>
/* commands: enumeration of all commands (functions),<br>
* used by userspace application to identify command to be ececuted<br>
*/<br>
enum E_LIG_COMMAND {<br>
ELC_REQUEST_RLOCS_FOR_EID,<br>
ELC_RESULTS,<br>
ELC_MAX,<br>
};<br>
<br>
struct s_lig_result {<br>
int number_of_remote_rlocs;<br>
int number_of_local_rlocs;<br>
};<br>
<br>
struct s_lig_request {<br>
int remote_eid;<br>
int local_eid;<br>
// int number_of_local_rlocs;<br>
};<br>
<br>
<br>
#endif<br>
<br>
================================================<br>
==== KERNEL MODULE CODE: lig_module.c, just a bunch of definitions ===<br>
================================================<br>
<br>
<br>
#include <linux/genetlink.h><br>
#include <net/genetlink.h><br>
#include <linux/module.h><br>
#include <linux/kernel.h><br>
#include "lig_module.h"<br>
<br>
<br>
#define MAX_STRING 16<br>
#define MAX_TAB 16<br>
<br>
<br>
//static int entier;<br>
static char destinationIP[MAX_STRING];<br>
<br>
//! Path towards the lig program<br>
static char programPath[100];<br>
<br>
// sock<br>
//static struct sock *nl_sk = NULL;<br>
<br>
module_param_string(destinationIP, destinationIP, sizeof(destinationIP), 0644);<br>
module_param_string(programPath, programPath, sizeof(programPath), 0644);<br>
<br>
MODULE_PARM_DESC(destinationIP, "EID we want to retrieve the RLOC number for");<br>
MODULE_PARM_DESC(programPath, "Path towards the userspace lig program<br>
this module calls ?");<br>
<br>
<br>
<br>
MODULE_DESCRIPTION("lig_module");<br>
MODULE_LICENSE("GPL");<br>
<br>
<br>
<br>
/* attribute policy: defines which attribute has which type (e.g int,<br>
char * etc)<br>
* possible values defined in net/netlink.h<br>
*/<br>
static struct nla_policy lig_policy[ ELA_MAX ] = {<br>
[ELA_RLOCS_NUMBER] = { .type = NLA_UNSPEC, .len = 120 },<br>
[ELA_EID] = { .type = NLA_UNSPEC , .len = 120}<br>
};<br>
<br>
<br>
/* family definition */<br>
static struct genl_family lig_gnl_family = {<br>
.id = GENL_ID_GENERATE, /* genetlink should generate an id */<br>
.hdrsize = 0,<br>
.name = LIG_FAMILY_NAME, /*the name of this family, used by<br>
userspace application */<br>
.version = VERSION_NR, //version number<br>
.maxattr = ELA_MAX,<br>
};<br>
<br>
<br>
<br>
/* an echo command, receives a message, prints it and sends another<br>
message back */<br>
int handle_results(struct sk_buff *skb_2, struct genl_info *info)<br>
{<br>
struct nlattr *na;<br>
struct sk_buff *skb;<br>
int rc;<br>
void *msg_head;<br>
char * mydata;<br>
<br>
if (info == NULL)<br>
goto out;<br>
<br>
printk("call to %s in reaction to %d \n",__func__, info->snd_pid );<br>
<br>
/*for each attribute there is an index in info->attrs which points<br>
to a nlattr structure<br>
*in this structure the data is given<br>
*/<br>
na = info->attrs[ELA_RLOCS_NUMBER];<br>
if (na)<br>
{<br>
mydata = (char *)nla_data(na);<br>
<br>
if (mydata == NULL)<br>
printk("error while receiving data\n");<br>
else<br>
printk(KERN_NOTICE "received: %s\n", mydata);<br>
}<br>
else<br>
{<br>
printk("no info->attrs %i\n", ELA_RLOCS_NUMBER);<br>
}<br>
<br>
<br>
/* send a message back*/<br>
/* allocate some memory, since the size is not yet known use<br>
NLMSG_GOODSIZE*/<br>
skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);<br>
<br>
if (skb == NULL)<br>
goto out;<br>
<br>
/* create the message headers */<br>
/* arguments of genlmsg_put:<br>
struct sk_buff *,<br>
int (sending) pid,<br>
int sequence number,<br>
struct genl_family *,<br>
int flags,<br>
u8 command index (why do we need this?)<br>
*/<br>
/*<br>
* Payload Format:<br>
* <---------------------- nlmsg_len(nlh) ---------------------><br>
* <------ hdrlen ------> <- nlmsg_attrlen(nlh, hdrlen) -><br>
* +----------------------+- - -+--------------------------------+<br>
* | Family Header | Pad | Attributes |<br>
* +----------------------+- - -+--------------------------------+<br>
*/<br>
<br>
msg_head = genlmsg_put(skb, 0, info->snd_seq+1, &lig_gnl_family, 0,<br>
ELC_REQUEST_RLOCS_FOR_EID);<br>
<br>
if (msg_head == NULL) {<br>
rc = -ENOMEM;<br>
goto out;<br>
}<br>
/* add a DOC_EXMPL_A_MSG attribute (actual value to be sent) */<br>
rc = nla_put_string(skb, ELA_EID, "hello world from kernel space\n");<br>
if (rc != 0)<br>
goto out;<br>
<br>
/* finalize the message */<br>
genlmsg_end(skb, msg_head);<br>
<br>
/* send the message back */<br>
// rc = genlmsg_unicast( skb, info->snd_pid );<br>
if (rc != 0)<br>
goto out;<br>
return 0;<br>
<br>
out:<br>
printk("an error occured in %s:\n",__func__);<br>
<br>
return 0;<br>
}<br>
<br>
<br>
<br>
<br>
/*<br>
commands: mapping between the command enumeration and the actual function<br>
<br>
*/<br>
struct genl_ops lig_ops[ELC_MAX] = {<br>
<br>
{<br>
.cmd = ELC_REQUEST_RLOCS_FOR_EID,<br>
.flags = 0,<br>
.policy = lig_policy,<br>
.doit = handle_results, /* cb function */<br>
.dumpit = NULL, /* cb function */<br>
} ,<br>
{<br>
.cmd = ELC_RESULTS,<br>
.flags = 0,<br>
.policy = lig_policy,<br>
.doit = handle_results, /* cb function */<br>
.dumpit = NULL, /* cb function */<br>
}<br>
};<br>
<br>
<br>
<br>
<br>
static int __init init_lig_module(void)<br>
{<br>
int rc;<br>
printk("LIG MODULE initialization\n");<br>
<br>
/*register new family*/<br>
rc = genl_register_family(&lig_gnl_family);<br>
if (rc != 0){<br>
genl_unregister_family(&lig_gnl_family);<br>
rc = genl_register_family(&lig_gnl_family);<br>
if (rc != 0)<br>
goto failure;<br>
}<br>
<br>
<br>
/*register functions (commands) of the new family*/<br>
rc = genl_register_ops(&lig_gnl_family, lig_ops);<br>
if (rc != 0){<br>
printk(KERN_WARNING "could not register ops: %i\n",rc);<br>
genl_unregister_family(&lig_gnl_family);<br>
goto failure;<br>
}<br>
<br>
<br>
<br>
return 0;<br>
<br>
<br>
<br>
failure:<br>
printk(KERN_ERR "an error occured while inserting the generic<br>
netlink example module\n");<br>
return -1;<br>
<br>
}<br>
<br>
static void __exit cleanup_lig_module(void)<br>
{<br>
<br>
int ret = 0;<br>
<br>
printk(KERN_INFO "cleanup_lig_module() called\n");<br>
<br>
/* do not forget to unregister family<br>
returns 0 on success<br>
unregister operations as well<br>
*/<br>
ret = genl_unregister_family(&lig_gnl_family);<br>
if( ret != 0)<br>
{<br>
printk(KERN_WARNING "Could not unregister family, error: %d\n", ret);<br>
}<br>
<br>
}<br>
<br>
<br>
module_init( init_lig_module );<br>
module_exit( cleanup_lig_module );<br>
<br>
<br>
<br>
=====================================================<br>
==== the debug output of the userspace application "lig_daemon" ====<br>
=====================================================<br>
teto@tatooine:~/lig_daemon$ NLCB=debug lig_daemon<br>
Starting LIG DAEMON<br>
-- Debug: Sent Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 20<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 773 <REQUEST,ACK,ROOT,MATCH><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
03 01 00 00 ....<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 116<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 7 octets<br>
6e 6c 63 74 72 6c 00 nlctrl.<br>
[PADDING] 1 octets<br>
00 .<br>
[ATTR 01] 2 octets<br>
10 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
02 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
07 00 00 00 ....<br>
[ATTR 06] 20 octets<br>
14 00 01 00 08 00 01 00 03 00 00 00 08 00 02 00 0e 00 ..................<br>
00 00 ..<br>
[ATTR 07] 24 octets<br>
18 00 01 00 08 00 02 00 10 00 00 00 0b 00 01 00 6e 6f ................no<br>
74 69 66 79 00 00 tify..<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 232<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 10 octets<br>
4e 4c 42 4c 5f 4d 47 4d 54 00 NLBL_MGMT.<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 01] 2 octets<br>
11 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
03 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
0a 00 00 00 ....<br>
[ATTR 06] 160 octets<br>
14 00 01 00 08 00 01 00 01 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 02 00 08 00 01 00 02 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 03 00 08 00 01 00 03 00 00 00 08 00 ..................<br>
02 00 0c 00 00 00 14 00 04 00 08 00 01 00 04 00 00 00 ..................<br>
08 00 02 00 0b 00 00 00 14 00 05 00 08 00 01 00 05 00 ..................<br>
00 00 08 00 02 00 0b 00 00 00 14 00 06 00 08 00 01 00 ..................<br>
06 00 00 00 08 00 02 00 0a 00 00 00 14 00 07 00 08 00 ..................<br>
01 00 07 00 00 00 08 00 02 00 0c 00 00 00 14 00 08 00 ..................<br>
08 00 01 00 08 00 00 00 08 00 02 00 0a 00 00 00 ................<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 156<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 13 octets<br>
4e 4c 42 4c 5f 43 49 50 53 4f 76 34 00 NLBL_CIPSOv4.<br>
[PADDING] 3 octets<br>
00 00 00 ...<br>
[ATTR 01] 2 octets<br>
12 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
03 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
0c 00 00 00 ....<br>
[ATTR 06] 80 octets<br>
14 00 01 00 08 00 01 00 01 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 02 00 08 00 01 00 02 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 03 00 08 00 01 00 03 00 00 00 08 00 ..................<br>
02 00 0a 00 00 00 14 00 04 00 08 00 01 00 04 00 00 00 ..................<br>
08 00 02 00 0c 00 00 00 ........<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 232<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 11 octets<br>
4e 4c 42 4c 5f 55 4e 4c 42 4c 00 NLBL_UNLBL.<br>
[PADDING] 1 octets<br>
00 .<br>
[ATTR 01] 2 octets<br>
13 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
03 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
07 00 00 00 ....<br>
[ATTR 06] 160 octets<br>
14 00 01 00 08 00 01 00 03 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 02 00 08 00 01 00 04 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 03 00 08 00 01 00 05 00 00 00 08 00 ..................<br>
02 00 0c 00 00 00 14 00 04 00 08 00 01 00 06 00 00 00 ..................<br>
08 00 02 00 0b 00 00 00 14 00 05 00 08 00 01 00 07 00 ..................<br>
00 00 08 00 02 00 0b 00 00 00 14 00 06 00 08 00 01 00 ..................<br>
08 00 00 00 08 00 02 00 0c 00 00 00 14 00 07 00 08 00 ..................<br>
01 00 01 00 00 00 08 00 02 00 0b 00 00 00 14 00 08 00 ..................<br>
08 00 01 00 02 00 00 00 08 00 02 00 0a 00 00 00 ................<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 104<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 11 octets<br>
61 63 70 69 5f 65 76 65 6e 74 00 acpi_event.<br>
[PADDING] 1 octets<br>
00 .<br>
[ATTR 01] 2 octets<br>
14 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 07] 32 octets<br>
20 00 01 00 08 00 02 00 01 00 00 00 12 00 01 00 61 63 ...............ac<br>
70 69 5f 6d 63 5f 67 72 6f 75 70 00 00 00 pi_mc_group...<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 112<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 14 octets<br>
74 68 65 72 6d 61 6c 5f 65 76 65 6e 74 00 thermal_event.<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 01] 2 octets<br>
15 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 07] 36 octets<br>
24 00 01 00 08 00 02 00 02 00 00 00 16 00 01 00 74 68 $...............th<br>
65 72 6d 61 6c 5f 6d 63 5f 67 72 6f 75 70 02 00 00 00 ermal_mc_group....<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 68<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 10 octets<br>
56 46 53 5f 44 51 55 4f 54 00 VFS_DQUOT.<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 01] 2 octets<br>
16 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
06 00 00 00 ....<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 112<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 10 octets<br>
54 41 53 4b 53 54 41 54 53 00 TASKSTATS.<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 01] 2 octets<br>
17 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
04 00 00 00 ....<br>
[ATTR 06] 40 octets<br>
14 00 01 00 08 00 01 00 01 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 02 00 08 00 01 00 04 00 00 00 08 00 02 00 ..................<br>
0a 00 00 00 ....<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 1540<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 8 octets<br>
6e 6c 38 30 32 31 31 00 nl80211.<br>
[ATTR 01] 2 octets<br>
18 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
98 00 00 00 ....<br>
[ATTR 06] 1340 octets<br>
14 00 01 00 08 00 01 00 01 00 00 00 08 00 02 00 0e 00 ..................<br>
00 00 14 00 02 00 08 00 01 00 02 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 03 00 08 00 01 00 05 00 00 00 08 00 ..................<br>
02 00 0e 00 00 00 14 00 04 00 08 00 01 00 06 00 00 00 ..................<br>
08 00 02 00 0b 00 00 00 14 00 05 00 08 00 01 00 07 00 ..................<br>
00 00 08 00 02 00 0b 00 00 00 14 00 06 00 08 00 01 00 ..................<br>
08 00 00 00 08 00 02 00 0b 00 00 00 14 00 07 00 08 00 ..................<br>
01 00 09 00 00 00 08 00 02 00 0b 00 00 00 14 00 08 00 ..................<br>
08 00 01 00 0a 00 00 00 08 00 02 00 0b 00 00 00 14 00 ..................<br>
09 00 08 00 01 00 0b 00 00 00 08 00 02 00 0b 00 00 00 ..................<br>
14 00 0a 00 08 00 01 00 0c 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 0b 00 08 00 01 00 0e 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 0c 00 08 00 01 00 0f 00 00 00 08 00 ..................<br>
02 00 0b 00 00 00 14 00 0d 00 08 00 01 00 10 00 00 00 ..................<br>
08 00 02 00 0b 00 00 00 14 00 0e 00 08 00 01 00 11 00 ..................<br>
00 00 08 00 02 00 0e 00 00 00 14 00 0f 00 08 00 01 00 ..................<br>
12 00 00 00 08 00 02 00 0b 00 00 00 14 00 10 00 08 00 ..................<br>
01 00 13 00 00 00 08 00 02 00 0b 00 00 00 14 00 11 00 ..................<br>
08 00 01 00 14 00 00 00 08 00 02 00 0b 00 00 00 14 00 ..................<br>
12 00 08 00 01 00 15 00 00 00 08 00 02 00 0f 00 00 00 ..................<br>
14 00 13 00 08 00 01 00 16 00 00 00 08 00 02 00 0b 00 ..................<br>
00 00 14 00 14 00 08 00 01 00 17 00 00 00 08 00 02 00 ..................<br>
0b 00 00 00 14 00 15 00 08 00 01 00 18 00 00 00 08 00 ..................<br>
02 00 0b 00 00 00 14 00 16 00 08 00 01 00 19 00 00 00 ..................<br>
08 00 02 00 0b 00 00 00 14 00 17 00 08 00 01 00 1f 00 ..................<br>
00 00 08 00 02 00 0a 00 00 00 14 00 18 00 08 00 01 00 ..................<br>
1a 00 00 00 08 00 02 00 0b 00 00 00 14 00 19 00 08 00 ..................<br>
01 00 1b 00 00 00 08 00 02 00 0b 00 00 00 14 00 1a 00 ..................<br>
08 00 01 00 1c 00 00 00 08 00 02 00 0a 00 00 00 14 00 ..................<br>
1b 00 08 00 01 00 1d 00 00 00 08 00 02 00 0b 00 00 00 ..................<br>
14 00 1c 00 08 00 01 00 21 00 00 00 08 00 02 00 0b 00 ........!.........<br>
00 00 14 00 1d 00 08 00 01 00 20 00 00 00 08 00 02 00 .......... .......<br>
0c 00 00 00 14 00 1e 00 08 00 01 00 4b 00 00 00 08 00 ............K.....<br>
02 00 0b 00 00 00 14 00 1f 00 08 00 01 00 4c 00 00 00 ..............L...<br>
08 00 02 00 0b 00 00 00 14 00 20 00 08 00 01 00 25 00 .......... .....%.<br>
00 00 08 00 02 00 0b 00 00 00 14 00 21 00 08 00 01 00 ............!.....<br>
26 00 00 00 08 00 02 00 0b 00 00 00 14 00 22 00 08 00 &............."...<br>
01 00 27 00 00 00 08 00 02 00 0b 00 00 00 14 00 23 00 ..'.............#.<br>
08 00 01 00 28 00 00 00 08 00 02 00 0b 00 00 00 14 00 ....(.............<br>
24 00 08 00 01 00 2b 00 00 00 08 00 02 00 0b 00 00 00 $.....+...........<br>
14 00 25 00 08 00 01 00 2c 00 00 00 08 00 02 00 0b 00 ..%.....,.........<br>
00 00 14 00 26 00 08 00 01 00 2d 00 00 00 08 00 02 00 ....&.....-.......<br>
0f 00 00 00 14 00 27 00 08 00 01 00 2e 00 00 00 08 00 ......'...........<br>
02 00 0b 00 00 00 14 00 28 00 08 00 01 00 30 00 00 00 ........(.....0...<br>
08 00 02 00 0b 00 00 00 14 00 29 00 08 00 01 00 31 00 ..........).....1.<br>
00 00 08 00 02 00 0b 00 00 00 14 00 2a 00 08 00 01 00 ............*.....<br>
32 00 00 00 08 00 02 00 0c 00 00 00 14 00 2b 00 08 00 2.............+...<br>
01 00 34 00 00 00 08 00 02 00 0b 00 00 00 14 00 2c 00 ..4.............,.<br>
08 00 01 00 35 00 00 00 08 00 02 00 0b 00 00 00 14 00 ....5.............<br>
2d 00 08 00 01 00 36 00 00 00 08 00 02 00 0b 00 00 00 -.....6...........<br>
14 00 2e 00 08 00 01 00 37 00 00 00 08 00 02 00 0b 00 ........7.........<br>
00 00 14 00 2f 00 08 00 01 00 38 00 00 00 08 00 02 00 ..../.....8.......<br>
0b 00 00 00 14 00 30 00 08 00 01 00 39 00 00 00 08 00 ......0.....9.....<br>
02 00 0b 00 00 00 14 00 31 00 08 00 01 00 3a 00 00 00 ........1.....:...<br>
08 00 02 00 0b 00 00 00 14 00 32 00 08 00 01 00 3b 00 ..........2.....;.<br>
00 00 08 00 02 00 0b 00 00 00 14 00 33 00 08 00 01 00 ............3.....<br>
43 00 00 00 08 00 02 00 0b 00 00 00 14 00 34 00 08 00 C.............4...<br>
01 00 3d 00 00 00 08 00 02 00 0b 00 00 00 14 00 35 00 ..=.............5.<br>
08 00 01 00 3e 00 00 00 08 00 02 00 0a 00 00 00 14 00 ....>.............<br>
36 00 08 00 01 00 3f 00 00 00 08 00 02 00 0b 00 00 00 6.....?...........<br>
14 00 37 00 08 00 01 00 41 00 00 00 08 00 02 00 0b 00 ..7.....A.........<br>
00 00 14 00 38 00 08 00 01 00 42 00 00 00 08 00 02 00 ....8.....B.......<br>
0b 00 00 00 14 00 39 00 08 00 01 00 44 00 00 00 08 00 ......9.....D.....<br>
02 00 0b 00 00 00 14 00 3a 00 08 00 01 00 45 00 00 00 ........:.....E...<br>
08 00 02 00 0b 00 00 00 14 00 3b 00 08 00 01 00 49 00 ..........;.....I.<br>
00 00 08 00 02 00 0a 00 00 00 14 00 3c 00 08 00 01 00 ............<.....<br>
4a 00 00 00 08 00 02 00 0b 00 00 00 14 00 3d 00 08 00 J.............=...<br>
01 00 4f 00 00 00 08 00 02 00 0b 00 00 00 14 00 3e 00 ..O.............>.<br>
08 00 01 00 52 00 00 00 08 00 02 00 0b 00 00 00 14 00 ....R.............<br>
3f 00 08 00 01 00 51 00 00 00 08 00 02 00 0b 00 00 00 ?.....Q...........<br>
14 00 40 00 08 00 01 00 53 00 00 00 08 00 02 00 0b 00 ..@.....S.........<br>
00 00 14 00 41 00 08 00 01 00 54 00 00 00 08 00 02 00 ....A.....T.......<br>
0b 00 00 00 14 00 42 00 08 00 01 00 55 00 00 00 08 00 ......B.....U.....<br>
02 00 0b 00 00 00 14 00 43 00 08 00 01 00 57 00 00 00 ........C.....W...<br>
08 00 02 00 0b 00 00 00 ........<br>
[ATTR 07] 128 octets<br>
18 00 01 00 08 00 02 00 03 00 00 00 0b 00 01 00 63 6f ................co<br>
6e 66 69 67 00 00 18 00 02 00 08 00 02 00 04 00 00 00 nfig..............<br>
09 00 01 00 73 63 61 6e 00 00 00 00 1c 00 03 00 08 00 ....scan..........<br>
02 00 05 00 00 00 0f 00 01 00 72 65 67 75 6c 61 74 6f ..........regulato<br>
72 79 00 00 18 00 04 00 08 00 02 00 06 00 00 00 09 00 ry................<br>
01 00 6d 6c 6d 65 00 00 00 00 1c 00 05 00 08 00 02 00 ..mlme............<br>
07 00 00 00 0d 00 01 00 74 65 73 74 6d 6f 64 65 00 00 ........testmode..<br>
00 00 ..<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 92<br>
.nlmsg_type = 16 <genl/family::nlctrl><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
01 02 00 00 ....<br>
[ATTR 02] 11 octets<br>
4c 49 47 5f 46 41 4d 49 4c 59 00 LIG_FAMILY.<br>
[PADDING] 1 octets<br>
00 .<br>
[ATTR 01] 2 octets<br>
19 00 ..<br>
[PADDING] 2 octets<br>
00 00 ..<br>
[ATTR 03] 4 octets<br>
01 00 00 00 ....<br>
[ATTR 04] 4 octets<br>
00 00 00 00 ....<br>
[ATTR 05] 4 octets<br>
02 00 00 00 ....<br>
[ATTR 06] 20 octets<br>
14 00 01 00 08 00 01 00 00 00 00 00 08 00 02 00 0a 00 ..................<br>
00 00 ..<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: Received Message:<br>
-------------------------- BEGIN NETLINK MESSAGE ---------------------------<br>
[HEADER] 16 octets<br>
.nlmsg_len = 20<br>
.nlmsg_type = 3 <DONE><br>
.nlmsg_flags = 2 <MULTI><br>
.nlmsg_seq = 1364408051<br>
.nlmsg_pid = 13496<br>
[PAYLOAD] 4 octets<br>
00 00 00 00 ....<br>
--------------------------- END NETLINK MESSAGE ---------------------------<br>
-- Debug: End of multipart message block: type=DONE length=20<br>
flags=<MULTI> sequence-nr=1364408051 pid=13496<br>
End of DAEMON<br>
<br>
<br>
<br>
<br>
I hope it's not too much reading. I am running Ubuntu 12.10 with a<br>
3.5.0 kernel. Please tell me if you need more infos or if I should run<br>
a specific test.<br>
<br>
Best regards<br>
</blockquote></div><br></div>