arp.h File Reference

#include "net/pbuf.h"
#include "net/ipv4/ip_addr.h"
#include "net/netif.h"

Go to the source code of this file.

Data Structures

struct  eth_addr
struct  eth_hdr

Defines

#define ARP_TMR_INTERVAL   10000
#define ETHTYPE_ARP   0x0806
#define ETHTYPE_IP   0x0800

Functions

pbufarp_arp_input (struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
void arp_init (void)
void arp_ip_input (struct netif *netif, struct pbuf *p)
eth_addrarp_lookup (struct ip_addr *ipaddr)
pbufarp_query (struct netif *netif, struct eth_addr *ethaddr, struct ip_addr *ipaddr)
void arp_tmr (void)

Variables

eth_hdr PACK_STRUCT_STRUCT
eth_addr PACK_STRUCT_STRUCT


Define Documentation

#define ARP_TMR_INTERVAL   10000

Definition at line 58 of file arp.h.

Referenced by arp_timer(), and ethernetif_init().

#define ETHTYPE_ARP   0x0806

Definition at line 60 of file arp.h.

Referenced by arp_arp_input(), arp_query(), and ethernetif_input().

#define ETHTYPE_IP   0x0800

Definition at line 61 of file arp.h.

Referenced by arp_arp_input(), arp_query(), ethernetif_input(), and ethernetif_output().


Function Documentation

struct pbuf* arp_arp_input ( struct netif netif,
struct eth_addr ethaddr,
struct pbuf p 
)

Definition at line 197 of file arp.c.

References add_arp_entry(), ARP_REPLY, ARP_REQUEST, ARPH_HWLEN_SET, ARPH_PROTOLEN_SET, ETHTYPE_ARP, ETHTYPE_IP, htons, HWTYPE_ETHERNET, netif::ip_addr, ip_addr_cmp, ip_addr_set, kprintf(), NULL, pbuf::payload, pbuf_free(), and pbuf::tot_len.

Referenced by ethernetif_input().

void arp_init ( void   ) 

Definition at line 93 of file arp.c.

References arp_table, ARP_TABLE_SIZE, IP_ADDR_ANY, ip_addr_set, and arp_entry::ipaddr.

Referenced by ethernetif_init().

void arp_ip_input ( struct netif netif,
struct pbuf p 
)

Definition at line 181 of file arp.c.

References add_arp_entry(), ARP_DEBUG, DEBUGF, netif::ip_addr, ip_addr_maskcmp, netif::netmask, and pbuf::payload.

Referenced by ethernetif_input().

struct eth_addr* arp_lookup ( struct ip_addr ipaddr  ) 

Definition at line 253 of file arp.c.

References arp_table, ARP_TABLE_SIZE, ip_addr_cmp, and NULL.

Referenced by ethernetif_output().

struct pbuf* arp_query ( struct netif netif,
struct eth_addr ethaddr,
struct ip_addr ipaddr 
)

Definition at line 266 of file arp.c.

References ARP_REQUEST, ARPH_HWLEN_SET, ARPH_PROTOLEN_SET, ETHTYPE_ARP, ETHTYPE_IP, htons, HWTYPE_ETHERNET, netif::ip_addr, ip_addr_set, NULL, pbuf::payload, pbuf_alloc(), PBUF_LINK, and PBUF_RAM.

Referenced by ethernetif_output().

void arp_tmr ( void   ) 

Definition at line 104 of file arp.c.

References ARP_DEBUG, ARP_MAXAGE, arp_table, ARP_TABLE_SIZE, ctime, DEBUGF, IP_ADDR_ANY, ip_addr_isany, ip_addr_set, and arp_entry::ipaddr.

Referenced by arp_timer().


Variable Documentation

struct eth_hdr PACK_STRUCT_STRUCT

struct eth_addr PACK_STRUCT_STRUCT


Generated on Tue Dec 12 08:52:11 2006 for UbixOS V2 by  doxygen 1.4.7