mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
TUN driver: Implement TAP (OSI layer 2) mode.
Enable by setting the IFF_TAP flag instead of the IFF_TUN flag in ifr_flags.
This commit is contained in:
@@ -251,7 +251,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
|
||||
#ifdef CONFIG_NET_TUN
|
||||
case NET_LL_TUN: /* Virtual Network Device (TUN) */
|
||||
dev->d_llhdrlen = 0;
|
||||
dev->d_llhdrlen = 0; /* this will be overwritten by tun_ioctl if used as a TAP (layer 2) device */
|
||||
dev->d_mtu = CONFIG_NET_TUN_MTU;
|
||||
#ifdef CONFIG_NET_TCP
|
||||
dev->d_recvwndo = CONFIG_NET_TUN_TCP_RECVWNDO;
|
||||
|
||||
Reference in New Issue
Block a user