If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.
Netlink-Sockets
BoxMatrix >> System >> Netlink-Sockets | @ BoxMatrix - IRC-Chat - Translate: de es fr it nl pl |
News | Selectors | Models | Accessories | Components | Environment | Config | Commands | System | Webif | Software | Develop | Lexicon | Community | Project | Media |
Devices | Filesystems | Partitions | Sockets | Netlink | Pipes | Interfaces | Bridges | Ports | Events | Sources | Sinks | AVMIPC | Processes | Watchdogs | Memory | Slab | Vmalloc | ProcFS | SysFS | Research |
Netlink sockets are similar to Linux-Sockets just they are not files in the filesystem so they don't have names. They only could be identified by the PID of the owner process, which is 0 for <kernel> internal sockets. Linux-Sockets rely on a running filessystem so they are used for communication between userspace processes. Netlink sockets don't have any dependency to devices, filesystems or network stacks, so they work at any time and could be used in kernel and userspace and between both.
Netlink sockets are grouped into protocol families for different purposes, which have names and could be listed here. For the dependencies the name of the owner process PID could be gathered for sockets of each family. This is not safe since these PIDs need to be unique and only the first socket created by a process can inherit its PID, further sockets of the same process get random unique IDs. These unresolvable dependencies are marked While Linux-Sockets can only unicast (one socket at each end) netlink sockets can additionally multicast. This is handled by a bitmask of up to 32 multicasting groups per family, each bit representing one group. |
Netlink-Sockets[edit]
Goto: Netlink-Families - Netlink-Groups - FRITZ!OS - TODO
Netlink-Families[edit]
Daily updated index of all netlink families found scanning Supportdata2 probes. Last update: 2024-11-14 05:16 GMT.
The label (netlink)
in the Netlink-Family
column shows there are other objects in this wiki using this name.
The Mod
column shows the amount of models using the respective family. Click the column header to sort by this number.
This list only covers netlink families found in FRITZ!OS *so far*. This list may grow with more Supportdata2 probes.
Families 23-31 are custom families which could be created by the Kernel function netlink_kernel_create
, see here,
Netlink-Family | Mod | Firmware | Description | Subscribers | Groups | Type | Origin |
---|---|---|---|---|---|---|---|
NETLINK_AUDIT | 23 | 5.20 - 7.90 | Kernel part of the Linux Audit Subsystem (#9) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_CONNECTOR | 3 | 7.29 - 7.90 | TODO (#11) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_CRYPTO | 17 | 6.87 - 7.90 | Send configuration to or request ciphers from the Kernel Crypto API (#21) | (kernel) (0x0), wland (0x1) | 0x0, 0x1 | Family | Linux |
NETLINK_DM | 21 | 5.04 - 7.90 | Events from the Linux Device-Mapper Framework (#17) | (kernel) (0x0), (unknown) (0x0), dispatcher (0x0), wland (0x1) | 0x0, 0x1 | Family | Linux |
NETLINK_ECRYPTFS | 16 | 6.87 - 7.90 | Enterprise Cryptographic Filesystem file open events (#19) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_23 | 1 | 7.39 - 7.51 | TODO (#23) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_24 | 14 | 7.01 - 7.90 | TODO (#24) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_25 | 4 | 7.17 - 7.51 | TODO (#25) | (kernel) (0x0), ssk (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_28 | 3 | 7.29 - 7.90 | TODO (#28) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_29 | 15 | 7.01 - 7.90 | TODO (#29) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_30 | 2 | 7.17 - 7.51 | TODO (#30) | (kernel) (0x0), (unknown) (0x0) | 0x0 | Family | Linux |
NETLINK_FAMILY_31 | 17 | 6.04 - 7.90 | TODO (#31) | (kernel) (0x0), (unknown) (0x0), (unknown) (0x1), hspotap (0x0), wland (0x0), wland (0x1), wlmngr2 (0x0), wps_monitor (0x0) | 0x0, 0x1 | Family | Linux |
NETLINK_FIB_LOOKUP | 35 | 4.33 - 7.90 | Kernel Forwarding Information Base (FIB) lookup (#10) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_FIREWALL | 6 | 4.33 - 6.55 | Transport IPv4 packets from netfilter to user space (#3) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_GENERIC | 30 | 5.04 - 7.90 | Generic Netlink (genetlink) family for simplified netlink usage (#16) | (kernel) (0x0), (unknown) (0x0), (unknown) (0x1e0), (unknown) (0x2), (unknown) (0x20), (unknown) (0x3c0), (unknown) (0x3e0), (unknown) (0x40), (unknown) (0x8000), (unknown) (0x8001), (unknown) (0x8004), (unknown) (0x8008), (unknown) (0xFFFFFFFF), avmike (0x8008), cloudmsgd (0x8008), ctlmgr (0x8001), ctlmgr (0x8004), ctlmgr (0x8008), ctlmgr (0x8010), ctlmgr (0xFFFFFFFF), dsld (0x8008), dsld (0x8010), l2tpv3d (0x8000), multid (0x8001), multid (0x8004), multid (0x8008), multid (0x8010), multid (0xFFFFFFFF), nltest (0x8000), pcpd (0x8001), pcpd (0x8004), pcpd (0x8008), pcpd (0x8010), pcpd (0xFFFFFFFF), voipd (0x8008), voipd (0x8010), vpnd (0x8008), vpnd (0x8010) | 0x0, 0x1e0, 0x2, 0x20, 0x3c0, 0x3e0, 0x40, 0x8000, 0x8001, 0x8004, 0x8008, 0x8010, 0xFFFFFFFF | Family | Linux |
NETLINK_KOBJECT_UEVENT | 35 | 4.33 - 7.90 | Kernel messages to userspace (#15) | (kernel) (0x0), (unknown) (0x0), (unknown) (0x1), alw_zb_gw_app (0x2), udevd (0x0), udevd (0x1) | 0x0, 0x1, 0x2 | Family | Linux |
NETLINK_NETFILTER | 2 | 7.17 - 7.51 | TODO (#12) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_RDMA | 2 | 7.29 - 7.39 | Infiniband Remote Direct Memory Access (RDMA) packets (#20) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_ROUTE | 37 | 4.07 - 7.90 | Communication channel between routing dæmons and the kernel packet forwarding (#0) | (kernel) (0x0), (unknown) (0x0), (unknown) (0x1), (unknown) (0x11), (unknown) (0x3), (unknown) (0x4), (unknown) (0x41), (unknown) (0x440), (unknown) (0x550), (unknown) (0x551), (unknown) (0x55b), aha (0x551), aha (0x55b), avmipc_remote_link (0x55b), avmnexusd (0x55b), cableinfo (0x55b), ctlmgr (0x551), ctlmgr (0x55b), ddnsd (0x55b), deviceinfod (0x55b), dsld (0x551), dsld (0x55b), hostapd (0x1), igdd (0x551), l2tpv3d (0x551), l2tpv3d (0x55b), latencyd (0x55b), multid (0x200055b), multid (0x200055f), multid (0x551), multid (0x55b), nltest (0x55b), pcpd (0x551), pcpd (0x55b), psetd (0x55b), pumaglued (0x55b), rextd (0x200055b), rextd (0x55b), ssk (0x1), upnpd (0x551), upnpd (0x55b), upnpdevd (0x551), usermand (0x55b), voipd (0x551), voipd (0x55b), vpnd (0x55b), wland (0x1), wland (0x3), wpa_supplicant (0x1), wsdd (0x55b) | 0x0, 0x1, 0x11, 0x200055b, 0x200055f, 0x3, 0x4, 0x41, 0x440, 0x550, 0x551, 0x55b | Family | Linux |
NETLINK_SMC | 9 | 7.29 - 7.90 | Monitoring of Shared Memory Communications over RDMA (SMC-R) and RoCE (#22) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_SOCK_DIAG | 15 | 4.07 - 7.90 | Query information about sockets of various protocol families (#4) | (kernel) (0x0) | 0x0 | Family | Linux |
NETLINK_USERSOCK | 23 | 4.07 - 7.90 | User mode socket protocols (#2) | (kernel) (0x0), (unknown) (0x0), oamd (0x0) | 0x0 | Family | Linux |
NETLINK_XFRM | 15 | 7.17 - 7.90 | Packet Transform (IPsec) (#6) | (kernel) (0x0) | 0x0 | Family | Linux |
23 netlink families |
Netlink-Groups[edit]
Daily updated index of all multicasting groups found scanning Supportdata2 probes. Last update: 2024-11-14 05:16 GMT.
The label (nlgroup)
in the Netlink-Group
column shows there are other objects in this wiki using this name.
The Mod
column shows the amount of models using the respective group. Click the column header to sort by this number.
This list only covers netlink groups found in FRITZ!OS *so far*. This list likely grows with more Supportdata2 probes.
FRITZ!OS[edit]
procfs[edit]
There's a procfs interface to netlink at:
/proc/net/netlink /proc/<pid>/net/netlink # pid may be 'self' /proc/<pid>/task/<id>/net/netlink
These all contain the same table, the list of all netlink sockets in the system.
root@fritz0:/var/mod/root# cat /proc/net/netlink sk Eth Pid Groups Rmem Wmem Dump Locks Drops Inode ... cee61100 0 1816 0000055b 0 0 0 2 0 7473 ... ce62bfc0 0 3022784190 00000000 0 0 0 2 0 2002
From line 2682+ in net/netlink/af_netlink.c (blame, raw):
seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8u %-8lu\n", s, # sk Address of the socket structure s->sk_protocol, # Eth Bit number of the Netlink-Family nlk->portid, # Pid Port id, <pid> or random number nlk->groups ? (u32)nlk->groups[0] : 0, # Groups Bit mask of subscribed Netlink-Groups sk_rmem_alloc_get(s), # Rmem sk_wmem_alloc_get(s), # Wmem nlk->cb_running, # Dump refcount_read(&s->sk_refcnt), # Locks atomic_read(&s->sk_drops), # Drops sock_i_ino(s) # Inode
In net/netlink/af_netlink.h (blame, raw) the portid
is defined unsigned u32
. It is printed %-10u
. 0xFFFFFFFF
is 4,294,967,295
, a 10 digit number. Normally portid
is the PID of the process owning the socket, but it may as well be
a huge number,
libewnwlinux[edit]
See the NETLINK_GENERIC article.
libnl[edit]
In fw 7.14 AVM started to add the libnl-3.so netlink socket API suite to FRITZ!OS.
It includes a set or libraries to handle different socket families, and is mainly used by third party commands.
- libnl-3.so - Netlink Core API
- libnl-cli-3.so - Command Line Interface API
- libnl-genl-3.so - Generic Netlink - NETLINK_GENERIC
- libnl-idiag-3.so - Inet / Sock Diag - NETLINK_SOCK_DIAG
- libnl-nf-3.so - Netfilter - NETLINK_NETFILTER
- libnl-route-3.so - Routing Family - NETLINK_ROUTE
- libnl-xfrm-3.so - Packet Transform (IPsec) - NETLINK_XFRM
See also the Netlink Protocol Library Suite (libnl) docs.
TODO[edit]
Find more details about these families:
- NETLINK_USERSOCK
- NETLINK_FAMILY_23
- NETLINK_FAMILY_24
- NETLINK_FAMILY_25
- NETLINK_FAMILY_28
- NETLINK_FAMILY_29
- NETLINK_FAMILY_30
- NETLINK_FAMILY_31
Find more details about these groups:
- AVMGGRP_UNKNOWN_0001
- AVMGGRP_UNKNOWN_0008
- AVMGGRP_UNKNOWN_0040
- AVMGGRP_UNKNOWN_0080
- AVMGGRP_UNKNOWN_0100
- AVMGGRP_UNKNOWN_0200
- NLGRP_FAMILY31_MC1