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:
Gregory Nutt
2017-08-08 15:26:09 -06:00
parent bd7c84b23e
commit aeb59383cf
33 changed files with 171 additions and 554 deletions
-2
View File
@@ -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
+2 -8
View File
@@ -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)
{
-4
View File
@@ -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)
{