# arp

ARP - Address Resolution Protocol BETA

Author | Matthew Schinkel - borntechi.com, copyright © 2009, all rights reserved.
Adapted-by |
Compiler | >=2.4n

Description

    sends, receives and replys to ARP network packets

Sources

    http://www.faqs.org/rfcs/rfc826.html
    http://www.visualland.net/view.php?cid=857&protocol=ARP&title=1.%20Basic-update

Dependencies

- delay

## Summary

### Global variables/contants

- `const byte ARP_PROTOCOL_TYPE = 2`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_0 = 18`
- `const byte ARP_TARGET_PROTOCOL_ADDRESS_2 = 26`
- `const byte ARP_SENDER_PROTOCOL_ADDRESS_3 = 17`
- `var bit arp_packet_from_destination = FALSE`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_2 = 20`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_5 = 13`
- `const byte ARP_SENDER_PROTOCOL_ADDRESS_1 = 15`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_2 = 10`
- `const byte ARP_HARDWARE_LENGTH = 4`
- `const byte ARP_PROTOCOL_LENGTH = 5`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_0 = 8`
- `const byte ARP_REPLY = 2`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_3 = 21`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_3 = 11`
- `const byte ARP_OPERATION = 6`
- `const byte ARP_HARDWARE_TYPE = 0`
- `const byte ARP_SENDER_PROTOCOL_ADDRESS_2 = 16`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_4 = 12`
- `const byte ARP_SENDER_HARDWARE_ADDRESS_1 = 9`
- `const byte ARP_SENDER_PROTOCOL_ADDRESS_0 = 14`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_5 = 23`
- `const byte ARP_TARGET_PROTOCOL_ADDRESS_1 = 25`
- `const byte ARP_REQUEST = 1`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_1 = 19`
- `const byte ARP_TARGET_PROTOCOL_ADDRESS_3 = 27`
- `const byte ARP_TARGET_PROTOCOL_ADDRESS_0 = 24`
- `const byte ARP_TARGET_HARDWARE_ADDRESS_4 = 22`
- `var byte arp_reply_received`

### Procedures

- `arp_read_packet()`
- `arp_read_reply()`
- `arp_send_reply()`
- `arp_send_request()`
- `arp_get_mac(byte in requests, word in timeout)`

### Functions

## API details

### Global variables/contants

- `const byte ARP_PROTOCOL_TYPE = 2`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_0 = 18`

  No documentation found

- `const byte ARP_TARGET_PROTOCOL_ADDRESS_2 = 26`

  No documentation found

- `const byte ARP_SENDER_PROTOCOL_ADDRESS_3 = 17`

  No documentation found

- `var bit arp_packet_from_destination = FALSE`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_2 = 20`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_5 = 13`

  No documentation found

- `const byte ARP_SENDER_PROTOCOL_ADDRESS_1 = 15`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_2 = 10`

  No documentation found

- `const byte ARP_HARDWARE_LENGTH = 4`

  No documentation found

- `const byte ARP_PROTOCOL_LENGTH = 5`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_0 = 8`

  No documentation found

- `const byte ARP_REPLY = 2`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_3 = 21`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_3 = 11`

  No documentation found

- `const byte ARP_OPERATION = 6`

  No documentation found

- `const byte ARP_HARDWARE_TYPE = 0`

  No documentation found

- `const byte ARP_SENDER_PROTOCOL_ADDRESS_2 = 16`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_4 = 12`

  No documentation found

- `const byte ARP_SENDER_HARDWARE_ADDRESS_1 = 9`

  No documentation found

- `const byte ARP_SENDER_PROTOCOL_ADDRESS_0 = 14`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_5 = 23`

  No documentation found

- `const byte ARP_TARGET_PROTOCOL_ADDRESS_1 = 25`

  No documentation found

- `const byte ARP_REQUEST = 1`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_1 = 19`

  No documentation found

- `const byte ARP_TARGET_PROTOCOL_ADDRESS_3 = 27`

  No documentation found

- `const byte ARP_TARGET_PROTOCOL_ADDRESS_0 = 24`

  No documentation found

- `const byte ARP_TARGET_HARDWARE_ADDRESS_4 = 22`

  No documentation found

- `var byte arp_reply_received`

  No documentation found

### Procedures

- `arp_read_packet()`

      read a received arp packet

- `arp_read_reply()`

      send arp reply

- `arp_send_reply()`

      send arp reply

- `arp_send_request()`

      send arp request

- `arp_get_mac(byte in requests, word in timeout)`

      Get remote MAC address. Specify approx timeout in ms.

### Functions

## Related samples

Here are the list of samples which use this library:

18f4620 | 18f4620_network_udp_server.jal
18f4620 | 18f4620_network_webserver_enc28j60.jal
18f4620 | 18f4620_network_udp_client.jal
18f4620 | 18f4620_network_all_in_one.jal
18f4620 | 18f4620_network_tcp_client.jal
18f4620 | 18f4620_network_tcp_server.jal
18f4620 | 18f4620_network_ping.jal