Resove merge conflicts

This commit is contained in:
Gregory Nutt
2014-11-15 10:04:33 -06:00
parent 2b758537ea
commit ebb6fd1e9c
3 changed files with 40 additions and 26 deletions
+39 -20
View File
@@ -80,15 +80,33 @@
* The "link level header" is the offset into the d_buf where the IP header * The "link level header" is the offset into the d_buf where the IP header
* can be found. For Ethernet, this should be set to 14. For SLIP, this * can be found. For Ethernet, this should be set to 14. For SLIP, this
* should be set to 0. * should be set to 0.
*
* If CONFIG_NET_MULTILINK is defined, then mutliple link protocols are
* supported concurrently. In this case, the size of link layer header
* varies and is obtained from the network device structure.
*/ */
#ifdef CONFIG_NET_SLIP #ifdef CONFIG_NET_MULTILINK
/* We are supporting multiple network devices and using different link
* level protocols. Get the size of the link layer header from the
* device structure.
*/
# define NET_LL_HDRLEN(d) ((d)->d_llhdrlen)
#if defined(CONFIG_NET_SLIP)
/* There is no link layer header with SLIP */
# ifdef CONFIG_NET_IPv6 # ifdef CONFIG_NET_IPv6
# error SLIP is not available for IPv6 # error SLIP is not available for IPv6
# endif # endif
# define NET_LL_HDRLEN 0 # define NET_LL_HDRLEN(d) 0
#else
# define NET_LL_HDRLEN 14 #else /* if defined(CONFIG_NET_ETHERNET) */
/* Assume standard Ethernet header */
# define NET_LL_HDRLEN(d) 14
#endif #endif
/* Layer 3/4 Configuration Options ******************************************/ /* Layer 3/4 Configuration Options ******************************************/
@@ -136,18 +154,18 @@
/* The maximum amount of concurrent UDP connection, Default: 10 */ /* The maximum amount of concurrent UDP connection, Default: 10 */
#ifndef CONFIG_NET_UDP_CONNS #ifndef CONFIG_NET_UDP_CONNS
# ifdef CONFIG_NET_UDP # ifdef CONFIG_NET_UDP
# define CONFIG_NET_UDP_CONNS 10 # define CONFIG_NET_UDP_CONNS 10
# else # else
# define CONFIG_NET_UDP_CONNS 0 # define CONFIG_NET_UDP_CONNS 0
# endif # endif
#endif #endif
/* The UDP maximum packet size. This is should not be to set to more /* The UDP maximum packet size. This is should not be to set to more
* than CONFIG_NET_BUFSIZE - NET_LL_HDRLEN - IPUDP_HDRLEN. * than CONFIG_NET_BUFSIZE - NET_LL_HDRLEN - IPUDP_HDRLEN.
*/ */
#define UDP_MSS (CONFIG_NET_BUFSIZE - NET_LL_HDRLEN - IPUDP_HDRLEN) #define UDP_MSS(d) (CONFIG_NET_BUFSIZE - NET_LL_HDRLEN(d) - IPUDP_HDRLEN)
/* TCP configuration options */ /* TCP configuration options */
@@ -159,11 +177,11 @@
*/ */
#ifndef CONFIG_NET_TCP_CONNS #ifndef CONFIG_NET_TCP_CONNS
# ifdef CONFIG_NET_TCP # ifdef CONFIG_NET_TCP
# define CONFIG_NET_TCP_CONNS 10 # define CONFIG_NET_TCP_CONNS 10
# else # else
# define CONFIG_NET_TCP_CONNS 0 # define CONFIG_NET_TCP_CONNS 0
# endif # endif
#endif #endif
/* The maximum number of simultaneously listening TCP ports. /* The maximum number of simultaneously listening TCP ports.
@@ -172,7 +190,7 @@
*/ */
#ifndef CONFIG_NET_MAX_LISTENPORTS #ifndef CONFIG_NET_MAX_LISTENPORTS
# define CONFIG_NET_MAX_LISTENPORTS 20 # define CONFIG_NET_MAX_LISTENPORTS 20
#endif #endif
/* Define the maximum number of concurrently active UDP and TCP /* Define the maximum number of concurrently active UDP and TCP
@@ -181,7 +199,7 @@
*/ */
#ifndef CONFIG_NET_NACTIVESOCKETS #ifndef CONFIG_NET_NACTIVESOCKETS
# define CONFIG_NET_NACTIVESOCKETS (CONFIG_NET_TCP_CONNS + CONFIG_NET_UDP_CONNS) # define CONFIG_NET_NACTIVESOCKETS (CONFIG_NET_TCP_CONNS + CONFIG_NET_UDP_CONNS)
#endif #endif
/* The initial retransmission timeout counted in timer pulses. /* The initial retransmission timeout counted in timer pulses.
@@ -222,7 +240,7 @@
*/ */
#ifndef CONFIG_NET_RECEIVE_WINDOW #ifndef CONFIG_NET_RECEIVE_WINDOW
# define CONFIG_NET_RECEIVE_WINDOW TCP_MSS # define CONFIG_NET_RECEIVE_WINDOW TCP_MSS
#endif #endif
/* How long a connection should stay in the TIME_WAIT state. /* How long a connection should stay in the TIME_WAIT state.
@@ -242,7 +260,7 @@
* have many connections from the local network. * have many connections from the local network.
*/ */
# define CONFIG_NET_ARPTAB_SIZE 8 # define CONFIG_NET_ARPTAB_SIZE 8
#endif #endif
#ifndef CONFIG_NET_ARP_MAXAGE #ifndef CONFIG_NET_ARP_MAXAGE
@@ -265,7 +283,7 @@
*/ */
#ifndef CONFIG_NET_BUFSIZE #ifndef CONFIG_NET_BUFSIZE
# define CONFIG_NET_BUFSIZE 400 # define CONFIG_NET_BUFSIZE 400
#endif #endif
/* Delay after receive to catch a following packet. No delay should be /* Delay after receive to catch a following packet. No delay should be
@@ -293,3 +311,4 @@
typedef uint16_t net_stats_t; typedef uint16_t net_stats_t;
#endif /* __INCLUDE_NUTTX_NET_NETCONFG_H */ #endif /* __INCLUDE_NUTTX_NET_NETCONFG_H */
-2
View File
@@ -100,10 +100,8 @@ struct net_driver_s
/* Multi network devices using multiple data links protocols are selected */ /* Multi network devices using multiple data links protocols are selected */
uint8_t d_lltype; /* See enum net_datalink_e */ uint8_t d_lltype; /* See enum net_datalink_e */
#if 0 /* Not yet */
uint8_t d_llhdrlen; /* Link layer header size */ uint8_t d_llhdrlen; /* Link layer header size */
#endif #endif
#endif
#ifdef CONFIG_NET_ETHERNET #ifdef CONFIG_NET_ETHERNET
/* Ethernet device identity */ /* Ethernet device identity */
+1 -4
View File
@@ -121,6 +121,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
#ifdef CONFIG_NET_MULTILINK #ifdef CONFIG_NET_MULTILINK
/* We are supporting multiple network devices and using different link /* We are supporting multiple network devices and using different link
* level protocols. Set the protocol usd by the device and the size * level protocols. Set the protocol usd by the device and the size
* level protocols. Set the protocol used by the device and the size
* of the link header used by this protocol. * of the link header used by this protocol.
*/ */
@@ -128,17 +129,13 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
{ {
#ifdef CONFIG_NET_ETHERNET #ifdef CONFIG_NET_ETHERNET
case NET_LL_ETHERNET: /* Ethernet */ case NET_LL_ETHERNET: /* Ethernet */
#if 0 /* REVISIT: Not yet supported */
dev->d_llhdrlen = ETH_HDRLEN; dev->d_llhdrlen = ETH_HDRLEN;
#endif
break; break;
#endif #endif
#ifdef CONFIG_NET_SLIP #ifdef CONFIG_NET_SLIP
case NET_LL_SLIP: /* Serial Line Internet Protocol (SLIP) */ case NET_LL_SLIP: /* Serial Line Internet Protocol (SLIP) */
#if 0 /* REVISIT: Not yet supported */
dev->d_llhdrlen = 0; dev->d_llhdrlen = 0;
#endif
break; break;
#endif #endif