nic session: link-state change handling

A Nic::Session client can install a signal handler that is used to
propagate changes of the link-state by calling 'link_state_sigh()'.
The actual link state is queried via 'link_state()'.

The nic-driver interface now provides a Driver_notification callback,
which is used to forward link-state changes from the driver to the
Nic::Session_component.

The following drivers now provide real link state: dde_ipxe, nic_bridge,
and usb_drv. Currently, OpenVPN, Linux nic_drv, and lan9118 do not
support link state and always report link up.

Fixes #1327
This commit is contained in:
Josef Söntgen
2015-03-11 11:33:03 +01:00
committed by Christian Helmuth
parent e4f6fca355
commit dd47129bef
21 changed files with 314 additions and 67 deletions

View File

@ -56,6 +56,13 @@ class Nic::Session_client : public Genode::Rpc_client<Session>
Rx *rx_channel() { return &_rx; }
Tx::Source *tx() { return _tx.source(); }
Rx::Sink *rx() { return _rx.sink(); }
void link_state_sigh(Genode::Signal_context_capability sigh) override
{
call<Rpc_link_state_sigh>(sigh);
}
bool link_state() override { return call<Rpc_link_state>(); }
};
#endif /* _INCLUDE__NIC_SESSION__CLIENT_H_ */