INET Framework for OMNeT++/OMNEST
inet::EthernetEncapsulation Class Reference

Performs Ethernet II encapsulation/decapsulation. More...

#include <EthernetEncapsulation.h>

Inheritance diagram for inet::EthernetEncapsulation:
inet::OperationalBase inet::DefaultProtocolRegistrationListener inet::OperationalMixin< cSimpleModule > inet::IProtocolRegistrationListener inet::ILifecycle

Classes

struct  Socket
 

Protected Member Functions

virtual ~EthernetEncapsulation ()
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessageWhenUp (cMessage *message) override
 
virtual void handleRegisterService (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocol (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterAnyProtocol (cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void processCommandFromHigherLayer (Request *msg)
 
virtual void processPacketFromHigherLayer (Packet *msg)
 
virtual void processPacketFromMac (Packet *packet)
 
virtual void handleSendPause (cMessage *msg)
 
virtual void refreshDisplay () const override
 
virtual bool isInitializeStage (int stage) const override
 
virtual bool isModuleStartStage (int stage) const override
 
virtual bool isModuleStopStage (int stage) const override
 
virtual void clearSockets ()
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual void handleStopOperation (LifecycleOperation *operation) override
 
virtual void handleCrashOperation (LifecycleOperation *operation) override
 
- Protected Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void handleMessageWhenDown (cMessage *msg)
 
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 
virtual State getInitialOperationalState () const
 Returns initial operational state: OPERATING or NOT_OPERATING. More...
 
virtual void handleActiveOperationTimeout (cMessage *message)
 
virtual bool isUp () const
 utility functions More...
 
virtual bool isDown () const
 
virtual void setOperationalState (State newState)
 
virtual void scheduleOperationTimeout (simtime_t timeout)
 
virtual void setupActiveOperation (LifecycleOperation *operation, IDoneCallback *doneCallback, State)
 
virtual void delayActiveOperationFinish (simtime_t timeout)
 
virtual void startActiveOperationExtraTime (simtime_t delay=SIMTIME_ZERO)
 
virtual void startActiveOperationExtraTimeOrFinish (simtime_t extraTime)
 
virtual void finishActiveOperation ()
 

Protected Attributes

std::set< const Protocol * > upperProtocols
 
FcsMode fcsMode = FCS_MODE_UNDEFINED
 
int seqNum
 
long totalFromHigherLayer
 
long totalFromMAC
 
long totalPauseSent
 
NetworkInterfacenetworkInterface = nullptr
 
std::map< int, Socket * > socketIdToSocketMap
 
bool anyUpperProtocols = false
 
- Protected Attributes inherited from inet::OperationalMixin< cSimpleModule >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 

Static Protected Attributes

static simsignal_t encapPkSignal = registerSignal("encapPk")
 
static simsignal_t decapPkSignal = registerSignal("decapPk")
 
static simsignal_t pauseSentSignal = registerSignal("pauseSent")
 

Friends

std::ostream & operator<< (std::ostream &o, const Socket &t)
 

Additional Inherited Members

- Public Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual ~OperationalMixin ()
 }@ More...
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 
- Public Member Functions inherited from inet::DefaultProtocolRegistrationListener
virtual void handleRegisterServiceGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocolGroup (const ProtocolGroup &protocolGroup, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterAnyService (cGate *gate, ServicePrimitive servicePrimitive) override
 
- Protected Types inherited from inet::OperationalMixin< cSimpleModule >
enum  State
 

Detailed Description

Performs Ethernet II encapsulation/decapsulation.

More info in the NED file.

Constructor & Destructor Documentation

◆ ~EthernetEncapsulation()

inet::EthernetEncapsulation::~EthernetEncapsulation ( )
protectedvirtual
49 {
50  for (auto it : socketIdToSocketMap)
51  delete it.second;
52 }

Member Function Documentation

◆ clearSockets()

void inet::EthernetEncapsulation::clearSockets ( )
protectedvirtual
308 {
309  for (auto& elem : socketIdToSocketMap) {
310  delete elem.second;
311  elem.second = nullptr;
312  }
313  socketIdToSocketMap.clear();
314 }

Referenced by handleCrashOperation(), handleStartOperation(), and handleStopOperation().

◆ handleCrashOperation()

void inet::EthernetEncapsulation::handleCrashOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

327 {
328  clearSockets();
329 }

◆ handleMessageWhenUp()

void inet::EthernetEncapsulation::handleMessageWhenUp ( cMessage *  message)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

93 {
94  if (msg->arrivedOn("upperLayerIn")) {
95  // from upper layer
96  EV_INFO << "Received " << msg << " from upper layer." << endl;
97  if (msg->isPacket())
98  processPacketFromHigherLayer(check_and_cast<Packet *>(msg));
99  else
100  processCommandFromHigherLayer(check_and_cast<Request *>(msg));
101  }
102  else if (msg->arrivedOn("lowerLayerIn")) {
103  EV_INFO << "Received " << msg << " from lower layer." << endl;
104  processPacketFromMac(check_and_cast<Packet *>(msg));
105  }
106  else
107  throw cRuntimeError("Unknown gate");
108 }

◆ handleRegisterAnyProtocol()

void inet::EthernetEncapsulation::handleRegisterAnyProtocol ( cGate *  gate,
ServicePrimitive  servicePrimitive 
)
overrideprotectedvirtual

Reimplemented from inet::DefaultProtocolRegistrationListener.

345 {
346  Enter_Method("handleRegisterAnyProtocol");
347  if (!strcmp("upperLayerOut", gate->getBaseName()))
348  anyUpperProtocols = true;
349 }

◆ handleRegisterProtocol()

void inet::EthernetEncapsulation::handleRegisterProtocol ( const Protocol protocol,
cGate *  gate,
ServicePrimitive  servicePrimitive 
)
overrideprotectedvirtual

Reimplemented from inet::DefaultProtocolRegistrationListener.

337 {
338  Enter_Method("handleRegisterProtocol");
339  // KLUDGE this should be here: if (!strcmp("upperLayerOut", gate->getBaseName()))
340  // but then the register protocol calls are lost, because they can't go through the traffic conditioner
341  upperProtocols.insert(&protocol);
342 }

◆ handleRegisterService()

void inet::EthernetEncapsulation::handleRegisterService ( const Protocol protocol,
cGate *  gate,
ServicePrimitive  servicePrimitive 
)
overrideprotectedvirtual

Reimplemented from inet::DefaultProtocolRegistrationListener.

332 {
333  Enter_Method("handleRegisterService");
334 }

◆ handleSendPause()

void inet::EthernetEncapsulation::handleSendPause ( cMessage *  msg)
protectedvirtual
272 {
273  Ieee802PauseCommand *etherctrl = dynamic_cast<Ieee802PauseCommand *>(msg->getControlInfo());
274  if (!etherctrl)
275  throw cRuntimeError("PAUSE command `%s' from higher layer received without Ieee802PauseCommand controlinfo", msg->getName());
276  MacAddress dest = etherctrl->getDestinationAddress();
277  int pauseUnits = etherctrl->getPauseUnits();
278  delete msg;
279 
280  EV_DETAIL << "Creating and sending PAUSE frame, with duration = " << pauseUnits << " units\n";
281 
282  // create Ethernet frame
283  char framename[40];
284  sprintf(framename, "pause-%d-%d", getId(), seqNum++);
285  auto packet = new Packet(framename);
286  const auto& frame = makeShared<EthernetPauseFrame>();
287  const auto& hdr = makeShared<EthernetMacHeader>();
288  frame->setPauseTime(pauseUnits);
289  if (dest.isUnspecified())
291  hdr->setDest(dest);
292  packet->insertAtFront(frame);
293  hdr->setTypeOrLength(ETHERTYPE_FLOW_CONTROL);
294  packet->insertAtFront(hdr);
295  const auto& ethernetFcs = makeShared<EthernetFcs>();
296  ethernetFcs->setFcsMode(fcsMode);
297  packet->insertAtBack(ethernetFcs);
298  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::ethernetMac);
299 
300  EV_INFO << "Sending " << frame << " to lower layer.\n";
301  send(packet, "lowerLayerOut");
302 
303  emit(pauseSentSignal, pauseUnits);
304  totalPauseSent++;
305 }

Referenced by processCommandFromHigherLayer().

◆ handleStartOperation()

void inet::EthernetEncapsulation::handleStartOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

317 {
318  clearSockets();
319 }

◆ handleStopOperation()

void inet::EthernetEncapsulation::handleStopOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

322 {
323  clearSockets();
324 }

◆ initialize()

void inet::EthernetEncapsulation::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::OperationalMixin< cSimpleModule >.

68 {
70  if (stage == INITSTAGE_LOCAL) {
71  fcsMode = parseFcsMode(par("fcsMode"));
72  seqNum = 0;
73  WATCH(seqNum);
75  networkInterface = findContainingNicModule(this); // TODO or getContainingNicModule() ? or use a MacForwardingTable?
76 
77  WATCH_PTRSET(upperProtocols);
78  WATCH_PTRMAP(socketIdToSocketMap);
79  WATCH(totalFromHigherLayer);
80  WATCH(totalFromMAC);
81  WATCH(totalPauseSent);
82  }
83  else if (stage == INITSTAGE_LINK_LAYER) {
84  if (par("registerProtocol").boolValue()) { // FIXME //KUDGE should redesign place of EthernetEncapsulation and LLC modules
85  // register service and protocol
86  registerService(Protocol::ethernetMac, gate("upperLayerIn"), gate("upperLayerOut"));
87  registerProtocol(Protocol::ethernetMac, gate("lowerLayerOut"), gate("lowerLayerIn"));
88  }
89  }
90 }

◆ isInitializeStage()

virtual bool inet::EthernetEncapsulation::isInitializeStage ( int  stage) const
inlineoverrideprotectedvirtual

Implements inet::OperationalMixin< cSimpleModule >.

77 { return stage == INITSTAGE_LINK_LAYER; }

◆ isModuleStartStage()

virtual bool inet::EthernetEncapsulation::isModuleStartStage ( int  stage) const
inlineoverrideprotectedvirtual

◆ isModuleStopStage()

virtual bool inet::EthernetEncapsulation::isModuleStopStage ( int  stage) const
inlineoverrideprotectedvirtual

◆ numInitStages()

virtual int inet::EthernetEncapsulation::numInitStages ( ) const
inlineoverrideprotectedvirtual
61 { return NUM_INIT_STAGES; }

◆ processCommandFromHigherLayer()

void inet::EthernetEncapsulation::processCommandFromHigherLayer ( Request msg)
protectedvirtual
111 {
112  msg->removeTagIfPresent<DispatchProtocolReq>();
113  auto ctrl = msg->getControlInfo();
114  if (dynamic_cast<Ieee802PauseCommand *>(ctrl) != nullptr)
115  handleSendPause(msg);
116  else if (auto bindCommand = dynamic_cast<EthernetBindCommand *>(ctrl)) {
117  int socketId = check_and_cast<Request *>(msg)->getTag<SocketReq>()->getSocketId();
118  Socket *socket = new Socket(socketId);
119  socket->interfaceId = msg->getTag<InterfaceReq>()->getInterfaceId();
120  socket->localAddress = bindCommand->getLocalAddress();
121  socket->remoteAddress = bindCommand->getRemoteAddress();
122  socket->protocol = bindCommand->getProtocol();
123  socket->steal = bindCommand->getSteal();
124  socketIdToSocketMap[socketId] = socket;
125  delete msg;
126  }
127  else if (dynamic_cast<SocketCloseCommand *>(ctrl) != nullptr) {
128  int socketId = check_and_cast<Request *>(msg)->getTag<SocketReq>()->getSocketId();
129  auto it = socketIdToSocketMap.find(socketId);
130  if (it != socketIdToSocketMap.end()) {
131  delete it->second;
132  socketIdToSocketMap.erase(it);
133  auto indication = new Indication("closed", SOCKET_I_CLOSED);
134  auto ctrl = new SocketClosedIndication();
135  indication->setControlInfo(ctrl);
136  indication->addTag<SocketInd>()->setSocketId(socketId);
137  send(indication, "transportOut");
138  delete msg;
139  }
140  }
141  else if (dynamic_cast<SocketDestroyCommand *>(ctrl) != nullptr) {
142  int socketId = check_and_cast<Request *>(msg)->getTag<SocketReq>()->getSocketId();
143  auto it = socketIdToSocketMap.find(socketId);
144  if (it != socketIdToSocketMap.end()) {
145  delete it->second;
146  socketIdToSocketMap.erase(it);
147  delete msg;
148  }
149  }
150  else
151  throw cRuntimeError("Unknown command: '%s' with %s", msg->getName(), ctrl->getClassName());
152 }

Referenced by handleMessageWhenUp().

◆ processPacketFromHigherLayer()

void inet::EthernetEncapsulation::processPacketFromHigherLayer ( Packet msg)
protectedvirtual
163 {
164  if (packet->getDataLength() > MAX_ETHERNET_DATA_BYTES)
165  throw cRuntimeError("packet length from higher layer (%s) exceeds maximum Ethernet payload length (%s)", packet->getDataLength().str().c_str(), MAX_ETHERNET_DATA_BYTES.str().c_str());
166 
168  emit(encapPkSignal, packet);
169 
170  // Creates MAC header information and encapsulates received higher layer data
171  // with this information and transmits resultant frame to lower layer
172 
173  // create Ethernet frame, fill it in from Ieee802Ctrl and encapsulate msg in it
174  EV_DETAIL << "Encapsulating higher layer packet `" << packet->getName() << "' for MAC\n";
175 
176  int typeOrLength = -1;
177  const auto& protocolTag = packet->addTagIfAbsent<PacketProtocolTag>();
178  const Protocol *protocol = protocolTag->getProtocol();
181  else
182  typeOrLength = packet->getByteLength();
183 
184  const auto& ethHeader = makeShared<EthernetMacHeader>();
185  auto macAddressReq = packet->getTag<MacAddressReq>();
186  auto srcAddr = macAddressReq->getSrcAddress();
187  if (srcAddr.isUnspecified() && networkInterface != nullptr)
188  srcAddr = networkInterface->getMacAddress();
189  ethHeader->setSrc(srcAddr);
190  ethHeader->setDest(macAddressReq->getDestAddress());
191  ethHeader->setTypeOrLength(typeOrLength);
192  packet->insertAtFront(ethHeader);
193  const auto& ethernetFcs = makeShared<EthernetFcs>();
194  ethernetFcs->setFcsMode(fcsMode);
195  packet->insertAtBack(ethernetFcs);
196  protocolTag->setProtocol(&Protocol::ethernetMac);
197  packet->removeTagIfPresent<DispatchProtocolReq>();
198  EV_INFO << "Sending " << packet << " to lower layer.\n";
199  send(packet, "lowerLayerOut");
200 }

Referenced by handleMessageWhenUp().

◆ processPacketFromMac()

void inet::EthernetEncapsulation::processPacketFromMac ( Packet packet)
protectedvirtual
203 {
204  const Protocol *payloadProtocol = nullptr;
205 
206  int iface = packet->getTag<InterfaceInd>()->getInterfaceId();
207  auto ethHeader = packet->popAtFront<EthernetMacHeader>();
208  packet->popAtBack<EthernetFcs>(ETHER_FCS_BYTES);
209 
210  // add MacAddressInd to packet
211  auto macAddressInd = packet->addTagIfAbsent<MacAddressInd>();
212  macAddressInd->setSrcAddress(ethHeader->getSrc());
213  macAddressInd->setDestAddress(ethHeader->getDest());
214 
215  // remove Padding if possible
216  if (isIeee8023Header(*ethHeader)) {
217  b payloadLength = B(ethHeader->getTypeOrLength());
218  if (packet->getDataLength() < payloadLength)
219  throw cRuntimeError("incorrect payload length in ethernet frame"); // TODO alternative: drop packet
220  packet->setBackOffset(packet->getFrontOffset() + payloadLength);
221  payloadProtocol = &Protocol::ieee8022llc;
222  }
223  else if (isEth2Header(*ethHeader)) {
224  payloadProtocol = ProtocolGroup::ethertype.findProtocol(ethHeader->getTypeOrLength());
225  }
226  else
227  throw cRuntimeError("Unknown ethernet header");
228 
229  if (payloadProtocol != nullptr) {
230  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(payloadProtocol);
231  packet->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(payloadProtocol);
232  }
233  else {
234  packet->removeTagIfPresent<PacketProtocolTag>();
235  packet->removeTagIfPresent<DispatchProtocolReq>();
236  }
237  bool steal = false;
238  for (auto it : socketIdToSocketMap) {
239  auto socket = it.second;
240  if (socket->matches(packet, iface, ethHeader)) {
241  auto packetCopy = packet->dup();
242  packetCopy->setKind(SOCKET_I_DATA);
243  packetCopy->addTagIfAbsent<SocketInd>()->setSocketId(it.first);
244  EV_INFO << "Sending " << packetCopy << " to socket " << it.first << ".\n";
245  send(packetCopy, "upperLayerOut");
246  steal |= socket->steal;
247  }
248  }
249  if (steal)
250  delete packet;
251  else if (anyUpperProtocols || (payloadProtocol != nullptr && contains(upperProtocols, payloadProtocol))) {
252  EV_DETAIL << "Decapsulating frame `" << packet->getName() << "', passing up contained packet `"
253  << packet->getName() << "' to higher layer\n";
254 
255  totalFromMAC++;
256  emit(decapPkSignal, packet);
257 
258  // pass up to higher layers.
259  EV_INFO << "Sending " << packet << " to upper layer.\n";
260  send(packet, "upperLayerOut");
261  }
262  else {
263  EV_WARN << "Unknown protocol, dropping packet\n";
264  PacketDropDetails details;
265  details.setReason(NO_PROTOCOL_FOUND);
266  emit(packetDroppedSignal, packet, &details);
267  delete packet;
268  }
269 }

Referenced by handleMessageWhenUp().

◆ refreshDisplay()

void inet::EthernetEncapsulation::refreshDisplay ( ) const
overrideprotectedvirtual
155 {
157  char buf[80];
158  sprintf(buf, "passed up: %ld\nsent: %ld", totalFromMAC, totalFromHigherLayer);
159  getDisplayString().setTagArg("t", 0, buf);
160 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const Socket t 
)
friend
37 {
38  o << "(id:" << t.socketId
39  << ",interfaceId:" << t.interfaceId
40  << ",local:" << t.localAddress
41  << ",remote:" << t.remoteAddress
42  << ",protocol" << (t.protocol ? t.protocol->getName() : "<null>")
43  << ",steal:" << (t.steal ? "on" : "off")
44  << ")";
45  return o;
46 }

Member Data Documentation

◆ anyUpperProtocols

bool inet::EthernetEncapsulation::anyUpperProtocols = false
protected

◆ decapPkSignal

simsignal_t inet::EthernetEncapsulation::decapPkSignal = registerSignal("decapPk")
staticprotected

Referenced by processPacketFromMac().

◆ encapPkSignal

simsignal_t inet::EthernetEncapsulation::encapPkSignal = registerSignal("encapPk")
staticprotected

◆ fcsMode

FcsMode inet::EthernetEncapsulation::fcsMode = FCS_MODE_UNDEFINED
protected

◆ networkInterface

NetworkInterface* inet::EthernetEncapsulation::networkInterface = nullptr
protected

◆ pauseSentSignal

simsignal_t inet::EthernetEncapsulation::pauseSentSignal = registerSignal("pauseSent")
staticprotected

Referenced by handleSendPause().

◆ seqNum

int inet::EthernetEncapsulation::seqNum
protected

Referenced by handleSendPause(), and initialize().

◆ socketIdToSocketMap

std::map<int, Socket *> inet::EthernetEncapsulation::socketIdToSocketMap
protected

◆ totalFromHigherLayer

long inet::EthernetEncapsulation::totalFromHigherLayer
protected

◆ totalFromMAC

long inet::EthernetEncapsulation::totalFromMAC
protected

◆ totalPauseSent

long inet::EthernetEncapsulation::totalPauseSent
protected

Referenced by handleSendPause(), and initialize().

◆ upperProtocols

std::set<const Protocol *> inet::EthernetEncapsulation::upperProtocols
protected

The documentation for this class was generated from the following files:
inet::ProtocolGroup::getProtocolNumber
int getProtocolNumber(const Protocol *protocol) const
Definition: ProtocolGroup.cc:46
inet::units::value::str
std::string str() const
Definition: Units.h:101
inet::isEth2Header
bool isEth2Header(const EthernetMacHeader &hdr)
Definition: EthernetMacHeader_m.h:228
inet::MacAddress::MULTICAST_PAUSE_ADDRESS
static const MacAddress MULTICAST_PAUSE_ADDRESS
The special multicast PAUSE MAC address, 01:80:C2:00:00:01.
Definition: MacAddress.h:37
inet::EthernetEncapsulation::seqNum
int seqNum
Definition: EthernetEncapsulation.h:32
protocol
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
inet::findContainingNicModule
NetworkInterface * findContainingNicModule(const cModule *from)
Find the nic module (inside the networkNode) containing the given module.
Definition: NetworkInterface.cc:679
inet::NetworkInterface::getMacAddress
const MacAddress & getMacAddress() const
Definition: NetworkInterface.h:245
inet::ETHER_FCS_BYTES
const B ETHER_FCS_BYTES
Definition: Ethernet.h:59
inet::EthernetEncapsulation::socketIdToSocketMap
std::map< int, Socket * > socketIdToSocketMap
Definition: EthernetEncapsulation.h:56
inet::OperationalMixin< cSimpleModule >::initialize
virtual void initialize(int stage) override
Definition: OperationalMixinImpl.h:26
inet::ProtocolGroup::findProtocol
const Protocol * findProtocol(int protocolNumber) const
Definition: ProtocolGroup.cc:25
inet::isIeee8023Header
bool isIeee8023Header(const EthernetMacHeader &hdr)
Definition: EthernetMacHeader_m.h:229
InterfaceReq
removed InterfaceReq
Definition: IUdp-gates.txt:11
DispatchProtocolReq
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
inet::ETHERTYPE_FLOW_CONTROL
@ ETHERTYPE_FLOW_CONTROL
Definition: EtherType_m.h:92
inet::EthernetEncapsulation::anyUpperProtocols
bool anyUpperProtocols
Definition: EthernetEncapsulation.h:57
inet::registerService
void registerService(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a service primitive (SDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:14
inet::packetDroppedSignal
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
inet::Protocol::ieee8022llc
static const Protocol ieee8022llc
Definition: Protocol.h:88
inet::EthernetEncapsulation::clearSockets
virtual void clearSockets()
Definition: EthernetEncapsulation.cc:307
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::EthernetEncapsulation::handleSendPause
virtual void handleSendPause(cMessage *msg)
Definition: EthernetEncapsulation.cc:271
ctrl
removed ctrl
Definition: IUdp-gates.txt:7
inet::EthernetEncapsulation::totalFromHigherLayer
long totalFromHigherLayer
Definition: EthernetEncapsulation.h:35
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::contains
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
inet::Protocol::ethernetMac
static const Protocol ethernetMac
Definition: Protocol.h:65
inet::SOCKET_I_DATA
@ SOCKET_I_DATA
Definition: SocketCommand_m.h:85
inet::ModuleStopOperation::STAGE_LINK_LAYER
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:54
inet::EthernetEncapsulation::processPacketFromMac
virtual void processPacketFromMac(Packet *packet)
Definition: EthernetEncapsulation.cc:202
inet::EthernetEncapsulation::upperProtocols
std::set< const Protocol * > upperProtocols
Definition: EthernetEncapsulation.h:28
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::NO_PROTOCOL_FOUND
@ NO_PROTOCOL_FOUND
Definition: Simsignals_m.h:81
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::EthernetEncapsulation::encapPkSignal
static simsignal_t encapPkSignal
Definition: EthernetEncapsulation.h:38
inet::EthernetEncapsulation::totalPauseSent
long totalPauseSent
Definition: EthernetEncapsulation.h:37
inet::MAX_ETHERNET_DATA_BYTES
const B MAX_ETHERNET_DATA_BYTES
Definition: Ethernet.h:20
inet::SOCKET_I_CLOSED
@ SOCKET_I_CLOSED
Definition: SocketCommand_m.h:86
inet::EthernetEncapsulation::processPacketFromHigherLayer
virtual void processPacketFromHigherLayer(Packet *msg)
Definition: EthernetEncapsulation.cc:162
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::EthernetEncapsulation::pauseSentSignal
static simsignal_t pauseSentSignal
Definition: EthernetEncapsulation.h:40
inet::parseFcsMode
FcsMode parseFcsMode(const char *fcsModeString)
Definition: FcsMode.cc:14
inet::EthernetEncapsulation::processCommandFromHigherLayer
virtual void processCommandFromHigherLayer(Request *msg)
Definition: EthernetEncapsulation.cc:110
inet::EthernetEncapsulation::fcsMode
FcsMode fcsMode
Definition: EthernetEncapsulation.h:31
inet::EthernetEncapsulation::networkInterface
NetworkInterface * networkInterface
Definition: EthernetEncapsulation.h:41
inet::ModuleStartOperation::STAGE_LINK_LAYER
@ STAGE_LINK_LAYER
Definition: ModuleOperations.h:28
inet::OperationalMixin< cSimpleModule >::refreshDisplay
virtual void refreshDisplay() const override
Definition: OperationalMixinImpl.h:200
inet::registerProtocol
void registerProtocol(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a protocol primitive (PDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:83
inet::EthernetEncapsulation::decapPkSignal
static simsignal_t decapPkSignal
Definition: EthernetEncapsulation.h:39
inet::INITSTAGE_LINK_LAYER
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.
inet::EthernetEncapsulation::totalFromMAC
long totalFromMAC
Definition: EthernetEncapsulation.h:36
inet::ProtocolGroup::ethertype
static ProtocolGroup ethertype
Definition: ProtocolGroup.h:40