35#ifndef __NETIF_ETHARP_H__
36#define __NETIF_ETHARP_H__
40#if LWIP_ARP || LWIP_ETHERNET
43#include "lwip/ip_addr.h"
51#ifndef ETHARP_HWADDR_LEN
52#define ETHARP_HWADDR_LEN 6
55#ifdef PACK_STRUCT_USE_INCLUDES
63#ifdef PACK_STRUCT_USE_INCLUDES
67#ifdef PACK_STRUCT_USE_INCLUDES
81#ifdef PACK_STRUCT_USE_INCLUDES
85#define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE)
87#if ETHARP_SUPPORT_VLAN
89#ifdef PACK_STRUCT_USE_INCLUDES
101#ifdef PACK_STRUCT_USE_INCLUDES
105#define SIZEOF_VLAN_HDR 4
106#define VLAN_ID(vlan_hdr) (htons((vlan_hdr)->prio_vid) & 0xFFF)
110#ifdef PACK_STRUCT_USE_INCLUDES
127#ifdef PACK_STRUCT_USE_INCLUDES
131#define SIZEOF_ETHARP_HDR 28
132#define SIZEOF_ETHARP_PACKET (SIZEOF_ETH_HDR + SIZEOF_ETHARP_HDR)
135#define ARP_TMR_INTERVAL 5000
137#define ETHTYPE_ARP 0x0806U
138#define ETHTYPE_IP 0x0800U
139#define ETHTYPE_VLAN 0x8100U
140#define ETHTYPE_PPPOEDISC 0x8863U
141#define ETHTYPE_PPPOE 0x8864U
145#ifndef ETHADDR32_COPY
146#define ETHADDR32_COPY(src, dst) SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
151#ifndef ETHADDR16_COPY
152#define ETHADDR16_COPY(src, dst) SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
167#ifndef LWIP_ARP_FILTER_NETIF
168#define LWIP_ARP_FILTER_NETIF 0
175struct etharp_q_entry {
176 struct etharp_q_entry *
next;
182void etharp_tmr(
void);
184 struct eth_addr **eth_ret,
ip_addr_t **ip_ret);
192#define etharp_gratuitous(netif) etharp_request((netif), &(netif)->ip_addr)
193void etharp_cleanup_netif(
struct netif *
netif);
195#if ETHARP_SUPPORT_STATIC_ENTRIES
196err_t etharp_add_static_entry(
ip_addr_t *ipaddr,
struct eth_addr *ethaddr);
201err_t etharp_raw(
struct netif *
netif,
const struct eth_addr *ethsrc_addr,
202 const struct eth_addr *ethdst_addr,
203 const struct eth_addr *hwsrc_addr,
const ip_addr_t *ipsrc_addr,
204 const struct eth_addr *hwdst_addr,
const ip_addr_t *ipdst_addr,
212#define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETHARP_HWADDR_LEN) == 0)
214extern const struct eth_addr ethbroadcast, ethzero;
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_FIELD(x)
#define PACK_STRUCT_STRUCT
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble GLdouble q
GLenum const GLvoid * addr
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
static const DWORD padding[]
static unsigned __int64 next