From c5148ad9e5d0c44c891f843bc7927bdcce0aee1a Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 22 Nov 2007 18:36:46 +0000 Subject: TCP and ICMP protocols may now be disabled git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@398 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/net/uip/uip-input.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'nuttx/net/uip/uip-input.c') diff --git a/nuttx/net/uip/uip-input.c b/nuttx/net/uip/uip-input.c index b8d8ebb7e..6ee748c89 100644 --- a/nuttx/net/uip/uip-input.c +++ b/nuttx/net/uip/uip-input.c @@ -102,8 +102,8 @@ /* Macros. */ -#define BUF ((struct uip_tcpip_hdr *)&dev->d_buf[UIP_LLH_LEN]) -#define FBUF ((struct uip_tcpip_hdr *)&uip_reassbuf[0]) +#define BUF ((struct uip_ip_hdr *)&dev->d_buf[UIP_LLH_LEN]) +#define FBUF ((struct uip_ip_hdr *)&uip_reassbuf[0]) /* IP fragment re-assembly */ @@ -294,9 +294,6 @@ nullreturn: void uip_input(struct uip_driver_s *dev) { - dev->d_snddata = &dev->d_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN]; - dev->d_appdata = &dev->d_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN]; - /* This is where the input processing starts. */ #ifdef CONFIG_NET_STATISTICS @@ -468,9 +465,11 @@ void uip_input(struct uip_driver_s *dev) switch (BUF->proto) { +#ifdef CONFIG_NET_TCP case UIP_PROTO_TCP: /* TCP input */ uip_tcpinput(dev); break; +#endif #ifdef CONFIG_NET_UDP case UIP_PROTO_UDP: /* UDP input */ @@ -480,6 +479,7 @@ void uip_input(struct uip_driver_s *dev) /* Check for ICMP input */ +#ifdef CONFIG_NET_ICMP #ifndef CONFIG_NET_IPv6 case UIP_PROTO_ICMP: /* ICMP input */ #else @@ -487,6 +487,7 @@ void uip_input(struct uip_driver_s *dev) #endif uip_icmpinput(dev); break; +#endif default: /* Unrecognized/unsupported protocol */ #ifdef CONFIG_NET_STATISTICS -- cgit v1.2.3