# network/network_nic.h
## `NicSchedulingWeights::NetworkNic::NetworkNic`
`NetworkNic(Simulator *const sim, NodeId id, uint16_t total_ports, SwitchBuffer *const buf, Time nic_latency, Bytes mice_elephant_threshold, PacketSeq ooo_threshold, CCType cc_type, LBType lb_type, Bytes cc_init_cwnd, Bytes cc_max_cwnd, const NicSchedulingWeights &schedw) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::enqueue_packet`
`void enqueue_packet(PortId port, QClass cls, Packet pkt) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::is_elephant`
`bool is_elephant(Bytes sz) const noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::lookup_rtt_and_erase`
`bool lookup_rtt_and_erase(const Packet &ack_like, Time now, Time &out_rtt) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::make_ack_packet`
`Packet make_ack_packet(const Packet &rx_data, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::make_data_packet`
`Packet make_data_packet(NodeId dst, PortId out_port, FlowPriority prio, FlowId fid, PacketSeq seq, Bytes payload) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::make_nack_packet`
`Packet make_nack_packet(NodeId peer, FlowId flow, PacketSeq miss, FlowPriority prio, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::make_trim_back_response`
`Packet make_trim_back_response(const Packet &trim, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::pick_next_qclass`
`bool pick_next_qclass(const PortQueues &pq, QClass &out_cls) const noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::pick_src_port_for_flow`
`PortId pick_src_port_for_flow(NodeId dst) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::port_drain_task`
`void port_drain_task(PortId port) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::record_tx_timestamp`
`void record_tx_timestamp(const Packet &pkt) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::schedule_ack`
`void schedule_ack(const Packet &rx_data, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::schedule_nack`
`void schedule_nack(NodeId peer, FlowId flow, PacketSeq missing_seq, FlowPriority prio, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::schedule_port_if_needed`
`void schedule_port_if_needed(PortId port) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::schedule_trim_back_response`
`void schedule_trim_back_response(const Packet &trim, PortId ingress) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::start_tx_multicast`
`void start_tx_multicast(PacketGroups gmask, Bytes size, FlowPriority prio)`
## `NicSchedulingWeights::NetworkNic::PortQueues::start_tx_unicast`
`void start_tx_unicast(NodeId dst, Bytes size, FlowPriority prio)`
## `NicSchedulingWeights::NetworkNic::PortQueues::try_send_one`
`bool try_send_one(PortId port, QClass cls) noexcept`
## `NicSchedulingWeights::NetworkNic::PortQueues::txkey`
`static inline std::uint64_t txkey(FlowId f, PacketSeq s) noexcept`
## `NicSchedulingWeights::NetworkNic::attach_host`
`void attach_host(Host *host) noexcept`
## `NicSchedulingWeights::NetworkNic::detach_host`
`void detach_host(Host *host) noexcept`
## `NicSchedulingWeights::NetworkNic::is_port_blacklisted`
`bool is_port_blacklisted(PortId port) const noexcept`
## `NicSchedulingWeights::NetworkNic::recv_pkt`
`virtual void recv_pkt(Packet &pkt, PortId ingress) override`
## `NicSchedulingWeights::NetworkNic::send_flow`
`void send_flow(NodeId dst, Bytes size, FlowPriority desired = FlowPriority::AUTO)`
## `NicSchedulingWeights::NetworkNic::send_flow`
`void send_flow(PacketGroups group_mask, Bytes size, FlowPriority desired = FlowPriority::AUTO)`
## `NicSchedulingWeights::NetworkNic::set_port_blacklisted`
`void set_port_blacklisted(PortId port, bool blacklisted) noexcept`
## `NicSchedulingWeights::NetworkNic::set_status`
`void set_status(NodeStatus s, Time new_latency = Time(0)) noexcept`
## `NicSchedulingWeights::NetworkNic::telemetry`
`const NicTelemetry &telemetry() const noexcept`
## `enqueue_packet`
`void enqueue_packet(PortId port, QClass cls, Packet pkt) noexcept;`
## `lookup_rtt_and_erase`
`bool lookup_rtt_and_erase(const Packet &ack_like, Time now, Time &out_rtt) noexcept;`
## `make_ack_packet`
`Packet make_ack_packet(const Packet &rx_data, PortId ingress) noexcept;`
## `make_data_packet`
`Packet make_data_packet(NodeId dst, PortId out_port, FlowPriority prio, FlowId fid, PacketSeq seq, Bytes payload) noexcept;`
## `make_nack_packet`
`Packet make_nack_packet(NodeId peer, FlowId flow, PacketSeq miss, FlowPriority prio, PortId ingress) noexcept;`
## `make_trim_back_response`
`Packet make_trim_back_response(const Packet &trim, PortId ingress) noexcept;`
## `pick_src_port_for_flow`
`PortId pick_src_port_for_flow(NodeId dst) noexcept;`
## `port_drain_task`
`void port_drain_task(PortId port) noexcept;`
## `record_tx_timestamp`
`void record_tx_timestamp(const Packet &pkt) noexcept;`
## `schedule_ack`
`void schedule_ack(const Packet &rx_data, PortId ingress) noexcept;`
## `schedule_nack`
`void schedule_nack(NodeId peer, FlowId flow, PacketSeq missing_seq, FlowPriority prio, PortId ingress) noexcept;`
## `schedule_port_if_needed`
`void schedule_port_if_needed(PortId port) noexcept;`
## `schedule_trim_back_response`
`void schedule_trim_back_response(const Packet &trim, PortId ingress) noexcept;`
## `set_port_blacklisted`
`void set_port_blacklisted(PortId port, bool blacklisted) noexcept;`
## `start_tx_multicast`
`void start_tx_multicast(PacketGroups gmask, Bytes size, FlowPriority prio);`
## `start_tx_unicast`
`void start_tx_unicast(NodeId dst, Bytes size, FlowPriority prio);`
## `try_send_one`
`bool try_send_one(PortId port, QClass cls) noexcept;`
## `txkey`
`static inline std::uint64_t txkey(FlowId f, PacketSeq s) noexcept;`