Networking: Seperate tcp_input() and udp_input() into seprate functions tcp_ipv4_input(), tcp_ipv6_input(), udp_ipv4_input(), and upd_ipv6_input() than can deal will the data offsets caused by the differing sizes of the IP header.

This commit is contained in:
Gregory Nutt
2015-01-15 15:06:46 -06:00
parent 60e50ff3b5
commit 630366272a
18 changed files with 438 additions and 200 deletions
+3 -3
View File
@@ -383,7 +383,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
if (pbuf->proto == IP_PROTO_UDP &&
net_ipv4addr_cmp(net_ip4addr_conv32(pbuf->destipaddr), g_alloneaddr))
{
return udp_input(dev);
return udp_ipv4_input(dev);
}
/* In most other cases, the device must be assigned a non-zero IP
@@ -457,13 +457,13 @@ int ipv4_input(FAR struct net_driver_s *dev)
{
#ifdef CONFIG_NET_TCP
case IP_PROTO_TCP: /* TCP input */
tcp_input(dev);
tcp_ipv4_input(dev);
break;
#endif
#ifdef CONFIG_NET_UDP
case IP_PROTO_UDP: /* UDP input */
udp_input(dev);
udp_ipv4_input(dev);
break;
#endif
+2 -2
View File
@@ -251,13 +251,13 @@ int ipv6_input(FAR struct net_driver_s *dev)
{
#ifdef CONFIG_NET_TCP
case IP_PROTO_TCP: /* TCP input */
tcp_input(dev);
tcp_ipv6_input(dev);
break;
#endif
#ifdef CONFIG_NET_UDP
case IP_PROTO_UDP: /* UDP input */
udp_input(dev);
udp_ipv6_input(dev);
break;
#endif