Netlink was never fully merged into FreeBSD ?

Hello.

I've asked IA (and I ask it to you,too) where can I get the netlink core files for FreeBSD 14.x / 15x.

IA : How to Sync Netlink into Your Tree​

Since you're working on FreeBSD 15.0), do this :

# Go to your source tree

Code:
cd /mnt/zroot2/zroot2/OS/BSD/FreeBSD/arm64/socs/Radxa-3W/Stuff/src-/src-150-DRM-CHERI-SOREN

# Backup your current netlink dir (if any)

Code:
mv sys/netlink sys/netlink.bak

# Create fresh netlink directory

Code:
mkdir -p sys/netlink

# Download all core files (use curl or wget)

Code:
cd sys/netlink

for file in netlink.h netlink_var.h netlink.c netlink_ctl.c netlink_domain.c netlink_generic.c netlink_generic_kpi.c netlink_route.c netlink_debug.h; do
curl -O "https://git.freebsd.org/src.git/plain/sys/netlink/$file"
done

Me :

https://git.freebsd.org/src.git/plain/sys/netlink/netlink.c does not exist
https://git.freebsd.org/src.git/plain/sys/netlink/netlink_ctl.c does not exist
https://git.freebsd.org/src.git/plain/sys/netlink/netlink_domain.c does not exist
https://git.freebsd.org/src.git/plain/sys/netlink/netlink_generic.c does not exist
https://git.freebsd.org/src.git/plain/sys/netlink/netlink_generic_kpi.c does not exist
https://git.freebsd.org/src.git/plain/sys/netlink/netlink_route.c does not exist

IA : You're absolutely right — and thank you for catching that.

🔴 The Issue​


As of today (June 2024), FreeBSD 15.0-CURRENT does NOT have a complete in-kernel Netlink implementation.


Despite early efforts (2020–2022), Netlink was never fully merged into FreeBSD -CURRENT. The files you see in some trees (like yours) are partial, experimental, or from uncommitted patchesnot official FreeBSD.


The URL https://git.freebsd.org/src.git/plain/sys/netlink/netlink.c returns 404 because the file does not exist in the official FreeBSD repository.




✅ Reality Check: Netlink Is​

  • ❌ There is no sys/netlink/ directory in official FreeBSD src.
  • ❌ Netlink is not part of FreeBSD 13, 14, or 15.

Is that true ? Can I get the missing files somewhere ? thanks.
 
Why would you need AI to search for files on your computer? You really don't seem to be getting this OS stuff.

find /usr/src -name netlink
Code:
/usr/src/sys/netlink
/usr/src/sys/modules/netlink
/usr/src/tests/sys/netlink
/usr/src/tests/atf_python/sys/netlink
 
You should probably update your source tree. It sounds like something is out of sync.

I don't really see a good reason why we are talking about -CURRENT here.
Netlink has been in FreeBSD since 2021.

Netlink Protocol: Expanded and improved the netlink(4) user/kernel communication protocol,

The netlink protocol appeared in FreeBSD 13.2
 
Ok. Let's talk about FreeBSD. I'm not able to find these files :

netlink.c
netlink_ctl.c

in any version of FreeBSD....

For example,some time ago I've downloaded FreeBSD 14.3 source code :

Code:
marietto# cd src-143-original
marietto# find . -name netlink.c       

./contrib/wpa/src/drivers/netlink.c
./contrib/libfido2/src/netlink.c

I found these files,but they aren't the files I need.

Same happens with 14.2 :

Code:
marietto# cd src-142-original 
marietto# find . -name netlink.c             

./contrib/wpa/src/drivers/netlink.c
./contrib/libfido2/src/netlink.c
 
Who told you those files should exist? Where did you get that idea from?

AI :

Screenshot_2025-10-07_20-35-51.png
 
I only speak two languages, English and bad English.
-- Korban Dalles

It probably got the filenames from somewhere else. Maybe somebody's personal project, who knows? The thing about LLM and AI in general is that IT DOES NOT THINK, although it does appear to do so. It has no understanding of ideas, meaning or concepts. All it "sees" are tokens, which are (parts of) words. It then weighs them. It does not know what any of those tokens (or words) mean, what they represent. It just spews back a bunch of tokens in an order that seems logical because it has seen that order somewhere before. It does not understand what is asked or answered.

Those files clearly never existed in the FreeBSD code base. And netlink(4) was certainly implemented, quite a while ago. As can be read from the man page:
Code:
AUTHORS
     The netlink was implemented by Alexander Chernikov
     <melifaro@FreeBSD.org>.  It was derived from the Google Summer of Code
     2021 project by Ng Peng Nam Sean.
A PoC (proof of concept) was implemented in this Google SoC project.
That'll point you here: https://wiki.freebsd.org/SummerOfCode2021Projects/NetlinkProposal

And eventually you end up with the actual, implemented, netlink(4) code here: https://cgit.freebsd.org/src/tree/sys/netlink
 
AI is not your trustworthy friend.

cd /usr/src/sys/conf
grep -h netlink *


This will show you all the netlink related files the kernel expects when you use option NETLINK (which is already in DEFAULTS - at least in 15.0).
 
Who told you those files should exist? Where did you get that idea from?
I am pretty sure it was his swami. He rode by on his magic carpet on his way to Longchamp.

Somehow this has to figure into the phone dream.

I would be looking at MBIM on -CURRENT or maybe one of the 15.0 Alpha Builds
 
Back
Top