diff options
Diffstat (limited to 'src/WifiAP.h')
-rw-r--r-- | src/WifiAP.h | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/src/WifiAP.h b/src/WifiAP.h index 04dbfa8..717e1c6 100644 --- a/src/WifiAP.h +++ b/src/WifiAP.h @@ -21,24 +21,44 @@ #include "types.h" -namespace WifiAP +class Wifi; + +class WifiAP { +public: + WifiAP(Wifi* wifi); + ~WifiAP(); + void Reset(); + + static const char* APName; + static const u8 APMac[6]; + + void MSTimer(); + + // packet format: 12-byte TX header + original 802.11 frame + int SendPacket(u8* data, int len); + int RecvPacket(u8* data); + +private: + class Wifi* Wifi; + + u64 USCounter; -#define AP_MAC 0x00, 0xF0, 0x77, 0x77, 0x77, 0x77 -#define AP_NAME "melonAP" + u16 SeqNo; -extern const u8 APMac[6]; + bool BeaconDue; -bool Init(); -void DeInit(); -void Reset(); + u8 PacketBuffer[2048]; + int PacketLen; + int RXNum; -void MSTimer(); + u8 LANBuffer[2048]; -// packet format: 12-byte TX header + original 802.11 frame -int SendPacket(u8* data, int len); -int RecvPacket(u8* data); + // this is a lazy AP, we only keep track of one client + // 0=disconnected 1=authenticated 2=associated + int ClientStatus; -} + int HandleManagementFrame(u8* data, int len); +}; #endif |