fixed bug in attaching nics to hosts, changed documentation format and generator (buggy but usable)

This commit is contained in:
2025-09-14 00:40:53 -04:00
parent 9ab64e18a4
commit c4141cd683
40 changed files with 5223 additions and 577 deletions

View File

@@ -1,35 +1,65 @@
# network/packet.h
## class Packet — public interface
### `NodeId src_node() const noexcept;`
### `PortId src_port() const noexcept;`
### `NodeId dst_node() const noexcept;`
### `PortId dst_port() const noexcept;`
### `PacketProtocol protocol() const noexcept;`
### `PacketSeq seq() const noexcept;`
### `FlowId flow_id() const noexcept;`
### `uint32_t entropy() const noexcept;`
### `void set_src_node(NodeId n) noexcept;`
### `void set_src_port(PortId p) noexcept;`
### `void set_dst_node(NodeId n) noexcept;`
### `void set_dst_port(PortId p) noexcept;`
### `void set_seq(PacketSeq s) noexcept;`
### `void set_flow_id(FlowId f) noexcept;`
### `void set_entropy(uint32_t e) noexcept;`
### `void set_protocol(PacketProtocol p) noexcept;`
### `void set_payload_size(Bytes size) noexcept;`
### `void set_ecn_enabled(bool v) noexcept;`
### `void set_ecn_marked(bool v) noexcept;`
### `void set_eof(bool v) noexcept;`
### `bool is_ecn_enabled() const noexcept;`
### `bool is_ecn() const noexcept;`
### `bool is_eof() const noexcept;`
### `FlowPriority priority() const noexcept;`
### `uint8_t priority_raw() const noexcept;`
### `Bytes header_size() const noexcept;`
### `Bytes payload_size() const noexcept;`
### `Bytes total_size() const noexcept;`
### `PacketGroups groups() const noexcept;`
### `void set_groups(PacketGroups g) noexcept;`
### `void add_groups(PacketGroups gmask) noexcept;`
## `Packet::Packet`
`Packet(NodeId src_node, PortId src_port, NodeId dst_node, PortId dst_port, PacketProtocol proto, FlowPriority prio, PacketSeq seq = 0, FlowId flow = 0, uint16_t entropy = 0, uint8_t notifications = 0, Bytes payload_bytes = DEFAULT_MSS_BYTES) noexcept`
## `Packet::add_groups`
`void add_groups(PacketGroups gmask) noexcept`
## `Packet::dst_node`
`NodeId dst_node() const noexcept`
## `Packet::dst_port`
`PortId dst_port() const noexcept`
## `Packet::entropy`
`uint32_t entropy() const noexcept`
## `Packet::flow_id`
`FlowId flow_id() const noexcept`
## `Packet::groups`
`PacketGroups groups() const noexcept`
## `Packet::header_size`
`Bytes header_size() const noexcept`
## `Packet::is_ecn`
`bool is_ecn() const noexcept`
## `Packet::is_ecn_enabled`
`bool is_ecn_enabled() const noexcept`
## `Packet::is_eof`
`bool is_eof() const noexcept`
## `Packet::payload_size`
`Bytes payload_size() const noexcept`
## `Packet::priority`
`FlowPriority priority() const noexcept`
## `Packet::priority_raw`
`uint8_t priority_raw() const noexcept`
## `Packet::protocol`
`PacketProtocol protocol() const noexcept`
## `Packet::seq`
`PacketSeq seq() const noexcept`
## `Packet::set_dst_node`
`void set_dst_node(NodeId n) noexcept`
## `Packet::set_dst_port`
`void set_dst_port(PortId p) noexcept`
## `Packet::set_ecn_enabled`
`void set_ecn_enabled(bool v) noexcept`
## `Packet::set_ecn_marked`
`void set_ecn_marked(bool v) noexcept`
## `Packet::set_entropy`
`void set_entropy(uint32_t e) noexcept`
## `Packet::set_eof`
`void set_eof(bool v) noexcept`
## `Packet::set_flow_id`
`void set_flow_id(FlowId f) noexcept`
## `Packet::set_groups`
`void set_groups(PacketGroups g) noexcept`
## `Packet::set_payload_size`
`void set_payload_size(Bytes size) noexcept`
## `Packet::set_protocol`
`void set_protocol(PacketProtocol p) noexcept`
## `Packet::set_seq`
`void set_seq(PacketSeq s) noexcept`
## `Packet::set_src_node`
`void set_src_node(NodeId n) noexcept`
## `Packet::set_src_port`
`void set_src_port(PortId p) noexcept`
## `Packet::src_node`
`NodeId src_node() const noexcept`
## `Packet::src_port`
`PortId src_port() const noexcept`
## `Packet::total_size`
`Bytes total_size() const noexcept`