Changed PAD_ETH_SIZE into ETH_PAD_SIZE for consistency with de-facto lwIP naming convention.

This commit is contained in:
likewise 2004-05-05 15:09:13 +00:00
parent 0c960a82ce
commit b217b020a5
3 changed files with 19 additions and 18 deletions

View File

@ -453,9 +453,10 @@ pbuf_realloc(struct pbuf *p, u16_t new_len)
*
* The ->payload, ->tot_len and ->len fields are adjusted.
*
* @param hdr_size Number of bytes to increment header size which
* @param hdr_size_inc Number of bytes to increment header size which
* increases the size of the pbuf. New space is on the front.
* (Using a negative value decreases the header size.)
* If hdr_size_inc is 0, this function does nothing and returns succesful.
*
* PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so
* the call will fail. A check is made that the increase in header size does

View File

@ -35,8 +35,8 @@
#ifndef __NETIF_ETHARP_H__
#define __NETIF_ETHARP_H__
#ifndef PAD_ETH_SIZE
#define PAD_ETH_SIZE 0
#ifndef ETH_PAD_SIZE
#define ETH_PAD_SIZE 0
#endif
#include "lwip/pbuf.h"
@ -55,8 +55,8 @@ PACK_STRUCT_END
PACK_STRUCT_BEGIN
struct eth_hdr {
#if PAD_ETH_SIZE
PACK_STRUCT_FIELD(u8_t padding[PAD_ETH_SIZE]);
#if ETH_PAD_SIZE
PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]);
#endif
PACK_STRUCT_FIELD(struct eth_addr dest);
PACK_STRUCT_FIELD(struct eth_addr src);

View File

@ -103,8 +103,8 @@ low_level_output(struct ethernetif *ethernetif, struct pbuf *p)
initiate transfer();
#if PAD_ETH_SIZE
pbuf_header(p, -PAD_ETH_SIZE); /* drop the padding word */
#if ETH_PAD_SIZE
pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
#endif
for(q = p; q != NULL; q = q->next) {
@ -116,8 +116,8 @@ low_level_output(struct ethernetif *ethernetif, struct pbuf *p)
signal that packet should be sent();
#if PAD_ETH_SIZE
pbuf_header(p, PAD_ETH_SIZE); /* reclaim the padding word */
#if ETH_PAD_SIZE
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif
#ifdef LINK_STATS
@ -145,8 +145,8 @@ low_level_input(struct ethernetif *ethernetif)
variable. */
len = ;
#if PAD_ETH_SIZE
len += PAD_ETH_SIZE; /* allow room for Ethernet padding */
#if ETH_PAD_SIZE
len += ETH_PAD_SIZE; /* allow room for Ethernet padding */
#endif
/* We allocate a pbuf chain of pbufs from the pool. */
@ -154,22 +154,22 @@ low_level_input(struct ethernetif *ethernetif)
if (p != NULL) {
#if PAD_ETH_SIZE
pbuf_header(p, -PAD_ETH_SIZE); /* drop the padding word */
#if ETH_PAD_SIZE
pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
#endif
/* We iterate over the pbuf chain until we have read the entire
packet into the pbuf. */
* packet into the pbuf. */
for(q = p; q != NULL; q = q->next) {
/* Read enough bytes to fill this pbuf in the chain. The
available data in the pbuf is given by the q->len
variable. */
* available data in the pbuf is given by the q->len
* variable. */
read data into(q->payload, q->len);
}
acknowledge that packet has been read();
#if PAD_ETH_SIZE
pbuf_header(p, PAD_ETH_SIZE); /* reclaim the padding word */
#if ETH_PAD_SIZE
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif
#ifdef LINK_STATS