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
0
votes
0 answers
Linux Kernel Netlink - Receive MDB Callback Argument
#define NETLINK_MDB 30
struct sock *netlink_sk = NULL;
static int receive_message(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack)
{
int pid;
void *data = NULL;
pid = nlh->nlmsg_pid;
data =…
0
votes
1 answer
Userspace use Generic Netlink Library pass NLA_NESTED data to kernel error
How to fill NLA_NESTED data in the Userspace Generic Netlink Library data and send to the kernel? please help me
This is my code :
void *msg_h = genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, m_id, 0, 0,
…

zyy
- 1
- 1
0
votes
1 answer
Source analysis iw (.handler = (_handler),)
I'm reading the source code iw and
I'm stucked in this struct.
I dont't understand what these code mean? (.handler = (_handler), etc...)
How can I understand that or any documents to learn that.
static struct cmd \
…

tân Hoàng
- 1
- 1
0
votes
0 answers
How to redirect network traffic to a tcp/udp connection in golang
So I've seen projects like trojan-go,v2ray-go
They are making their own proxy protocols in user space level. I am trying to do the same thing but I don't know how to redirect network traffic from clients to proxy server.
Basically I don't understand…

danial dehvan
- 187
- 1
- 15
0
votes
0 answers
Armbian - Netlink operation failed: netlink support not available
i have a problem with usb modem & armbian on Rock64.
I have fresh image of Armbian 22.08 Jammy on my Rock64 hardware.
I plugged in DWM-222 (D-link usb gsm modem), installed usb-modeswitch & modem-manager
and i have created connection with…

Zbyšek Zapadlík
- 343
- 3
- 11
0
votes
1 answer
Switch channel of active AP via netlink returns "Invalid input data or parameter"
Running the following program via: ./main 0 5220 gives me an error that my input data is out of range.
sudo ./main 0 5220
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
…

precla
- 36
- 5
0
votes
0 answers
Does generic netlink needs a kernel module for creating a custom family first?
I'm writing userspace IPC with generic netlink(API in libnl) since I never tried it before. Most code I found are about kernel & user space IPC, And their generic netlink family are registered in that kernel module.
I expect not to write a kernel…

narsilx
- 1
0
votes
0 answers
How is the WiFi Security Protocol (WPA, WPA2, etc) Determined from Network Beacons?
I know APs and surrounding networks send out Beacon Frames periodically which contain information about themselves. This can include Capability Information, RSN etc... What information from the Beacon is used to determine the method of encryption…

Khaled Q
- 1
0
votes
0 answers
How to change Linux kernel configuration in docker image?
I'm trying to catch processes' fork() and exec() event details for some security purposes. And then I found this question: How to detect the launching of programs on Linux?
I built a monitor program in docker container with image alpine, and run it…

Notealot
- 23
- 5
0
votes
1 answer
Can a process running inside Ubuntu Docker container communicate with Kernel process of host
I have a process running inside the Docker container (base image - Ubuntu 18.04). Is it possible to set up a Netlink socket with the Kernel process of the Host (running Ubuntu 18.04)? What are the ways to achieve this?
Docker Client:
Version: …

aagora
- 125
- 2
- 6
0
votes
1 answer
IWD ap not starting: START_AP failed: -95
Interface is set to AP mode.
When turning on ap it is giving "Operation not supported".
[iwd]# ap wlan0 start "start_wpa2" password
Operation not supported
Output of iwd -d:
src/netdev.c:netdev_link_notify() event 16 on ifindex…

ritik garg
- 11
- 3
0
votes
1 answer
How kernel know which driver to be called when we are calling any socket from user-space?
I am using IWD as a wireless daemon in userspace. Driver and firmware are loaded.
When the socket is called by IWD using nl80211, it passes to nl80211 and than cfg80211 in kernel space. At kernel space how do they know which driver to call or pass…

ritik garg
- 11
- 3
0
votes
0 answers
can I tell the network interface type with RTNETLINK?
I'm using RTNETLINK to identify the current gateway, so as to remember the firewall settings based on the Access Point I'm connected to.
WLAN connections give an ESSID that I can use for this purpose, but LAN connections don't, so I fallback to…

la Fleur
- 426
- 3
- 11
0
votes
0 answers
ss -it command description for retransmissions (retrans) and packet loss
I have a requirement of monitoring network for my kubernetes cluster and I am using netlink package written in Go to do it. https://github.com/vishvananda/netlink
I am able to parse all the fields in tcpInfo type mentioned here…

Varun Jain
- 63
- 2
- 10
0
votes
1 answer
What netlink messages does docker set the container's interface name and how can it be changed?
I am trying to set the name of the interface inside the a container via netlink. IE: eth0 I want set to mang0.
Inside the container the root user gets permissions errors when they try to change the interface's…

Liam Kelly
- 3,524
- 1
- 17
- 41