38 int lookup_free_slot();
52 void all_kick_emit_enable()
54 for (
unsigned idx = 0; idx < _max_ports; ++idx)
56 _ports[idx]->kick_emit_and_enable();
59 void all_kick_disable_remember()
61 for (
unsigned idx = 0; idx < _max_ports; ++idx)
63 _ports[idx]->kick_disable_and_remember();
126 return !_monitor ? 0 : -1;
128 return lookup_free_slot();
Mac_table manages a 1:n association between ports and MAC addresses.
A Port on the Virtio Net Switch.
The Virtio switch contains all ports and processes network requests.
bool add_monitor_port(Virtio_port *port)
Add a monitor port to the switch.
void check_ports()
Check validity of ports.
bool add_port(Virtio_port *port)
Add a port to the switch.
void handle_port_irq(Virtio_port *port)
Handle an incoming irq on a given port.
int port_available(bool monitor)
Is there still a free port on this switch available?