summaryrefslogtreecommitdiff
path: root/nuttx/net/uip
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 15:36:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 15:36:28 +0000
commite6f93f774080d42c3f954a862709d047df2d7e7a (patch)
tree487b0ec566d911458a00e1803392b817e84b7809 /nuttx/net/uip
parent95317af605c883b464a4c5b524632193614bfd24 (diff)
downloadpx4-nuttx-e6f93f774080d42c3f954a862709d047df2d7e7a.tar.gz
px4-nuttx-e6f93f774080d42c3f954a862709d047df2d7e7a.tar.bz2
px4-nuttx-e6f93f774080d42c3f954a862709d047df2d7e7a.zip
More support for SLIP data link protocol
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3370 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip')
-rw-r--r--nuttx/net/uip/Make.defs14
-rw-r--r--nuttx/net/uip/uip_arp.c8
-rw-r--r--nuttx/net/uip/uip_arptab.c7
3 files changed, 24 insertions, 5 deletions
diff --git a/nuttx/net/uip/Make.defs b/nuttx/net/uip/Make.defs
index 3c7e2ac23..c544765ac 100644
--- a/nuttx/net/uip/Make.defs
+++ b/nuttx/net/uip/Make.defs
@@ -40,14 +40,22 @@ ifeq ($(CONFIG_NET),y)
# Common IP source files
-UIP_CSRCS += uip_initialize.c uip_setipid.c uip_arp.c uip_arptab.c uip_input.c \
- uip_send.c uip_poll.c uip_chksum.c uip_callback.c
+UIP_CSRCS += uip_initialize.c uip_setipid.c uip_input.c uip_send.c \
+ uip_poll.c uip_chksum.c uip_callback.c
+
+# ARP supported is not provided for SLIP (Ethernet only)
+
+ifneq ($(CONFIG_NET_SLIP),y)
+UIP_CSRCS += uip_arp.c uip_arptab.c
+endif
+
+# IPv6-specific logic
ifeq ($(CONFIG_NET_IPv6),y)
UIP_CSRCS += uip_neighbor.c
endif
-# TCP source files
+# TCP/IP source files
ifeq ($(CONFIG_NET_TCP),y)
diff --git a/nuttx/net/uip/uip_arp.c b/nuttx/net/uip/uip_arp.c
index 413fcddc2..03a68ec2f 100644
--- a/nuttx/net/uip/uip_arp.c
+++ b/nuttx/net/uip/uip_arp.c
@@ -2,7 +2,7 @@
* net/uip/uip_arp.c
* Implementation of the ARP Address Resolution Protocol.
*
- * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Based on uIP which also has a BSD style license:
@@ -61,10 +61,14 @@
#include <debug.h>
#include <netinet/in.h>
+
#include <net/ethernet.h>
+#include <net/uip/uipopt.h>
#include <net/uip/uip-arch.h>
#include <net/uip/uip-arp.h>
+#ifdef CONFIG_NET_ARP
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -422,4 +426,6 @@ void uip_arp_out(struct uip_driver_s *dev)
peth->type = HTONS(UIP_ETHTYPE_IP);
dev->d_len += UIP_LLH_LEN;
}
+
+#endif /* CONFIG_NET_ARP */
#endif /* CONFIG_NET */
diff --git a/nuttx/net/uip/uip_arptab.c b/nuttx/net/uip/uip_arptab.c
index b777727d4..b93ea761a 100644
--- a/nuttx/net/uip/uip_arptab.c
+++ b/nuttx/net/uip/uip_arptab.c
@@ -2,7 +2,7 @@
* net/uip/uip_arptab.c
* Implementation of the ARP Address Resolution Protocol.
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Based originally on uIP which also has a BSD style license:
@@ -51,10 +51,14 @@
#include <debug.h>
#include <netinet/in.h>
+
#include <net/ethernet.h>
+#include <net/uip/uipopt.h>
#include <net/uip/uip-arch.h>
#include <net/uip/uip-arp.h>
+#ifdef CONFIG_NET_ARP
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -249,4 +253,5 @@ struct arp_entry *uip_arp_find(in_addr_t ipaddr)
return NULL;
}
+#endif /* CONFIG_NET_ARP */
#endif /* CONFIG_NET */