mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user