M
M
mIka012020-12-29 21:33:32
Computer networks
mIka01, 2020-12-29 21:33:32

Formation of custom network packages?

Hello, I have a complicated question (as I understand it).

Is it possible to send (packet) information from a computer to another device, but with the creation of its own mask (packet). That is, enter the sender's ip, the interpreter's ip, and other administrative information there?

If yes, then there are examples in programming languages ​​(preferably in c #) of any.

Thank you in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-12-29
@mIka01

The TCP / IP packet is formed by the system, interference in this is possible at the driver level.
In the windows environment, this is a special driver https://ru.wikipedia.org/wiki/Pcap
However, the DDK has examples of pure use of RAW SOCKET,
but you get bored

P
Peter, 2020-12-29
@Morpheus_God

Form your data structure, serialize. Send the byte array to where you want it and deserialize it on the device.
Look towards Socket or TcpClient, you will also need BinaryFormatter.
If you don’t want to fool around with serialization and you have simple functionality, then just send lines with the necessary information, and on the server or client, process the contents of the line in any way you like.
Here is a description of how to work with sockets in C#.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question