Definition in file pcarp.h.
Go to the source code of this file.
Data Structures | |
| struct | gate_entry |
| struct | arp_entry |
Functions | |
| W32_FUNC int | _arp_list_gateways (struct gate_entry *gw, int max) |
| Gateway functions. | |
| int | _arp_check_gateways (void) |
| Return number of default gateways. | |
| BOOL | _arp_add_gateway (const char *config_string, DWORD ip) |
| Add a gateway to the routing table. | |
| BOOL | _arp_have_default_gw (void) |
| Check if we have at least one default gateway. | |
| void | _arp_kill_gateways (void) |
| Delete all gateways. | |
| W32_FUNC BOOL | _arp_resolve (DWORD ina, eth_address *eth) |
| Blocking ARP resolve functions. | |
| W32_FUNC BOOL | _arp_check_own_ip (eth_address *eth) |
| Used by DHCP initialisation. | |
| BOOL | arp_start_lookup (DWORD ip) |
| New non-blocking functions, GvB 2002-09. | |
| BOOL | arp_lookup (DWORD ip, eth_address *eth) |
| Lookup MAC-address of 'ip'. | |
| BOOL | arp_lookup_fixed (DWORD ip, eth_address *eth) |
| Lookup fixed MAC-address of 'ip'. | |
| BOOL | arp_lookup_pending (DWORD ip) |
| An ARP-lookup timeout check. | |
| BOOL | _arp_add_cache (DWORD ip, const void *eth, BOOL expire) |
| ARP cache functions. | |
| BOOL | _arp_delete_cache (DWORD ip) |
| Delete given 'ip' address from ARP-cache (dynamic or fixed). | |
| W32_FUNC int | _arp_list_cache (struct arp_entry *arp, int max) |
| Return contents of ARP cache. | |
| void | _arp_init (void) |
| 'Internal' interface to pctcp.c & others. | |
| BOOL | _arp_reply (const void *mac_dst, DWORD src_ip, DWORD dst_ip) |
| Send unicast/broadcast ARP reply. | |
| BOOL | _arp_handler (const arp_Header *arp, BOOL brdcast) |
| Receive ARP handler. | |
| BOOL | _arp_register (DWORD use_this_gateway_ip, DWORD for_this_host_ip) |
| ICMP redirection. | |
| W32_FUNC void | _arp_debug_dump (void) |
| Debug-dump of configured gateways, route table and ARP cache. | |
|
||||||||||||||||
|
ARP cache functions.
References _arp_delete_cache(), arp_move_entry(), DWORD, arp_entry::ip, is_on_LAN(), my_ip_addr, and set_timeout(). |
|
||||||||||||
|
Add a gateway to the routing table. The format of 'config_string' is: IP-address [, subnet] , mask]] If 'config_string' is NULL, simply add 'ip' with zero mask and subnet. Definition at line 185 of file pcarp.c. References aton(), DWORD, and gate_entry::gate_ip. |
|
|
Used by DHCP initialisation. Do an ARP resolve on our own IP address to check if someone else is replying. Return non-zero if someone replied.
References _arp_resolve(), DWORD, eth_address, and my_ip_addr. |
|
|
Debug-dump of configured gateways, route table and ARP cache. Redone + moved here from pcdbug.c for encapsulation reasons GvB 2002-09 Definition at line 1625 of file pcarp.c. References _inet_ntoa(), DWORD, MAC_address(), gate_entry::mask, set_timeout(), and sin_mask. |
|
|
Delete given 'ip' address from ARP-cache (dynamic or fixed).
References arp_move_entry(), DWORD, arp_entry::flags, and arp_entry::ip. |
|
||||||||||||
|
Receive ARP handler. This processes incoming 'raw' ARP packets supplied by tcp_tick(). Definition at line 1412 of file pcarp.c. References _arp_add_cache(), _arp_reply(), _eth_addr, _eth_brdcast, _eth_get_hwtype(), _eth_mac_len, _inet_ntoa(), _pkt_rxmode, arp_move_entry(), arp_Header::dstIPAddr, DWORD, eth_address, arp_entry::expiry, arp_entry::flags, arp_Header::hwAddrLen, arp_Header::hwType, arp_entry::ip, MAC_address(), my_ip_addr, arp_Header::opcode, arp_Header::protoAddrLen, arp_Header::protType, RXMODE_BROADCAST, set_timeout(), arp_Header::srcEthAddr, arp_Header::srcIPAddr, and WORD. |
|
||||||||||||
|
Return contents of ARP cache. 'max' entries are returned in 'arp[]' buffers. Only entries in-use are returned. Definition at line 1576 of file pcarp.c. References eth_address, arp_entry::expiry, arp_entry::flags, arp_entry::hardware, and arp_entry::ip. |
|
||||||||||||
|
Gateway functions.
References gate_entry::echo_pending, gate_entry::gate_ip, gate_entry::is_dead, gate_entry::mask, and gate_entry::subnet. |
|
||||||||||||
|
ICMP redirection. Called on ICMP-redirects. Redirects are sent from a gateway/router, telling us that a different gateway is better suited to connect to the specified host than the one we were using. Definition at line 718 of file pcarp.c. |
|
||||||||||||||||
|
Send unicast/broadcast ARP reply. 'src_ip' and 'dst_ip' on network order. Definition at line 409 of file pcarp.c. References _eth_addr, _eth_brdcast, _eth_formatpacket(), _eth_get_hwtype(), arp_send(), arp_Header::dstEthAddr, arp_Header::dstIPAddr, DWORD, arp_Header::hwAddrLen, arp_Header::hwType, arp_Header::opcode, arp_Header::protoAddrLen, arp_Header::protType, arp_Header::srcEthAddr, and arp_Header::srcIPAddr. |
|
||||||||||||
|
Blocking ARP resolve functions. Doesn't return until success or time-out. Definition at line 1108 of file pcarp.c. |
|
||||||||||||
|
Lookup MAC-address of 'ip'.
References _eth_addr, _pktserial, DWORD, eth_address, is_on_LAN(), LAN_lookup(), and route_lookup(). |
|
||||||||||||
|
Lookup fixed MAC-address of 'ip'.
References _pktserial, DWORD, eth_address, arp_entry::ip, and is_on_LAN(). |
|
|
An ARP-lookup timeout check.
References DWORD, is_on_LAN(), LAN_lookup_pending(), and route_lookup_pending(). |
|
|
New non-blocking functions, GvB 2002-09. This is called by 'higher' routines to start an ARP request. This function is non-blocking, i.e. returns 'immediately'. Definition at line 1012 of file pcarp.c. References _pktserial, DWORD, is_on_LAN(), LAN_start_lookup(), and route_start_lookup(). |
1.3.8