/[lwip]/lwip/src/include/netif/etharp.h
ViewVC logotype

Diff of /lwip/src/include/netif/etharp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by likewise, Sat Oct 19 13:00:14 2002 UTC revision 1.2 by likewise, Mon Nov 4 14:56:24 2002 UTC
# Line 63  PACK_STRUCT_END Line 63  PACK_STRUCT_END
63  #define ETHTYPE_ARP 0x0806  #define ETHTYPE_ARP 0x0806
64  #define ETHTYPE_IP  0x0800  #define ETHTYPE_IP  0x0800
65    
 /* Initializes ARP. */  
66  void etharp_init(void);  void etharp_init(void);
   
 /* The etharp_tmr() function should be called every ETHARP_TMR_INTERVAL  
    microseconds (10 seconds). This function is responsible for  
    expiring old entries in the ARP table. */  
67  void etharp_tmr(void);  void etharp_tmr(void);
   
 /* Should be called for all incoming packets of IP kind. The function  
    does not alter the packet in any way, it just updates the ARP  
    table. After this function has been called, the normal TCP/IP stack  
    input function should be called.  
   
    The function may return a pbuf containing a packet that had  
    previously been queued for transmission. The device driver must  
    transmit this packet onto the network, and call pbuf_free() for the  
    pbuf.  
 */  
68  struct pbuf *etharp_ip_input(struct netif *netif, struct pbuf *p);  struct pbuf *etharp_ip_input(struct netif *netif, struct pbuf *p);
   
 /* Should be called for incoming ARP packets. The pbuf in the argument  
    is freed by this function. If the function returns a pbuf (i.e.,  
    returns non-NULL), that pbuf constitutes an ARP reply and should be  
    sent out on the Ethernet.  
   
    The driver must call pbuf_free() for the returned pbuf when the  
    packet has been sent.  
 */  
69  struct pbuf *etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr,  struct pbuf *etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr,
70                             struct pbuf *p);                             struct pbuf *p);
   
   
 /* The etharp_output() function should be called for all outgoing  
    packets. The pbuf returned by the function should be sent out on  
    the Ethernet.  
   
    The function prepares the packet for transmission over the Ethernet  
    by adding an Ethernet header. If there is no IP -> MAC address  
    mapping, the function will queue the outgoing packet and return an  
    ARP request.  
 */  
71  struct pbuf *etharp_output(struct netif *netif, struct ip_addr *ipaddr,  struct pbuf *etharp_output(struct netif *netif, struct ip_addr *ipaddr,
72                             struct pbuf *q);                             struct pbuf *q);
73    struct pbuf *etharp_output_sent(struct pbuf *p);
74    struct pbuf *etharp_query(struct netif *netif, struct ip_addr *ipaddr);
75    
76    
77  #endif /* __NETIF_ARP_H__ */  #endif /* __NETIF_ARP_H__ */

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26