Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ethernet lengths and types, and header
This patch adds a module to the `net` module of `kernel` that provides enumerations with constants for ethernet lengths (address length, type length, etc), as well as the enumeration of all protocols currently understood by the network stack. The latter are represented as 16-bit integers in memory to simplify conversion to and from the types read directly from Ethernet II frames. This patch also contains a conversion from/to `u16`. The `ethernet` module also contains a `Header` abstraction that just wraps around `struct ethhdr` defined in the UAPI. There is a simple builder function implemented as well as getters for src/dst address, and protocol number. Signed-off-by: Amélie Gonzalez <[email protected]>
- Loading branch information