Support fragmentation and reassembly

Signed-off-by: luojun1 <luojun1@xiaomi.com>
This commit is contained in:
luojun1234
2023-01-09 20:47:11 +08:00
committed by Xiang Xiao
parent b1899ffbfd
commit ff3733b5b5
25 changed files with 3152 additions and 43 deletions
+7
View File
@@ -35,6 +35,7 @@
#include <net/ethernet.h>
#include <nuttx/net/netdev.h>
#include "ipfrag/ipfrag.h"
#include "netdev/netdev.h"
#include "netlink/netlink.h"
#include "arp/arp.h"
@@ -92,6 +93,12 @@ int netdev_carrier_off(FAR struct net_driver_s *dev)
dev->d_flags &= ~IFF_RUNNING;
netlink_device_notify(dev);
#ifdef CONFIG_NET_IPFRAG
/* Clean up fragment data for this NIC (if any) */
ip_frag_stop(dev);
#endif
/* Notify clients that the network has been taken down */
devif_dev_event(dev, NETDEV_DOWN);