S
S
Stanislav Timoshko2021-09-13 21:08:10
linux
Stanislav Timoshko, 2021-09-13 21:08:10

How to send arbitrary data through network card?

A very strange question arose. Is it possible to receive and send "raw" data, bypassing the TCP/IP stack? By "raw" I mean simply the set of bytes that can be received and sent through the network card. So to speak, low-level interaction with the network card driver ..

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
ValdikSS, 2021-09-15
@ValdikSS

Universal, but not the most flexible and fastest solution: raw socket. Works on all popular operating systems.

A
Alexander, 2021-09-13
@avorsa

scapy

P
pfg21, 2021-09-14
@pfg21

onreader.mdl.ru/LinuxDeviceDriversDevelopment/cont...
rus-linux.net/lib.php?name=/MyLDP/algol/realtekdri...
this is so.... I quickly googled it.
Instead of asking stupid questions, read literature.
and it is worth describing more clearly "whatever you want"

D
Developer, 2021-09-14
@samodum

TCP is layer 4 in the OSI model, and physical is layer 1.
Therefore, yes, you can bypass the TCP level and go below

C
CityCat4, 2021-09-14
@CityCat4

Yes, why not? Write a bucket module that catches a signal from the firewood of the network card that it has data in the receiver and copy this data to itself. But if you do not plan to completely take data from the bucket, it's best to come up with a custom protocol label and take only what you need for yourself :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question