[6319] | 1 | /** @file wlan_mac_addr_mac_filter.h |
---|
| 2 | * @brief Address Filter |
---|
| 3 | * |
---|
| 4 | * This contains code for the filtering MAC addresses |
---|
| 5 | * |
---|
| 6 | * @copyright Copyright 2014-2019, Mango Communications. All rights reserved. |
---|
| 7 | * Distributed under the Mango Communications Reference Design License |
---|
| 8 | * See LICENSE.txt included in the design archive or |
---|
| 9 | * at http://mangocomm.com/802.11/license |
---|
| 10 | * |
---|
| 11 | * This file is part of the Mango 802.11 Reference Design (https://mangocomm.com/802.11) |
---|
| 12 | */ |
---|
| 13 | |
---|
| 14 | /***************************** Include Files *********************************/ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | /*************************** Constant Definitions ****************************/ |
---|
| 18 | #ifndef WLAN_MAC_ADDR_FILTER_H_ |
---|
| 19 | #define WLAN_MAC_ADDR_FILTER_H_ |
---|
| 20 | |
---|
| 21 | #include "xil_types.h" |
---|
| 22 | #include "wlan_common_types.h" |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | //----------------------------------------------- |
---|
| 26 | // Address Filter defines |
---|
| 27 | // |
---|
| 28 | #define ADDR_FILTER_ADDR_NOT_ALLOWED 0 |
---|
| 29 | #define ADDR_FILTER_ADDR_ALLOWED 1 |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | /*********************** Global Structure Definitions ************************/ |
---|
| 34 | |
---|
| 35 | // ********************************************************************** |
---|
| 36 | // Whitelist Range Structure |
---|
| 37 | // |
---|
| 38 | typedef struct whitelist_range{ |
---|
| 39 | u8 mask[MAC_ADDR_LEN]; |
---|
| 40 | u8 compare[MAC_ADDR_LEN]; |
---|
| 41 | } whitelist_range; |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | /*************************** Function Prototypes *****************************/ |
---|
| 45 | |
---|
| 46 | void wlan_mac_addr_filter_init(); |
---|
| 47 | void wlan_mac_addr_filter_reset(); |
---|
| 48 | |
---|
| 49 | int wlan_mac_addr_filter_add(u8* mask, u8* compare); |
---|
| 50 | |
---|
| 51 | u8 wlan_mac_addr_filter_is_allowed(u8* addr); |
---|
| 52 | u8 wlan_mac_addr_is_mango(u8* addr); |
---|
| 53 | |
---|
| 54 | #endif /* WLAN_MAC_ADDR_FILTER_H_ */ |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | |
---|