source: ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/wlan_exp_ip_udp/wlan_exp_ip_udp_arp.h

Last change on this file was 6319, checked in by chunter, 5 years ago

1.8.0 release wlan-mac-se

File size: 1.3 KB
Line 
1/** @file  wlan_exp_ip_udp_arp.h
2 *  @brief Mango wlan_exp IP/UDP Library (Internal Structures / Functions)
3 *
4 *  @copyright Copyright 2014-2019, Mango Communications. All rights reserved.
5 *          Distributed under the Mango Reference Design license (https://mangocomm.com/802.11/license)
6 */
7#ifndef WLAN_EXP_IP_UDP_ARP_H_
8#define WLAN_EXP_IP_UDP_ARP_H_
9
10#include "wlan_mac_high_sw_config.h"
11
12#if WLAN_SW_CONFIG_ENABLE_WLAN_EXP
13
14#include "wlan_exp_ip_udp.h"
15
16// Forward declarations
17struct eth_rx_queue_buffer_t;
18struct eth_tx_queue_buffer_t;
19
20// ARP Table entry
21typedef struct arp_cache_entry_t{
22    u32 age;                 // Age that increments on receptions and is reset when a cache entry is confirmed
23                             //  Since the cache size is limited, age is used to determine which entry should be
24                             //  overwritten once the cache is full.
25    u16 state;               // ARP_TABLE_USED or ARP_TABLE_UNUSED
26    u8  haddr[ETH_ADDR_LEN]; // 6-byte MAC address
27    u8  paddr[IP_ADDR_LEN];  // 4-byte IPv4 address
28} arp_cache_entry_t;
29
30void arp_init_cache();
31int arp_process_packet(struct eth_rx_queue_buffer_t* eth_rx_queue_buffer, struct eth_tx_queue_buffer_t* eth_tx_queue_buffer);
32int arp_update_cache(u8* hw_addr, u8* ip_addr);
33int arp_get_hw_addr(u8* hw_addr, u8* ip_addr);
34
35#endif //WLAN_SW_CONFIG_ENABLE_WLAN_EXP
36#endif /* WLAN_EXP_IP_UDP_ARP_H_ */
Note: See TracBrowser for help on using the repository browser.