networking: add Linux-specific TAP mode to network interface
This addition was motivated by my lack of knowledge of VDE and my familiarity with the Linux networking stack. The driver automatically manages the creation of TAP devices and their association with bridges, such that configurations which specify the same bridge will be connected together. It also automatically handles the creation of bridge devices for convenience's sake.
This commit is contained in:
@@ -480,6 +480,12 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
|
||||
card->host_drv = net_vde_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name, net_drv_error);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAS_TAP
|
||||
case NET_TYPE_TAP:
|
||||
card->host_drv = net_tap_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name, net_drv_error);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
card->host_drv.priv = NULL;
|
||||
|
||||
Reference in New Issue
Block a user