Definition in file arp.h.
Go to the source code of this file.
Data Structures | |
struct | arp_entry |
ARP packet header fields. More... | |
Defines | |
#define | MAXHWALEN 6 |
#define | MAXPRALEN 4 |
#define | ARP_TSIZE 10 |
ARP cache size (number of entries). | |
#define | ARP_TIMEOUT 60 |
ARP cache entry refresh period (in seconds). | |
#define | ARP_RESEND 2 |
ARP Request resend period (in seconds). | |
#define | ARP_MAXRETRY 5 |
Number of IP address resolving retires. | |
#define | ARP_FREE 0 |
#define | ARP_RESERVED 1 |
#define | ARP_PENDING 2 |
#define | ARP_RESOLVED 3 |
#define | ARP_REFRESHING 4 |
#define | ARP_FIXED_IP 0 |
#define | ARP_TEMP_IP 1 |
Functions | |
void | arp_init (void) |
Initialize data structures for ARP processing. | |
INT8 | arp_alloc (UINT8) |
Allocate ARP entry in ARP cache table. | |
void | arp_send_req (UINT8) |
Send ARP request based on information in an ARP cache table. | |
arp_entry * | arp_find (LWORD, struct netif *, UINT8) |
Find an ARP entry given a protocol address. | |
void | arp_manage (void) |
Manage ARP cache periodically. | |
BYTE | is_subnet (LWORD, struct netif *) |
Checks if a given IP address belongs to the subnet of a given machine. | |
BYTE | process_arp (struct ethernet_frame *) |
Process and analyze the received ARP packet. | |
void | arp_send_response (void) |
Send response to an ARP request. | |
void | arp_get_response (void) |
Extract data from the received ARP packet. | |
INT8 | arp_add (UINT32, UINT8 *, UINT8) |
Add given IP address and MAC address to ARP cache. |
|
Maximum HW address Length (6=Eth) Definition at line 74 of file arp.h. Referenced by arp_add(), arp_get_response(), arp_init(), arp_send_req(), arp_send_response(), process_arp(), and process_ip_out(). |
|
Maximum Protocol adr.len (4=IPv4) Definition at line 75 of file arp.h. Referenced by arp_get_response(), arp_send_req(), arp_send_response(), and process_arp(). |
|
Entry is Unused (initial value) Definition at line 185 of file arp.h. Referenced by arp_add(), arp_alloc(), arp_find(), arp_get_response(), arp_init(), and arp_manage(). |
|
Entry is reserved (allocated) Definition at line 186 of file arp.h. Referenced by arp_alloc(), and arp_get_response(). |
|
Entry is used but incomplete Definition at line 187 of file arp.h. Referenced by arp_find(), and arp_manage(). |
|
Entry has been resolved Definition at line 188 of file arp.h. Referenced by arp_add(), arp_find(), arp_get_response(), arp_init(), and arp_manage(). |
|
Entry is being refreshed Definition at line 189 of file arp.h. Referenced by arp_manage(). |
|
For Fixed addresses like GW. Entry is refreshed after ttl Definition at line 195 of file arp.h. Referenced by arp_add(), arp_find(), arp_init(), and arp_manage(). |
|
For Temporary addresses. Entry is removed after ttl Definition at line 196 of file arp.h. Referenced by arp_alloc(), arp_init(), arp_manage(), arp_send_response(), process_ip_in(), and process_ip_out(). |
|
Definition at line 910 of file arp.c. References ARP_FIXED_IP, ARP_FREE, ARP_MAXRETRY, ARP_RESOLVED, ARP_TEMP_IP, ARP_TIMEOUT, arp_timer, get_timer(), arp_entry::hwadr, init_timer(), MAXHWALEN, arp_entry::pradr, arp_entry::retries, arp_entry::state, TIMERTIC, arp_entry::ttl, and arp_entry::type. |
|
Definition at line 466 of file arp.c. References ARP_FREE, ARP_RESERVED, ARP_TEMP_IP, arp_entry::state, and arp_entry::type. Referenced by arp_add(), and arp_find(). |
|
Definition at line 390 of file arp.c. References ARP_BUFFER, MAXHWALEN, MAXPRALEN, NETWORK_ADD_DATALINK, NETWORK_COMPLETE_SEND, NETWORK_SEND_INITIALIZE, arp_entry::pradr, PROTOCOL_ARP, and SEND_NETWORK_B. Referenced by arp_find(), and arp_manage(). |
|
Definition at line 639 of file arp.c. References arp_alloc(), ARP_FIXED_IP, ARP_FREE, ARP_MAXRETRY, ARP_PENDING, ARP_RESEND, ARP_RESOLVED, arp_send_req(), arp_entry::hwadr, is_subnet(), arp_entry::pradr, arp_entry::retries, arp_entry::state, and arp_entry::ttl. Referenced by process_ip_out(). |
|
Definition at line 785 of file arp.c. References ARP_FIXED_IP, ARP_FREE, ARP_PENDING, ARP_REFRESHING, ARP_RESEND, ARP_RESOLVED, arp_send_req(), ARP_TEMP_IP, ARP_TIMEOUT, arp_timer, check_timer(), init_timer(), arp_entry::pradr, arp_entry::retries, arp_entry::state, TIMERTIC, arp_entry::ttl, and arp_entry::type. |
|
Definition at line 960 of file arp.c. References netif::localip, and netif::netmask. Referenced by arp_add(), and arp_find(). |
|
Definition at line 116 of file arp.c. References arp_get_response(), arp_send_response(), ethernet_frame::buf_index, ethernet_frame::frame_size, MAXHWALEN, MAXPRALEN, NETWORK_RECEIVE_INITIALIZE, ethernet_frame::protocol, and RECEIVE_NETWORK_B. |
|
Definition at line 188 of file arp.c. References arp_add(), ARP_BUFFER, ARP_TEMP_IP, MAXHWALEN, MAXPRALEN, NETWORK_ADD_DATALINK, NETWORK_COMPLETE_SEND, NETWORK_SEND_INITIALIZE, PROTOCOL_ARP, RECEIVE_NETWORK_B, and SEND_NETWORK_B. Referenced by process_arp(). |
|
Definition at line 307 of file arp.c. References ARP_FREE, ARP_MAXRETRY, ARP_RESERVED, ARP_RESOLVED, ARP_TIMEOUT, arp_entry::hwadr, MAXHWALEN, MAXPRALEN, arp_entry::pradr, RECEIVE_NETWORK_B, arp_entry::retries, arp_entry::state, and arp_entry::ttl. Referenced by process_arp(). |
|
Definition at line 552 of file arp.c. References arp_alloc(), ARP_FIXED_IP, ARP_FREE, ARP_MAXRETRY, ARP_RESOLVED, ARP_TIMEOUT, FALSE, arp_entry::hwadr, is_subnet(), MAXHWALEN, arp_entry::pradr, arp_entry::retries, arp_entry::state, and arp_entry::ttl. Referenced by arp_send_response(), and process_ip_in(). |