Questions tagged [netlink]

Netlink is a socket based inter process communication protocol for Linux systems. It is currently the preferred way, as of 2.6, of communicating with user space from the kernel.

337 questions
0
votes
1 answer

How to monitoring a process on android

Does someone know if it is possible to dump all writes of a process does in the fileystem in android? Or at least the path where the process writes? I would like to monitor my application. I see the dalvik machine use netlink class to comunicate…
Bestbug
  • 475
  • 4
  • 13
0
votes
1 answer

What field corresponds to "dev" (device) param in netlink?

I'm trying to add a new route using the netlink package. The equivalent I need is ip route add $P1_NET dev $IF1 src $IP1 table $T1. The issue is that I don't know what field corresponds to the dev parameter. Is there a mapping somewhere or can I use…
Anthony Hunt
  • 1,470
  • 5
  • 20
  • 32
0
votes
1 answer

Does netlink use 'broadcast' for passing messages?

I am following netlink example on this question and answer. But, I don't see a sort of connection identifier in source codes. Say: Kernel my_nl_sock = netlink_kernel_create(&init_net, NETLINK_USERSOCK, 0, my_nl_rcv_msg, NULL,…
Jeon
  • 4,000
  • 4
  • 28
  • 73
0
votes
1 answer

Netlink socket, libnl - - nl_recvmsgs_default returning -22

I have similar problem as here: Netlink sockets and libnl - nl_recvmsgs_default returning -16 (EBUSY) But nl_recvmsgs_defaul() return this error value -22 (NLE_MSGTYPE_NOSUPPORT). Does anyone have an idea why I get this error? Here is example…
Andrej K
  • 41
  • 5
0
votes
1 answer

Retrieve user command in Linux PAM module

I write a pam module that is called when user execute the sudo command. I have already got the username, password, tty, but now, I have to get the user command to encrypt. If user exec sudo ls -l I have to get ls -l I have no pam app for my…
Aurel
  • 3
  • 3
0
votes
2 answers

Netlink socket creation returns NULL

I have been trying to implement a pretty simple netlink communication between a kernel module and a process. But it seems I'm stuck on creating the netlink socket on the kernel module. As I have understood from kernel 3.6 and up, the…
Talkopel
  • 27
  • 1
  • 5
0
votes
1 answer

System becomes unresponsive due to kernel oops (IP: dev_queue_xmit+0x256/0x3f4)

Linux system is consistently getting unresponsive with below serial console output. The similar serial console output is observed every time the issue is occurred. Steps to reproduce this issue are unknown as of now. But, this issue is not observed…
Amrit
  • 319
  • 1
  • 2
  • 9
0
votes
1 answer

Keep Netlink Socket open on kernel and User side

After I read some articles on netlink sockets, I tried to adopt this answer here Netlink SO. I added an endless loop to the userspace program: while (1) { memset(nlh, 0, NLMSG_SPACE(MAX_PAYLOAD)); iov.iov_base = (void *)nlh; iov.iov_len =…
Mailman
  • 1
  • 1
0
votes
2 answers

netlink and generic netlink protocol

I've already read generic netlink How-To, and the only major drawback of netlink, that I found, is that the number of protocol families is limited to MAX_LINKS (32), therefore they created generic netlink protocol. Is this the only reason? Does it…
Mark
  • 6,052
  • 8
  • 61
  • 129
0
votes
1 answer

How many netlink protocols are allowed to create?

I'm testing the following netlink example codes (kernel version 3.3.4) and found that module insertion would fail if NETLINK_PROTOCOL is set to a number greater than 31. module insert will be successful if NETLINK_PROTOCOL is set to…
PeopleMoutainPeopleSea
  • 1,492
  • 1
  • 15
  • 24
0
votes
1 answer

netlink interface stat goto cross initialization error

i am trying to read interface stats from the netlink library below is the code: #include #include #include #include #include using namespace std; int main(int argc, char…
krisdigitx
  • 7,068
  • 20
  • 61
  • 97
0
votes
1 answer

libnl 'invalid argument (-22) while trying using nl80211

I tried to extend the 'iw' utility to allow it to set the maximum and minimum size of the 802.11 contention window. But I'm always getting a 'invalid argument (-22)' returned. I edited phy.c of the iw-3.15 source and appended static int…
trichner
  • 840
  • 1
  • 11
  • 22
0
votes
2 answers

Is there any user level command to check whether a kernel image is supporting NETLINK in linux?

Without using any sample Netlink code is there any command or way to find out whether this kernel image is supporting Netlink or not. For eg. NETLINK_GENERIC and NETLINK_ISCSI appeared in Linux 2.6.15.(netlink(7)) so how I can see which Netlink…
Subhajit
  • 43
  • 9
0
votes
0 answers

What is RTN short for in RTN_LOCAL?

I am really confused with the name of RTN_LOCAL. It defined in linux/rtnetlink.h enum { RTN_UNSPEC, RTN_UNICAST, /* Gateway or direct route */ RTN_LOCAL, /* Accept locally */ RTN_BROADCAST, /* Accept locally as broadcast, …
firo
  • 1,002
  • 12
  • 20
0
votes
1 answer

Netlink giving kernel panic

I tried this program. This program send "hello" to kernel and kernel replies "hello" to user space again for one time. My requirement: user has to send "hello" and have to receive message for every 2 seconds. What I have tried. User app: added…
gangadhars
  • 2,584
  • 7
  • 41
  • 68