mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-19 09:35:15 -04:00
Doc
This commit is contained in:
parent
9038762e00
commit
570b508803
@ -16,20 +16,23 @@ namespace network {
|
|||||||
|
|
||||||
namespace ethernet {
|
namespace ethernet {
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A packet on the ethernet layer
|
||||||
|
*/
|
||||||
struct packet {
|
struct packet {
|
||||||
// Set from the beginning
|
// Set from the beginning
|
||||||
char* payload;
|
char* payload; ///< Pointer to the packet payload
|
||||||
size_t payload_size;
|
size_t payload_size; ///< The size, in bytes, of the payload
|
||||||
|
|
||||||
// Set by ethernet
|
// Set by ethernet
|
||||||
ether_type type;
|
ether_type type; ///< The type of ethernet
|
||||||
size_t index;
|
size_t index; ///< The current index inside the packet
|
||||||
|
|
||||||
// Set for user mode
|
// Set for user mode
|
||||||
size_t fd;
|
size_t fd; ///< The file descriptor (in user mode)
|
||||||
bool user;
|
bool user; ///< Flag indicating if the packet is a user packet or kernel packet
|
||||||
|
|
||||||
uint64_t tags; // This allows for 4 tags (4 layer)
|
uint64_t tags; ///< Tags of the layer indices
|
||||||
uint64_t interface; ///< Id of the interface
|
uint64_t interface; ///< Id of the interface
|
||||||
|
|
||||||
packet() : fd(0), user(false), tags(0) {}
|
packet() : fd(0), user(false), tags(0) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user