mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
include/: Remove all references to CONFIG_NET_MULTIBUFFER. d_buf in struct net_driver_s is now always a pointer vs. an array.
This commit is contained in:
@@ -137,7 +137,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_ARP_IPIN
|
||||
void arp_ipin(struct net_driver_s *dev);
|
||||
void arp_ipin(FAR struct net_driver_s **dev);
|
||||
#else
|
||||
# define arp_ipin(dev)
|
||||
#endif
|
||||
@@ -152,20 +152,20 @@ void arp_ipin(struct net_driver_s *dev);
|
||||
* that we previously sent out, the ARP cache will be filled in with
|
||||
* the values from the ARP reply. If the incoming ARP packet is an ARP
|
||||
* request for our IP address, an ARP reply packet is created and put
|
||||
* into the d_buf[] buffer.
|
||||
* into the d_buf buffer.
|
||||
*
|
||||
* On entry, this function expects that an ARP packet with a prepended
|
||||
* Ethernet header is present in the d_buf[] buffer and that the length of
|
||||
* Ethernet header is present in the d_buf buffer and that the length of
|
||||
* the packet is set in the d_len field.
|
||||
*
|
||||
* When the function returns, the value of the field d_len indicates whether
|
||||
* the device driver should send out the ARP reply packet or not. If d_len
|
||||
* is zero, no packet should be sent; If d_len is non-zero, it contains the
|
||||
* length of the outbound packet that is present in the d_buf[] buffer.
|
||||
* length of the outbound packet that is present in the d_buf buffer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void arp_arpin(struct net_driver_s *dev);
|
||||
void arp_arpin(FAR struct net_driver_s **dev);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arp_out
|
||||
@@ -183,13 +183,13 @@ void arp_arpin(struct net_driver_s *dev);
|
||||
* beginning of the packet and the function returns.
|
||||
*
|
||||
* If no ARP cache entry is found for the destination IIPv4P address, the
|
||||
* packet in the d_buf[] is replaced by an ARP request packet for the
|
||||
* packet in the d_buf is replaced by an ARP request packet for the
|
||||
* IPv4 address. The IPv4 packet is dropped and it is assumed that the
|
||||
* higher level protocols (e.g., TCP) eventually will retransmit the
|
||||
* dropped packet.
|
||||
*
|
||||
* Upon return in either the case, a packet to be sent is present in the
|
||||
* d_buf[] buffer and the d_len field holds the length of the Ethernet
|
||||
* d_buf buffer and the d_len field holds the length of the Ethernet
|
||||
* frame that should be transmitted.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -227,23 +227,19 @@ struct net_driver_s
|
||||
net_ipv6addr_t d_ipv6netmask; /* Network IPv6 subnet mask */
|
||||
#endif
|
||||
|
||||
/* The d_buf array is used to hold incoming and outgoing packets. The device
|
||||
* 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
|
||||
/* The d_buf array is used to hold incoming and outgoing packets. The
|
||||
* device 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 NET_LL_HDRLEN(dev) define.
|
||||
*
|
||||
* The network will handle only a single buffer for both incoming and
|
||||
* outgoing packets. However, the driver design may be concurrently send
|
||||
* and filling separate, break-off buffers if CONFIG_NET_MULTIBUFFER is
|
||||
* defined. That buffer management must be controlled by the driver.
|
||||
* outgoing packets. However, the driver design may be concurrently
|
||||
* sending and filling separate, break-off buffers. That buffer
|
||||
* management must be controlled by the driver.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NET_MULTIBUFFER
|
||||
uint8_t *d_buf;
|
||||
#else
|
||||
uint8_t d_buf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
#endif
|
||||
FAR uint8_t *d_buf;
|
||||
|
||||
/* d_appdata points to the location where application data can be read from
|
||||
* or written to in the the packet buffer.
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
/* Dependencies:
|
||||
*
|
||||
* CONFIG_NET_NOINTS - Required.
|
||||
* CONFIG_NET_MULTIBUFFER - Required.
|
||||
*
|
||||
* SLIP Configuration:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user