mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Remove CONFIG_NET_MULTILINK. This increases code size by a little, but greatly reduces the complexity of the network code.
This commit is contained in:
@@ -147,12 +147,10 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd)
|
||||
|
||||
/* REVISIT: Could the MAC address not also be in a routing table? */
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
if (fwd->f_dev->d_lltype != NET_LL_ETHERNET)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
|
||||
@@ -74,12 +74,8 @@ static int ipfwd_packet_proto(FAR struct net_driver_s *dev)
|
||||
|
||||
if (dev->d_len > (IPv6_HDRLEN + llhdrlen))
|
||||
{
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
/* Handle the case where multiple link layer protocols are supported */
|
||||
|
||||
if (dev->d_lltype == NET_LL_IEEE802154 ||
|
||||
dev->d_lltype == NET_LL_PKTRADIO)
|
||||
#endif
|
||||
{
|
||||
/* There should be an IPv6 packet at the beginning of the buffer */
|
||||
|
||||
@@ -112,13 +108,11 @@ static void ipfwd_packet_conversion(FAR struct net_driver_s *dev, int proto)
|
||||
{
|
||||
if (dev->d_len > 0)
|
||||
{
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
/* Handle the case where multiple link layer protocols are supported */
|
||||
|
||||
if (dev->d_lltype == NET_LL_IEEE802154 ||
|
||||
dev->d_lltype == NET_LL_PKTRADIO)
|
||||
#endif
|
||||
{
|
||||
FAR struct ipv6_hdr_s *ipv6 = (FAR struct ipv6_hdr_s *)dev->d_buf;
|
||||
|
||||
#ifdef CONFIG_NET_TCP
|
||||
if (proto == IP_PROTO_TCP)
|
||||
{
|
||||
|
||||
@@ -205,16 +205,12 @@ static int ipv6_packet_conversion(FAR struct net_driver_s *dev,
|
||||
|
||||
if (dev->d_len > 0)
|
||||
{
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
/* Handle the case where multiple link layer protocols are supported */
|
||||
|
||||
if (fwddev->d_lltype != NET_LL_IEEE802154 &&
|
||||
fwddev->d_lltype != NET_LL_PKTRADIO)
|
||||
{
|
||||
nwarn("WARNING: Unsupported link layer... Not forwarded\n");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_TCP
|
||||
if (ipv6->proto == IP_PROTO_TCP)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user