Answer the question
In order to leave comments, you need to log in
Data exchange over ethernet (mac2mac), how to implement?
Good day everyone. There is a task to write a program to transfer data between two hosts using the ethernet transfer protocol. The essence of the question is how the channel layer works in the language, in my case C, and what APIs are generally available for these purposes. For a long time I can not find anything on this topic on the Internet (both in Russian and in English), so I ask the question of a syudeman. Thank you all in advance.
Answer the question
In order to leave comments, you need to log in
Directly from the repository of the Linux author himself:
https://github.com/torvalds/linux/blob/master/net/...
By the way, there is a date in the comments, this code is 29 years old, and it is still relevant.
You can also look at this for an example:
https://github.com/iputils/iputils/blob/master/arping.c
and what are the general APIs for these purposesProbably none.
API? To C? At the level of ethernet packets? Well, there are probably some libs that allow you to create packages, but if I were your teacher, I would add the condition "and without using libraries."
An RFC is taken, read, a packet is formed manually and manually sent to the network stack at the desired level.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question