<s>
Netlink	B-Application
is	O
a	O
socket	B-Protocol
family	O
used	O
for	O
inter-process	B-Operating_System
communication	I-Operating_System
(	O
IPC	O
)	O
between	O
both	O
the	O
kernel	B-Operating_System
and	O
userspace	B-Operating_System
processes	O
,	O
and	O
between	O
different	O
userspace	B-Operating_System
processes	O
,	O
in	O
a	O
way	O
similar	O
to	O
the	O
Unix	B-Protocol
domain	I-Protocol
sockets	I-Protocol
available	O
on	O
certain	O
Unix-like	O
operating	B-General_Concept
systems	I-General_Concept
,	O
including	O
its	O
original	O
incarnation	O
as	O
a	O
Linux	B-Application
kernel	I-Application
interface	I-Application
,	O
as	O
well	O
as	O
in	O
the	O
form	O
of	O
a	O
later	O
implementation	O
on	O
FreeBSD	B-Operating_System
.	O
</s>
<s>
Similarly	O
to	O
the	O
Unix	B-Protocol
domain	I-Protocol
sockets	I-Protocol
,	O
and	O
unlike	O
INET	B-Protocol
sockets	I-Protocol
,	O
Netlink	B-Application
communication	O
cannot	O
traverse	O
host	O
boundaries	O
.	O
</s>
<s>
However	O
,	O
while	O
the	O
Unix	B-Protocol
domain	I-Protocol
sockets	I-Protocol
use	O
the	O
file	B-Application
system	I-Application
namespace	O
,	O
Netlink	B-Application
sockets	O
are	O
usually	O
addressed	O
by	O
process	B-Operating_System
identifiers	I-Operating_System
(	O
PIDs	O
)	O
.	O
</s>
<s>
Netlink	B-Application
is	O
designed	O
and	O
used	O
for	O
transferring	O
miscellaneous	O
networking	O
information	O
between	O
the	O
kernel	B-Operating_System
space	I-Operating_System
and	O
userspace	B-Operating_System
processes	O
.	O
</s>
<s>
Networking	O
utilities	O
,	O
such	O
as	O
the	O
iproute2	B-Protocol
family	O
and	O
the	O
utilities	O
used	O
for	O
configuring	O
mac80211-based	O
wireless	O
drivers	O
,	O
use	O
Netlink	B-Application
to	O
communicate	O
with	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
from	O
userspace	B-Operating_System
.	O
</s>
<s>
Netlink	B-Application
provides	O
a	O
standard	O
socket-based	O
interface	O
for	O
userspace	B-Operating_System
processes	O
,	O
and	O
a	O
kernel-side	O
API	B-Application
for	O
internal	O
use	O
by	O
kernel	B-Application
modules	I-Application
.	O
</s>
<s>
Originally	O
,	O
Netlink	B-Application
used	O
the	O
socket	B-Protocol
family	O
.	O
</s>
<s>
Netlink	B-Application
is	O
designed	O
to	O
be	O
a	O
more	O
flexible	O
successor	O
to	O
ioctl	B-Operating_System
;	O
describes	O
the	O
protocol	O
in	O
detail	O
.	O
</s>
<s>
Netlink	B-Application
was	O
created	O
by	O
Alexey	O
Kuznetsov	O
as	O
a	O
more	O
flexible	O
alternative	O
to	O
the	O
sophisticated	O
but	O
awkward	O
communication	O
method	O
used	O
for	O
setting	O
and	O
getting	O
external	O
socket	B-Protocol
options	O
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
continues	O
to	O
support	O
for	O
backward	O
compatibility	O
.	O
</s>
<s>
Netlink	B-Application
was	O
first	O
provided	O
in	O
the	O
2.0	O
series	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
implemented	O
as	O
a	O
character	O
device	O
.	O
</s>
<s>
By	O
2013	O
,	O
this	O
interface	O
is	O
obsolete	O
,	O
but	O
still	O
forms	O
an	O
ioctl	B-Operating_System
communication	O
method	O
;	O
compare	O
the	O
use	O
of	O
.	O
</s>
<s>
The	O
Netlink	B-Application
socket	B-Protocol
interface	O
appeared	O
in	O
2.2	O
series	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
In	O
2022	O
,	O
experimental	O
support	O
for	O
the	O
Netlink	B-Application
protocol	O
was	O
added	O
to	O
FreeBSD	B-Operating_System
.	O
</s>
<s>
Unlike	O
BSD	B-Protocol
sockets	I-Protocol
using	O
Internet	O
protocols	O
such	O
as	O
TCP	B-Protocol
,	O
where	O
the	O
message	O
headers	O
are	O
autogenerated	O
,	O
the	O
Netlink	B-Application
message	O
header	O
(	O
available	O
as	O
)	O
must	O
be	O
prepared	O
by	O
the	O
caller	O
.	O
</s>
<s>
The	O
Netlink	B-Application
socket	B-Protocol
generally	O
works	O
in	O
a	O
-like	O
mode	O
,	O
even	O
if	O
was	O
used	O
to	O
create	O
it	O
.	O
</s>
<s>
Each	O
interfaces	O
to	O
a	O
different	O
kernel	B-Operating_System
component	O
and	O
has	O
a	O
different	O
messaging	O
subset	O
.	O
</s>
<s>
The	O
subset	O
is	O
referenced	O
by	O
the	O
protocol	O
field	O
in	O
the	O
socket	B-Protocol
call	O
:	O
</s>
<s>
Lacking	O
a	O
standard	O
,	O
and	O
are	O
not	O
guaranteed	O
to	O
be	O
implemented	O
in	O
a	O
given	O
Linux	B-Application
(	O
or	O
other	O
OS	O
)	O
release	O
.	O
</s>
<s>
However	O
,	O
iproute2	B-Protocol
uses	O
both	O
interchangeably	O
.	O
</s>
<s>
This	O
information	O
is	O
used	O
primarily	O
for	O
user-space	B-Operating_System
routing	O
daemons	O
.	O
</s>
<s>
Linux	B-Application
implements	O
a	O
large	O
subset	O
of	O
messages	O
:	O
</s>
<s>
provides	O
an	O
interface	O
for	O
a	O
user-space	B-Operating_System
app	O
to	O
receive	O
packets	O
from	O
the	O
firewall	B-Application
.	O
</s>
<s>
provides	O
an	O
interface	O
used	O
to	O
communicate	O
between	O
Netfilter	B-Application
and	O
iptables	B-Application
.	O
</s>
<s>
provides	O
an	O
interface	O
to	O
manage	O
the	O
ARP	O
table	O
from	O
user-space	B-Operating_System
.	O
</s>
<s>
provides	O
an	O
interface	O
to	O
the	O
audit	O
subsystem	O
found	O
in	O
Linux	B-Operating_System
kernel	I-Operating_System
versions	O
2.6.6	O
and	O
later	O
.	O
</s>
<s>
provides	O
an	O
interface	O
to	O
transport	O
packets	O
from	O
netfilter	B-Application
to	O
user-space	B-Operating_System
.	O
</s>
<s>
provides	O
an	O
interface	O
to	O
manage	O
the	O
IPsec	B-Protocol
security	B-Protocol
association	I-Protocol
and	O
security	O
policy	O
databases	O
-	O
mostly	O
used	O
by	O
key-manager	O
daemons	O
using	O
the	O
Internet	B-Protocol
Key	I-Protocol
Exchange	I-Protocol
protocol	O
.	O
</s>
<s>
provides	O
the	O
interface	O
in	O
which	O
the	O
kernel	B-Operating_System
broadcasts	O
uevents	O
,	O
typically	O
consumed	O
by	O
udev	B-Application
.	O
</s>
<s>
One	O
of	O
the	O
drawbacks	O
of	O
the	O
Netlink	B-Application
protocol	O
is	O
that	O
the	O
number	O
of	O
protocol	O
families	O
is	O
limited	O
to	O
32	O
(	O
)	O
.This	O
is	O
one	O
of	O
the	O
main	O
reasons	O
that	O
the	O
generic	O
Netlink	B-Application
family	O
was	O
created	O
—	O
to	O
provide	O
support	O
for	O
adding	O
a	O
higher	O
number	O
of	O
families	O
.	O
</s>
<s>
It	O
acts	O
as	O
a	O
Netlink	B-Application
multiplexer	O
and	O
works	O
with	O
a	O
single	O
Netlink	B-Application
family	O
.	O
</s>
<s>
The	O
generic	O
Netlink	B-Application
protocol	O
is	O
based	O
on	O
the	O
Netlink	B-Application
protocol	O
and	O
uses	O
its	O
API	B-Application
.	O
</s>
<s>
Users	O
can	O
add	O
a	O
Netlink	B-Application
handler	O
in	O
their	O
own	O
kernel	B-Operating_System
routines	O
.	O
</s>
<s>
This	O
allows	O
the	O
development	O
of	O
additional	O
Netlink	B-Application
protocols	O
to	O
address	O
new	O
kernel	B-Application
modules	I-Application
.	O
</s>
