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,9 +1,19 @@
# network/network_switch.h
## class NetworkSwitch — public interface
### `virtual void recv_pkt(Packet &pkt, PortId ingress) override;`
### `void set_status(NodeStatus s, Time new_forward_latency = Time(0)) noexcept;`
### `NodeStatus get_status() const noexcept { ... }`
### `return status();`
### `uint16_t port_cnt() const noexcept { ... }`
## `NetworkSwitch::NetworkSwitch`
`NetworkSwitch(Simulator *const sim, NodeId id, uint16_t total_ports, ECNEngine *const ecn, SwitchBuffer *const buf, const RoutingTables *const rt, Time forwarding_latency, Time multicast_dup_delay) noexcept`
## `NetworkSwitch::get_status`
`NodeStatus get_status() const noexcept`
## `NetworkSwitch::port_cnt`
`uint16_t port_cnt() const noexcept`
## `NetworkSwitch::recv_pkt`
`virtual void recv_pkt(Packet &pkt, PortId ingress) override`
## `NetworkSwitch::set_status`
`void set_status(NodeStatus s, Time new_forward_latency = Time(0)) noexcept`
## `enqueue_one`
`void enqueue_one(Packet pkt, PortId egress, FlowPriority prio) noexcept;`
## `forward_after_delay`
`private: void forward_after_delay(Packet pkt, PortId ingress) noexcept;`
## `group_bit_set`
`static inline bool group_bit_set(PacketGroups mask, std::size_t gid) noexcept;`
## `merge_sorted_unique`
`static void merge_sorted_unique(std::vector<PortId> &base, const std::vector<PortId> &add);`