mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
NET: More renaming
This commit is contained in:
@@ -60,13 +60,13 @@
|
||||
|
||||
/* Recognized values of the type bytes in the Ethernet header */
|
||||
|
||||
#define UIP_ETHTYPE_ARP 0x0806 /* Address resolution protocol */
|
||||
#define UIP_ETHTYPE_IP 0x0800 /* IP protocol */
|
||||
#define UIP_ETHTYPE_IP6 0x86dd /* IP protocol version 6 */
|
||||
#define ETHTYPE_ARP 0x0806 /* Address resolution protocol */
|
||||
#define ETHTYPE_IP 0x0800 /* IP protocol */
|
||||
#define ETHTYPE_IP6 0x86dd /* IP protocol version 6 */
|
||||
|
||||
/* Size of the Ethernet header */
|
||||
|
||||
#define UIP_ETHH_LEN 14 /* Minimum size: 2*6 + 2 */
|
||||
#define ETHHDR_LEN 14 /* Minimum size: 2*6 + 2 */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
||||
@@ -89,11 +89,11 @@
|
||||
# ifdef CONFIG_NET_IPv6
|
||||
# error "SLIP is not implemented for IPv6"
|
||||
# endif
|
||||
# define UIP_LLH_LEN 0
|
||||
# define NET_LLH_LEN 0
|
||||
#else
|
||||
# define CONFIG_NET_ETHERNET 1
|
||||
# define CONFIG_NET_ARP 1
|
||||
# define UIP_LLH_LEN 14
|
||||
# define NET_LLH_LEN 14
|
||||
#endif
|
||||
|
||||
/* Layer 3/4 Configuration Options ******************************************/
|
||||
@@ -158,10 +158,10 @@
|
||||
#endif
|
||||
|
||||
/* The UDP maximum packet size. This is should not be to set to more
|
||||
* than CONFIG_NET_BUFSIZE - UIP_LLH_LEN - UIP_IPUDPH_LEN.
|
||||
* than CONFIG_NET_BUFSIZE - NET_LLH_LEN - UIP_IPUDPH_LEN.
|
||||
*/
|
||||
|
||||
#define UIP_UDP_MSS (CONFIG_NET_BUFSIZE - UIP_LLH_LEN - UIP_IPUDPH_LEN)
|
||||
#define UDP_MSS (CONFIG_NET_BUFSIZE - NET_LLH_LEN - UIP_IPUDPH_LEN)
|
||||
|
||||
/* TCP configuration options */
|
||||
|
||||
@@ -223,10 +223,10 @@
|
||||
#define UIP_MAXSYNRTX 5
|
||||
|
||||
/* The TCP maximum segment size. This is should not be set to more
|
||||
* than CONFIG_NET_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN.
|
||||
* than CONFIG_NET_BUFSIZE - NET_LLH_LEN - UIP_TCPIP_HLEN.
|
||||
*/
|
||||
|
||||
#define UIP_TCP_MSS (CONFIG_NET_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)
|
||||
#define TCP_MSS (CONFIG_NET_BUFSIZE - NET_LLH_LEN - UIP_TCPIP_HLEN)
|
||||
|
||||
/* The size of the advertised receiver's window.
|
||||
*
|
||||
@@ -236,7 +236,7 @@
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NET_RECEIVE_WINDOW
|
||||
# define CONFIG_NET_RECEIVE_WINDOW UIP_TCP_MSS
|
||||
# define CONFIG_NET_RECEIVE_WINDOW TCP_MSS
|
||||
#endif
|
||||
|
||||
/* How long a connection should stay in the TIME_WAIT state.
|
||||
|
||||
@@ -110,7 +110,7 @@ struct net_driver_s
|
||||
* driver should place incoming data into this buffer. When sending data,
|
||||
* the device driver should read the link level headers and the TCP/IP
|
||||
* headers from this buffer. The size of the link level headers is
|
||||
* configured by the UIP_LLH_LEN define.
|
||||
* configured by the NET_LLH_LEN define.
|
||||
*
|
||||
* uIP will handle only a single buffer for both incoming and outgoing
|
||||
* packets. However, the drive design may be concurrently send and
|
||||
@@ -246,7 +246,7 @@ typedef int (*devif_poll_callback_t)(struct net_driver_s *dev);
|
||||
* dev->d_len = ethernet_devicedrver_poll();
|
||||
* if (dev->d_len > 0)
|
||||
* {
|
||||
* if (BUF->type == HTONS(UIP_ETHTYPE_IP))
|
||||
* if (BUF->type == HTONS(ETHTYPE_IP))
|
||||
* {
|
||||
* arp_ipin();
|
||||
* devif_input(dev);
|
||||
@@ -256,7 +256,7 @@ typedef int (*devif_poll_callback_t)(struct net_driver_s *dev);
|
||||
* devicedriver_send();
|
||||
* }
|
||||
* }
|
||||
* else if (BUF->type == HTONS(UIP_ETHTYPE_ARP))
|
||||
* else if (BUF->type == HTONS(ETHTYPE_ARP))
|
||||
* {
|
||||
* arp_arpin();
|
||||
* if (dev->d_len > 0)
|
||||
|
||||
@@ -120,10 +120,10 @@
|
||||
* This is a long established rule.
|
||||
*/
|
||||
|
||||
#if UIP_TCP_MSS > 576
|
||||
#if TCP_MSS > 576
|
||||
# define UIP_TCP_INITIAL_MSS 576
|
||||
#else
|
||||
# define UIP_TCP_INITIAL_MSS UIP_TCP_MSS
|
||||
# define UIP_TCP_INITIAL_MSS TCP_MSS
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
* snprintf(dev->d_appdata, UIP_APPDATA_SIZE, "%u\n", i);
|
||||
*/
|
||||
|
||||
#define UIP_APPDATA_SIZE (CONFIG_NET_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)
|
||||
#define UIP_APPDATA_SIZE (CONFIG_NET_BUFSIZE - NET_LLH_LEN - UIP_TCPIP_HLEN)
|
||||
|
||||
#define UIP_PROTO_ICMP 1
|
||||
#define UIP_PROTO_IGMP 2
|
||||
@@ -205,7 +205,7 @@ struct net_iphdr_s
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
};
|
||||
|
||||
/* Describes a uIP callback
|
||||
/* Describes a device interface callback
|
||||
*
|
||||
* flink - Supports a singly linked list
|
||||
* event - Provides the address of the callback function entry point.
|
||||
@@ -213,8 +213,8 @@ struct net_iphdr_s
|
||||
* udp_conn_s.
|
||||
* priv - Holds a reference to application specific data that will
|
||||
* provided
|
||||
* flags - Set by the application to inform the uIP layer which flags
|
||||
* are and are not handled by the callback.
|
||||
* flags - Set by the application to inform the lower layer which flags
|
||||
* were and were not handled by the callback.
|
||||
*/
|
||||
|
||||
struct net_driver_s; /* Forward reference */
|
||||
|
||||
Reference in New Issue
Block a user