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 establish NOT static L2TPv3 socket connection over IP between two machines

I did not found any examples how to implement L2TPv3 over IP I found only a couple of open source implementations of L2TP which are: openL2TP: https://github.com/breed/openl2tp which does not support L2TPv3 and use UDP tunneldigger:…
0
votes
1 answer

mapping between upcall from a kernel vport and the userspace upcall threads

For the case that ovs uses kernel datapath, if there are 2 userspace upcall threads and 4 kernel vports, it seems (from source code 2.11.90), every vport will create only one netlink sock and binds it to every upcall thread's epoll_handler. The…
jikui
  • 3
  • 2
0
votes
0 answers

Kernel (Android) to Userspace message multicast error: netlink_broadcast_filtered+0x24/0x3d4

I am trying to develop a function which would enable the Kernel (Android kernel: 4.9.59) to send a message to an/many userspace application and I have followed this example: Kernel to userspace application communication However, when I am trying to…
Somdip Dey
  • 3,346
  • 6
  • 28
  • 60
0
votes
0 answers

Fatal error: net/sock.h: No such file or directory (Kernel - Userspace application communication) [C]

I am trying to develop a module to communicate between Kernel and Userspace application. I tried the answer provided in https://stackoverflow.com/a/25071310/4190159 The issue is I have the following code: #include #include…
Somdip Dey
  • 3,346
  • 6
  • 28
  • 60
0
votes
0 answers

Netlink sockets for Kernel to Userspace communication

I need a IPC between kernel and user-space communication. The kernel module should first initiate the communication to user-space module. I looked into various methods of kernel to user-space communication like IOCTL, char device, Netlink sockets.…
0
votes
0 answers

"Too short input for last message" with the netlink library

This issue is a about how to use the haskell netlink library. The casting (?) mechanism I have trouble with might be a more generic haskell problem, which is why I hope it's ok to ask here. I previously exposed my problem here:…
mattator
  • 319
  • 3
  • 12
0
votes
1 answer

Netlink notification for iptable modification are not received to application

I wrote a program to listen to iptables modification through netlink sockets, for this I used NETLINK_AUDIT family, when I execute the program and modify the iptables rule, program doesn't receive any message from kernel and it will be in blocking…
0
votes
0 answers

Can netlink be used for IPC between linux kernel and a kernel module?

I have a kernel module that receives data from userland using netlink socket. The kernel module in question is a standard (proprietary) one which has offered some hooks, that can be used for extending the module's functionality. The hooks are just…
dpaks
  • 375
  • 1
  • 13
0
votes
1 answer

netlink ipset list response format

I'm working on the golang netlink ipset control library. Everything is working fine except I have no idea how to parse the answer I'm getting from netlink for the list command. The data I'm getting obviously is what I'm looking for. But I'm not able…
0
votes
1 answer

configure network device with wireless extensions

I need to configure a network device in C on a linux host for an application. I read up on netlink, libnl and nl80211 which goes through cfg80211 and mac80211. I found out later that the driver for the device I am using does not support the mac80211…
user3258845
  • 111
  • 5
0
votes
1 answer

How to design an asynchronous handling of both nanomsg socket and tty or Netlink?

How can I write a main loop (in C for Linux system) which blocks while waiting for messages from multiple sources such as a ) a nanomsg socket and serial port, or b ) a nanomsg socket and Netlink socket? Where to start? I think I could poll the…
IgorJ
  • 1
  • 3
0
votes
1 answer

netlink_broadcast fail with return value -3

I can't broadcast netlink message to userspace by the following code. However, I can't find anything wrong. My userspace program can recieve broadcast message of other types, for example sock_fd=socket(PF_NETLINK, SOCK_RAW, NETLINK_KOBJECT_UEVENT);,…
river
  • 694
  • 6
  • 22
0
votes
1 answer

Use napi api with generic netlink sockets

I am currently going through the linux kernel (4.14) sources trying to find out whether the netdev NAPI can easily be used in combination with the generic netlink layer. It seems to me like this wasn't thought of when NAPI was introduced into the…
Spyro
  • 1
  • 3
0
votes
1 answer

Error in issuing Netlink command get_station

I want to get the station information using Netlink by libnl. I issue the command NL80211_CMD_GET_STATION. Before sending the message, I add attributes NL80211_ATTR_MAC and NL80211_ATTR_IFINDEX with their respective values per instructions in…
Masoud
  • 305
  • 1
  • 12
0
votes
1 answer

Getting a confirmation from kernel when setting from userspace

I am using nl80211 and Netlink sockets to send a message to the kernel to set something. To be specific, I am issuing vendor specified commands from userspace to set RF sector in wil6210 driver. For the set commands, the userspace application does…
Masoud
  • 305
  • 1
  • 12