Tweaking and recompiling the code of a WiFi driver for my needs
I want to take an existing, standard WiFi driver for Linux and tweak it. I'll inroduce a whitelist into it. That is, to the consumer a driver will show the networks from a whitelist only ignoring all other ones.
It's a PoC. I want to implement it as simply as possible. Can this be implemented? And how, in a high level? --- It must be a driver, not a user-space application, because it's a requirement. A driver, as I've been suggested, is iwlwifi, which is a part of the kernel https://git.kernel.org/pub/scm/linux...ireless/scan.c Right? |
Hello, pintomonde & welcome to LQ.
What you suggest is like trying to put a map of one way streets into you car's engine. The WiFi driver just drives the wifi card. There's a whole networking stack that handles routing and IP packets. The job you are describing is a firewall, and you already have one. These days, firewalls are problematic because spare IPV4 address blocks assigned to one country have been sold and assigned in another. Also, once hackers compromise one apparently innocent box, they can launch attacks from there. But your firewall will let it through. Everyone updated the Solar Winds software a year or two back - which came with a virus attached. Try seeing if iptables does what you want to do with your wifi driver. |
Quote:
....a wifi driver drives by a) looking for WiFi networks b) finding them c) creating a list of them d) giving a list of them to the consumer - Linux user level. Correct? I want to create a modified version of a Wifi driver which would post-process some data in the (c) step thus cutting off some of them the networks off a list, right before passing it to the user level. That is, it'd simply give out a slightly modified list of the networks You claim that this wouldn't be possible? |
I don't think so. The wifi driver simply passes network traffic in the form of network packets to the particular wifi card you have. If you swapped your wifi card, you'd need another network driver. Connecting to networks is hardly relevant, as if you could get onto other local networks you'd hardly pay your isp, would you?
There are a host of programs including the kernel involved in deciding what goes into network packets. The wifi driver doesn't decide anything. This is not my strong suit, but I'm sure others will chip in. I imagine running a firewall to exclude social media might be an option but I'm sure it's not a simple task. The last thing you need is a tweaked wifi driver. |
Quote:
I'm asking him about Wifi networks, twice already, but he's still telling me about social media - websites - and firewall. What a strange developer. >>The last thing you need is a tweaked wifi driver. How do you know what I need to? |
Quote:
What's strange is you asking this question; if you're able to modify kernel level drivers, you'd already know these things. If you're unable to do so, why are you doubting what others tell you?? If you can do, please proceed and prove everyone wrong. Feel free to look into any wifi driver module to see how things work, then think about how they do what they do. Quote:
|
>The list of wifi networks *IS NOT* coming from the wifi driver.
Where does come from then? What is it that builds it? >Do you expect people to recompile the network driver each time they travel so they can use a different network?? Re-read my question. I'm asking about the implementation only. Of a driver. You don't need to try to guess a reason or whether it'd all be feasiable, or what to do instead of it. Stupidity. |
Now tell me
https://git.kernel.org/pub/scm/linux...ireless/scan.c If you claim that Wifi driver doesn't build a list of Wifi networks itself, what are bssid and ssid there for? |
Quote:
Quote:
Get any wifi driver you want and look at the source code. Look at the code/github for nmcli and you may find some other things, such as: Quote:
|
What does this function do, for instance?
https://git.kernel.org/pub/scm/linux...ss/scan.c#n583 A list of access points. Interesting, isn't it? What does it do there then if a list of them isn't generated by a Wifi driver? |
Look, all these things are done very well by the gnu utilities and the linux kernel.
This wifi driver thing has got way out of proportion. To block out social media requires analysing the packets, which a wifi driver doesn't do. It can be done by DNS. A good move may be to check opendns.org and see if they have an option to block social media. Even if they don't, there's clever tricks and hacks that your kids will find out about before you. I ran on the censored version of opendns while my kids were teenagers. But they were not fools. If they wanted porn, all they had to do was go to a torrent site! Fortunately, they didn't want it. Quote:
|
He keeps giving me an advice about what HE THINKS I need. Rather than what I've asked about multiple times. Is he a lunatic or not?
A bunch of stuborn creakers |
All times are GMT -5. The time now is 07:29 AM. |