Rename ip_eth_hdr to eth_hdr_s

This commit is contained in:
Gregory Nutt 2014-06-25 09:57:52 -06:00
parent f57024406a
commit 621097b6c8
26 changed files with 31 additions and 30 deletions

View File

@ -270,7 +270,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)c5471->c_dev.d_buf) #define BUF ((struct eth_hdr_s *)c5471->c_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -140,7 +140,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -152,7 +152,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->lp_dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->lp_dev.d_buf)
/* This is the number of ethernet GPIO pins that must be configured */ /* This is the number of ethernet GPIO pins that must be configured */

View File

@ -243,7 +243,7 @@
* header * header
*/ */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -248,7 +248,7 @@
* header * header
*/ */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -308,7 +308,7 @@
* header * header
*/ */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -174,7 +174,7 @@
* header * header
*/ */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -552,7 +552,7 @@
* header * header
*/ */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -151,7 +151,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define ETHBUF ((struct uip_eth_hdr *)priv->ld_dev.d_buf) #define ETHBUF ((struct eth_hdr_s *)priv->ld_dev.d_buf)
#define TIVA_MAX_MDCCLK 2500000 #define TIVA_MAX_MDCCLK 2500000

View File

@ -78,7 +78,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->d_dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->d_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -213,7 +213,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->pd_dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->pd_dev.d_buf)
/* PHYs *********************************************************************/ /* PHYs *********************************************************************/
/* Select PHY-specific values. Add more PHYs as needed. */ /* Select PHY-specific values. Add more PHYs as needed. */

View File

@ -60,7 +60,7 @@ extern int uipdriver_setmacaddr(unsigned char *macaddr);
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#define BUF ((struct uip_eth_hdr *)&uip_buf[0]) #define BUF ((struct eth_hdr_s *)&uip_buf[0])
#ifndef CONFIG_EXAMPLES_UIP_DHCPC #ifndef CONFIG_EXAMPLES_UIP_DHCPC
# define UIP_IPADDR (10 << 24 | 0 << 16 | 0 << 8 | 1) # define UIP_IPADDR (10 << 24 | 0 << 16 | 0 << 8 | 1)

View File

@ -233,7 +233,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define ETHBUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define ETHBUF ((struct eth_hdr_s *)priv->dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -80,7 +80,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)cs89x0->cs_dev.d_buf) #define BUF ((struct eth_hdr_s *)cs89x0->cs_dev.d_buf)
/* If there is only one CS89x0 instance, then mapping the CS89x0 IRQ to /* If there is only one CS89x0 instance, then mapping the CS89x0 IRQ to
* a driver state instance is trivial. * a driver state instance is trivial.

View File

@ -270,7 +270,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)dm9x->dm_dev.d_buf) #define BUF ((struct eth_hdr_s *)dm9x->dm_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -81,7 +81,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)e1000->uip_dev.d_buf) #define BUF ((struct eth_hdr_s *)e1000->uip_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -186,7 +186,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/* Debug ********************************************************************/ /* Debug ********************************************************************/

View File

@ -178,7 +178,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)priv->dev.d_buf) #define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
/* Debug ********************************************************************/ /* Debug ********************************************************************/

View File

@ -78,7 +78,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)skel->sk_dev.d_buf) #define BUF ((struct eth_hdr_s *)skel->sk_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -85,7 +85,7 @@
/* This is a helper pointer for accessing the contents of the Ethernet header */ /* This is a helper pointer for accessing the contents of the Ethernet header */
#define BUF ((struct uip_eth_hdr *)vnet->sk_dev.d_buf) #define BUF ((struct eth_hdr_s *)vnet->sk_dev.d_buf)
/**************************************************************************** /****************************************************************************
* Private Types * Private Types

View File

@ -77,7 +77,7 @@
* some compilers refuse to pack 6 byte structures. * some compilers refuse to pack 6 byte structures.
*/ */
struct uip_eth_hdr struct eth_hdr_s
{ {
uint8_t dest[6]; /* Ethernet destination address (6 bytes) */ uint8_t dest[6]; /* Ethernet destination address (6 bytes) */
uint8_t src[6]; /* Ethernet source address (6 bytes) */ uint8_t src[6]; /* Ethernet source address (6 bytes) */
@ -99,7 +99,8 @@ struct arp_entry
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif

View File

@ -236,7 +236,7 @@ struct uip_driver_s
* Ethernet, you will need to call the uIP ARP code before calling * Ethernet, you will need to call the uIP ARP code before calling
* this function: * this function:
* *
* #define BUF ((struct uip_eth_hdr *)&dev->d_buf[0]) * #define BUF ((struct eth_hdr_s *)&dev->d_buf[0])
* dev->d_len = ethernet_devicedrver_poll(); * dev->d_len = ethernet_devicedrver_poll();
* if (dev->d_len > 0) * if (dev->d_len > 0)
* { * {

View File

@ -80,7 +80,7 @@
#define RASIZE 4 /* Size of ROUTER ALERT */ #define RASIZE 4 /* Size of ROUTER ALERT */
#define ETHBUF ((struct uip_eth_hdr *)&dev->d_buf[0]) #define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[UIP_LLH_LEN]) #define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[UIP_LLH_LEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[UIP_LLH_LEN]) #define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[UIP_LLH_LEN])
@ -253,7 +253,7 @@ void arp_arpin(struct uip_driver_s *dev)
if (uip_ipaddr_cmp(ipaddr, dev->d_ipaddr)) if (uip_ipaddr_cmp(ipaddr, dev->d_ipaddr))
{ {
struct uip_eth_hdr *peth = ETHBUF; struct eth_hdr_s *peth = ETHBUF;
/* First, we register the one who made the request in our ARP /* First, we register the one who made the request in our ARP
* table, since it is likely that we will do more communication * table, since it is likely that we will do more communication
@ -322,7 +322,7 @@ void arp_out(struct uip_driver_s *dev)
{ {
const struct arp_entry *tabptr = NULL; const struct arp_entry *tabptr = NULL;
struct arp_hdr_s *parp = ARPBUF; struct arp_hdr_s *parp = ARPBUF;
struct uip_eth_hdr *peth = ETHBUF; struct eth_hdr_s *peth = ETHBUF;
struct arp_iphdr_s *pip = IPBUF; struct arp_iphdr_s *pip = IPBUF;
in_addr_t ipaddr; in_addr_t ipaddr;
in_addr_t destipaddr; in_addr_t destipaddr;

View File

@ -207,7 +207,7 @@ void uip_pktfree(struct uip_pkt_conn *conn)
* *
****************************************************************************/ ****************************************************************************/
struct uip_pkt_conn *uip_pktactive(struct uip_eth_hdr *buf) struct uip_pkt_conn *uip_pktactive(struct eth_hdr_s *buf)
{ {
#define uip_ethaddr_cmp(addr1, addr2) \ #define uip_ethaddr_cmp(addr1, addr2) \
((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \ ((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \

View File

@ -58,7 +58,7 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#define PKTBUF ((struct uip_eth_hdr *)&dev->d_buf) #define PKTBUF ((struct eth_hdr_s *)&dev->d_buf)
/**************************************************************************** /****************************************************************************
* Public Variables * Public Variables
@ -98,7 +98,7 @@
int uip_pktinput(struct uip_driver_s *dev) int uip_pktinput(struct uip_driver_s *dev)
{ {
struct uip_pkt_conn *conn; struct uip_pkt_conn *conn;
struct uip_eth_hdr *pbuf = (struct uip_eth_hdr *)dev->d_buf; struct eth_hdr_s *pbuf = (struct eth_hdr_s *)dev->d_buf;
int ret = OK; int ret = OK;
conn = uip_pktactive(pbuf); conn = uip_pktactive(pbuf);

View File

@ -110,7 +110,7 @@ uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn,
void uip_pktinit(void); void uip_pktinit(void);
struct uip_pkt_conn *uip_pktalloc(void); struct uip_pkt_conn *uip_pktalloc(void);
void uip_pktfree(struct uip_pkt_conn *conn); void uip_pktfree(struct uip_pkt_conn *conn);
struct uip_pkt_conn *uip_pktactive(struct uip_eth_hdr *buf); struct uip_pkt_conn *uip_pktactive(struct eth_hdr_s *buf);
struct uip_pkt_conn *uip_nextpktconn(struct uip_pkt_conn *conn); struct uip_pkt_conn *uip_nextpktconn(struct uip_pkt_conn *conn);
/* Defined in uip_pktcallback.c *********************************************/ /* Defined in uip_pktcallback.c *********************************************/