aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/network/room_member.h
diff options
context:
space:
mode:
authorB3n30 <[email protected]>2017-07-09 10:40:11 +0200
committerB3n30 <[email protected]>2017-07-16 21:29:34 +0200
commit641346c15c0091d59259f6acc5f8789efe16c937 (patch)
treedb87a00159c0feb35bb663b2e49ca8348451e4fe /src/network/room_member.h
parentebff5ba5140f0b093facf95fd5a05e6c71384736 (diff)
downloadyuzu-mainline-641346c15c0091d59259f6acc5f8789efe16c937.tar.gz
yuzu-mainline-641346c15c0091d59259f6acc5f8789efe16c937.zip
Network: Enable to send WifiPackets
Diffstat (limited to 'src/network/room_member.h')
-rw-r--r--src/network/room_member.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/network/room_member.h b/src/network/room_member.h
index f8bdbaea8..d23f5d4b6 100644
--- a/src/network/room_member.h
+++ b/src/network/room_member.h
@@ -12,6 +12,18 @@
namespace Network {
+/// Information about the received WiFi packets.
+/// Acts as our own 802.11 header.
+struct WifiPacket {
+ enum class PacketType { Beacon, Data, Management };
+ PacketType type; ///< The type of 802.11 frame, Beacon / Data.
+ std::vector<uint8_t> data; ///< Raw 802.11 frame data, starting at the management frame header
+ /// for management frames.
+ MacAddress transmitter_address; ///< Mac address of the transmitter.
+ MacAddress destination_address; ///< Mac address of the receiver.
+ uint8_t channel; ///< WiFi channel where this frame was transmitted.
+};
+
/**
* This is what a client [person joining a server] would use.
* It also has to be used if you host a game yourself (You'd create both, a Room and a
@@ -70,6 +82,12 @@ public:
const u16 serverPort = DefaultRoomPort, const u16 clientPort = 0);
/**
+ * Sends a WiFi packet to the room.
+ * @param packet The WiFi packet to send.
+ */
+ void SendWifiPacket(const WifiPacket& packet);
+
+ /**
* Leaves the current room.
*/
void Leave();