added networking components, hosts are next

This commit is contained in:
2025-09-07 11:47:15 -04:00
commit 3411089908
59 changed files with 4777 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#ifndef NETWORK_SWITCH_ROUTING_ALG_H
#define NETWORK_SWITCH_ROUTING_ALG_H
#include <cstdint>
#include "core/types.h"
#include "core/error.h"
namespace dofs {
PortId hash_ecmp(NodeId src_node, PortId src_port,
NodeId dst_node, PortId dst_port,
uint32_t differentiator,
uint16_t port_count) noexcept;
inline PortId hash_ecmp(NodeId src_node,
NodeId dst_node,
uint32_t differentiator,
uint16_t port_count) noexcept {
return hash_ecmp(src_node, static_cast<PortId>(0),
dst_node, static_cast<PortId>(0),
differentiator, port_count);
}
} // namespace dofs
#endif // NETWORK_SWITCH_ROUTING_ALG_H