|
Retro Rocket Kernel
BASIC-Powered Operating System
|
#include "kernel.h"Data Structures | |
| struct | arp_packet |
| struct | arp_table_entry_t |
Macros | |
| #define | ETHERNET_TYPE_ARP 0x0806 |
Enumerations | |
| enum | arp_packet_type_t { ARP_REQUEST = 1 , ARP_REPLY = 2 } |
Functions | |
| struct arp_packet | __attribute__ ((packed)) arp_packet_t |
| void | arp_send_packet (uint8_t *dst_hardware_addr, uint8_t *dst_protocol_addr) |
| Send an ARP packet to the ethernet driver. More... | |
| int | arp_lookup (uint8_t *ret_hardware_addr, uint8_t *ip_addr) |
| Lookup a MAC address for an IP address via a blocking ARP request. More... | |
| void | arp_lookup_add (uint8_t *ret_hardware_addr, uint8_t *ip_addr) |
| Cache and ARP entry in the ARP cache. More... | |
| void | arp_init () |
| Initialise the ARP protocol. More... | |
| arp_table_entry_t * | get_arp_entry (size_t index) |
| Get an arp entry object, used by the BASIC interpreter. More... | |
| size_t | get_arp_table_size () |
| Get the arp table size, used by the BASIC interpreter. More... | |
| void | arp_prediscover (uint8_t *protocol_addr) |
| Precache a local network IP address, to save on doing an ARP lookup later when the user wants to access the resource. Used for the DNS server and gateway addresses. More... | |
Variables | |
| uint16_t | hardware_type |
| uint16_t | protocol |
| uint8_t | hardware_addr_len |
| uint8_t | protocol_addr_len |
| uint16_t | opcode |
| uint8_t | src_hardware_addr [6] |
| uint8_t | src_protocol_addr [4] |
| uint8_t | dst_hardware_addr [6] |
| uint8_t | dst_protocol_addr [4] |
| #define ETHERNET_TYPE_ARP 0x0806 |
| enum arp_packet_type_t |
| struct arp_packet __attribute__ | ( | (packed) | ) |
| void arp_init | ( | ) |
Initialise the ARP protocol.
| int arp_lookup | ( | uint8_t * | ret_hardware_addr, |
| uint8_t * | ip_addr | ||
| ) |
Lookup a MAC address for an IP address via a blocking ARP request.
| ret_hardware_addr | MAC address (filled on return) |
| ip_addr | IP address to request |
| void arp_lookup_add | ( | uint8_t * | ret_hardware_addr, |
| uint8_t * | ip_addr | ||
| ) |
Cache and ARP entry in the ARP cache.
| ret_hardware_addr | MAC address |
| ip_addr | IP address |
| void arp_prediscover | ( | uint8_t * | protocol_addr | ) |
Precache a local network IP address, to save on doing an ARP lookup later when the user wants to access the resource. Used for the DNS server and gateway addresses.
| void arp_send_packet | ( | uint8_t * | dst_hardware_addr, |
| uint8_t * | dst_protocol_addr | ||
| ) |
Send an ARP packet to the ethernet driver.
| dst_hardware_addr | destination MAC address |
| dst_protocol_addr | destination IP address |
| arp_table_entry_t* get_arp_entry | ( | size_t | index | ) |
Get an arp entry object, used by the BASIC interpreter.
| index | index to find |
| size_t get_arp_table_size | ( | ) |
Get the arp table size, used by the BASIC interpreter.
| uint8_t dst_hardware_addr[6] |
| uint8_t dst_protocol_addr[4] |
| uint8_t hardware_addr_len |
| uint16_t hardware_type |
| uint16_t opcode |
| uint16_t protocol |
| uint8_t protocol_addr_len |
| uint8_t src_hardware_addr[6] |
| uint8_t src_protocol_addr[4] |