A
A
aarmaageedoon2019-11-08 08:12:40
linux
aarmaageedoon, 2019-11-08 08:12:40

How to create a virtual network interface controlled by the program?

Hello.
There was an idea that lies in the concept of Internet-over-Radio.
In a nutshell, the idea of ​​the concept itself is as follows: the car has a certain radio interface (a transceiver, and no, it's not Wi-Fi :)) and a program for it that can control it. Let's say there are two such cars. Then they can exchange information over the air, setting any packet format specified by the control program. Well, then, we can also transmit network packets by radio.
In OSes, in Linux, in particular, there is the concept of network interfaces that interact with the application and with the ethernet adapter, processing packets in acc. with different layers of the OSI model. Thus, the ethernet adapter transmits ready-made ethrnet frames either to the network or higher in the model, and the application also simply either receives or transmits data to the interface.
So, the question is, is it possible to somehow replace the ethernet adapter with a program? Those. so that what needs to be transferred outside to the network, the system transferred to a certain program, and, accordingly, what to transfer to the application, the program could transfer to the system. Basically, I just want to replace the physical layer of the OSI model, but not with ethernet or Wi-Fi, but just with a program.
Among what I googled, I found information about virtual TUN / TAP interfaces, but it seems that this is not quite what will help me.
How to be?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Aleksandrov, 2019-11-08
@aarmaageedoon

Here tun \ tap is what you need.

V
Valentine, 2019-11-08
@vvpoloskin

Yes, this is called a driver or a vigorous module for your radio whistle.

S
Somewhere Intech, 2019-11-08
@john36allTa

Maybe this thread will help you figure it out?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question