void enable_signals() { _nic.link_state_sigh(_link_state_dispatcher); _nic.rx_channel()->sigh_packet_avail(_rx_packet_avail_dispatcher); _nic.rx_channel()->sigh_ready_to_ack(_rx_ready_to_ack_dispatcher); /* set initial link-state */ _handle_link_state(1); }
Nic_client(PDRVNIC drvtap) : _tx_block_alloc(_packet_allocator()), _nic(_tx_block_alloc, BUF_SIZE, BUF_SIZE), _link_state_dispatcher(_sig_rec, *this, &Nic_client::_handle_link_state), _rx_packet_avail_dispatcher(_sig_rec, *this, &Nic_client::_handle_rx_packet_avail), _rx_ready_to_ack_dispatcher(_sig_rec, *this, &Nic_client::_handle_rx_ready_to_ack), _destruct_dispatcher(_sig_rec, *this, &Nic_client::_handle_destruct), _down_rx(drvtap->pIAboveNet), _down_rx_config(drvtap->pIAboveConfig) { _nic.link_state_sigh(_link_state_dispatcher); _nic.rx_channel()->sigh_packet_avail(_rx_packet_avail_dispatcher); _nic.rx_channel()->sigh_ready_to_ack(_rx_ready_to_ack_dispatcher); }