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.
Questions tagged [netlink]
337 questions
1
vote
1 answer
How to asynchronously check if an ipv6 network interface changes state from tentative to "valid" in linux?
Before and after an IPv6 address is assigned, it goes through various states, such as tentative address, duplicate address, and preferred address. These address states are applicable to both manually and automatically configured addresses.
I have a…

dmytro.poliarush
- 383
- 4
- 11
1
vote
0 answers
Libnl compatibility with kernel version
Is there any dependency between libnl and kernel version? I am using kernel version 4.1. What is the stable and suitable version of recommended libnl version for this kernel?
Is the latest libnl version(3.4.0) compatible with older kernel verions…

Subhajit
- 43
- 9
1
vote
2 answers
netlink sequence numbers out of sequence
I'm using the netlink and genetlink Go packages to write a utility to interact with the MAC80211_HWSIM netlink family functions. It's working well ... almost.
I'm finding that if I do a GET_RADIO call, the next call into the family fails to validate…

Danek Duvall
- 367
- 2
- 12
1
vote
1 answer
Retrieving the netnsid of a network namespace in Python
When trying to find the correct peer network interface of a veth pair that lives in a different namespace, that end is not only indicated by its iflink property, but also by a link-netnsid. This link-netnsid is a network namespace ID which is only…

TheDiveO
- 2,183
- 2
- 19
- 38
1
vote
2 answers
How to insert VLAN tag on outgoing packet
I am working on insert vlan tags for some client macs on outgoing packets via native vlan. I have tried nh_hooks IN, OUT and Forward but didnt get any success.
What i want is either i can add tag to packet from client to native vlan and then send…

Raheel
- 21
- 2
- 4
1
vote
0 answers
Why does tap interface status always show as down through netlink (libnl)?
I have a network namespace named name1.
I executed the command "ip netns exec name1 ip tuntap add mode tap name tap0".
I see the creation of tap0 through netlink message.
I executed "ip netns exec name1 ifconfig tap0 up".
I still see the interface…

Aks
- 11
- 1
1
vote
1 answer
netlink on ClearOS 7.3 issue
I am trying following simple program on ClearOS 7.3, 64 bit
#include
#include
#include
#include
#include
#include
int main()
{
int flags =0;
int bus =…

Vikram
- 11
- 2
1
vote
0 answers
nlmsg_new fails to allocate buffer
I have a kernel module and a corresponding userspace module which use Netlink to communicate. The following code is used in the kernel module to send data to userspace:
int msglen = len - FRAME_PACKET_HEADER_SIZE;
struct sk_buff* skb =…

trigger
- 108
- 7
1
vote
1 answer
deleting ipv4 address belongs to the same subnet from linux interface using netlink API
I am using netlink API rtnl_addr_delete to delete the ipv4 address configured on interface in Linux. Two IPs belonging to the same subnet are configured to an interface.
When i delete the first configured IP, both IPs are getting deleted which is…

Khrusos
- 35
- 6
1
vote
1 answer
kernel-space user-space communication with netlink
My objective is to have an array or list in kernel memory at all times, so that it is always accessible from kernel-space. To do this, I am using netlink sockets as recommended here. I follow this example, which shows how to send a string. I am not…

Alkesh
- 61
- 1
- 3
- 9
1
vote
0 answers
Generic Netlink unicast from kernel to user fails (-111)
(Linux 4.4)
I am trying to get a kernel module to send information to a user process over a Generic Netlink. It seems that the message is not successfully received by the user process - the nlmsg_unicast function returns with -111.
Here is what I…

Yaron Shragai
- 137
- 11
1
vote
1 answer
How kernel knows the presence of netlink in userspace?
I am working on netlink sockets, written code for application and kernel module. Kernel module will send notifications regularly to user space application. If application gets killed, kernel module doesn't stop sending notification. How the kernel…

madhusudan rao
- 11
- 2
1
vote
1 answer
Linux Netlink Socket Communication Crashes VM
I have written a kernel module and userspace program such that the kernel module sends netlink multicast messages, and the userspace program reads these messages and prints them out. The kernel module and userspace program are available here…

akn320
- 573
- 4
- 13
1
vote
1 answer
Is there a way to query specific interface using netlink?
From what I understand, sending a RTM_GETLINK request dumps all the interface on the system. I am interested in a specific interface only. Is there a way that I can set my request to give me all the information about a particular interface? I know…

Denil Vira
- 25
- 8
1
vote
0 answers
Netlink broadcast b/w 2 kernel module and 1 userspace process.
Is it possible for user space to broadcast or multicast to more then one (2) kernel modules via NETLINK socket?

Trishansh Bhardwaj
- 478
- 4
- 16