|
INET Framework for OMNeT++/OMNEST
|
The default implementation of IDs.
More...
#include <Ds.h>
The default implementation of IDs.
◆ distributeDataFrame()
Utility function for APs: sends back a data frame we received from a STA to the wireless LAN, after tweaking fromDS/toDS bits and shuffling addresses as needed.
100 EV_INFO <<
"Distributing data frame.\n";
101 incomingFrame->trim();
102 const auto& outgoingHeader = staticPtrCast<Ieee80211DataOrMgmtHeader>(incomingHeader->dupShared());
105 outgoingHeader->setToDS(
false);
106 outgoingHeader->setFromDS(
true);
110 ASSERT(!outgoingHeader->getAddress3().isUnspecified());
111 outgoingHeader->setReceiverAddress(incomingHeader->getAddress3());
112 outgoingHeader->setAddress3(incomingHeader->getTransmitterAddress());
114 auto outgoingFrame =
new Packet(incomingFrame->getName(), incomingFrame->peekData());
115 outgoingFrame->insertAtFront(outgoingHeader);
116 const auto& trailer = makeShared<Ieee80211MacTrailer>();
119 outgoingFrame->insertAtBack(trailer);
Referenced by processDataFrame().
◆ initialize()
| void inet::ieee80211::Ds::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
23 mib = check_and_cast<Ieee80211Mib *>(getModuleByPath(par(
"mibModule")));
◆ processDataFrame()
Implements inet::ieee80211::IDs.
36 if (!header->getToDS()) {
38 EV_WARN <<
"Frame is not for us (toDS=false) -- discarding\n";
39 PacketDropDetails details;
46 if (header->getAddress3().isMulticast()) {
47 EV_INFO <<
"Handling multicast frame\n";
55 EV_WARN <<
"Frame's destination address is not in our STA list -- passing up\n";
65 EV_WARN <<
"Frame's destination STA is not in associated state -- dropping frame\n";
66 PacketDropDetails details;
75 EV_WARN <<
"Rejecting data frame as STA is not associated with an AP" << endl;
76 PacketDropDetails details;
82 EV_WARN <<
"Rejecting data frame received from another AP" << endl;
83 PacketDropDetails details;
92 throw cRuntimeError(
"Unknown station type");
95 throw cRuntimeError(
"Unknown mode");
◆ mac
◆ mib
The documentation for this class was generated from the following files:
@ INDEPENDENT
Definition: Ieee80211Mib.h:22
@ INFRASTRUCTURE
Definition: Ieee80211Mib.h:21
@ STATION
Definition: Ieee80211Mib.h:28
NetworkInterface * getContainingNicModule(const cModule *from)
Find the nic module (inside the networkNode) containing the given module.
Definition: NetworkInterface.cc:691
BssAccessPointData bssAccessPointData
Definition: Ieee80211Mib.h:61
Ieee80211Mac * mac
Definition: Ds.h:26
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
BssStationData bssStationData
Definition: Ieee80211Mib.h:60
virtual void processUpperFrame(Packet *packet, const Ptr< const Ieee80211DataOrMgmtHeader > &header)
Definition: Ieee80211Mac.cc:374
BssData bssData
Definition: Ieee80211Mib.h:59
Ieee80211Mib * mib
Definition: Ds.h:25
bool isAssociated
Definition: Ieee80211Mib.h:46
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
BssStationType stationType
Definition: Ieee80211Mib.h:45
MacAddress bssid
Definition: Ieee80211Mib.h:40
@ OTHER_PACKET_DROP
Definition: Simsignals_m.h:84
virtual void distributeDataFrame(Packet *frame, const Ptr< const Ieee80211DataOrMgmtHeader > &header)
Utility function for APs: sends back a data frame we received from a STA to the wireless LAN,...
Definition: Ds.cc:98
Mode mode
Definition: Ieee80211Mib.h:56
#define Enter_Method(...)
Definition: SelfDoc.h:71
@ ACCESS_POINT
Definition: Ieee80211Mib.h:27
virtual void sendUp(cMessage *message) override
Definition: Ieee80211Mac.cc:338
@ ASSOCIATED
Definition: Ieee80211Mib.h:34
@ NOT_ADDRESSED_TO_US
Definition: Simsignals_m.h:76
std::map< MacAddress, BssMemberStatus > stations
Definition: Ieee80211Mib.h:51