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

PPP implementation. More...

#include <Ppp.h>

Inheritance diagram for inet::Ppp:
inet::MacProtocolBase inet::queueing::IActivePacketSink inet::LayeredProtocolBase inet::OperationalBase inet::OperationalMixin< cSimpleModule > inet::ILifecycle

Public Member Functions

virtual ~Ppp ()
 
virtual queueing::IPassivePacketSourcegetProvider (cGate *gate) override
 Returns the passive packet source from where packets are pulled or nullptr if the connected module doesn't implement the interface. More...
 
virtual void handleCanPullPacketChanged (cGate *gate) override
 Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate. More...
 
virtual void handlePullPacketProcessed (Packet *packet, cGate *gate, bool successful) override
 Notifies about the completion of the packet processing for a packet that was pulled earlier independently whether the packet is passed or streamed. More...
 
- 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::queueing::IActivePacketSink
virtual ~IActivePacketSink ()
 

Protected Member Functions

virtual void startTransmitting ()
 
virtual void encapsulate (Packet *msg)
 
virtual void decapsulate (Packet *packet)
 
virtual void refreshDisplay () const override
 
virtual void refreshOutGateConnection (bool connected)
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
 
virtual void configureNetworkInterface () override
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessageWhenUp (cMessage *message) override
 
virtual void handleSelfMessage (cMessage *message) override
 
virtual void handleUpperPacket (Packet *packet) override
 
virtual void handleLowerPacket (Packet *packet) override
 
virtual void handleStopOperation (LifecycleOperation *operation) override
 
virtual void processUpperPacket ()
 
- Protected Member Functions inherited from inet::MacProtocolBase
 MacProtocolBase ()
 
virtual ~MacProtocolBase ()
 
virtual void registerInterface ()
 
virtual MacAddress parseMacAddressParameter (const char *addrstr)
 
virtual void deleteCurrentTxFrame ()
 
virtual void dropCurrentTxFrame (PacketDropDetails &details)
 
virtual void handleMessageWhenDown (cMessage *msg) override
 
virtual void sendUp (cMessage *message)
 
virtual void sendDown (cMessage *message)
 
virtual bool isUpperMessage (cMessage *message) const override
 
virtual bool isLowerMessage (cMessage *message) 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 flushQueue (PacketDropDetails &details)
 should clear queue and emit signal "packetDropped" with entire packets More...
 
virtual void clearQueue ()
 should clear queue silently More...
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual void handleCrashOperation (LifecycleOperation *operation) override
 
queueing::IPacketQueuegetQueue (cGate *gate) const
 
virtual bool canDequeuePacket () const
 
virtual PacketdequeuePacket ()
 
- Protected Member Functions inherited from inet::LayeredProtocolBase
virtual void handleUpperMessage (cMessage *message)
 
virtual void handleLowerMessage (cMessage *message)
 
virtual void handleUpperCommand (cMessage *message)
 
virtual void handleLowerCommand (cMessage *message)
 
- 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 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

const char * displayStringTextFormat = nullptr
 
bool sendRawBytes = false
 
cGate * physOutGate = nullptr
 
cChannel * datarateChannel = nullptr
 
cMessage * endTransmissionEvent = nullptr
 
PacketcurTxPacket = nullptr
 
std::string oldConnColor
 
long numSent = 0
 
long numRcvdOK = 0
 
long numDroppedBitErr = 0
 
long numDroppedIfaceDown = 0
 
- Protected Attributes inherited from inet::MacProtocolBase
int upperLayerInGateId = -1
 Gate ids. More...
 
int upperLayerOutGateId = -1
 
int lowerLayerInGateId = -1
 
int lowerLayerOutGateId = -1
 
opp_component_ptr< NetworkInterfacenetworkInterface
 
opp_component_ptr< cModule > hostModule
 
PacketcurrentTxFrame = nullptr
 Currently transmitted frame if any. More...
 
opp_component_ptr< queueing::IPacketQueuetxQueue
 Messages received from upper layer and to be transmitted later. More...
 
- Protected Attributes inherited from inet::OperationalMixin< cSimpleModule >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 

Static Protected Attributes

static simsignal_t transmissionStateChangedSignal = registerSignal("transmissionStateChanged")
 
static simsignal_t rxPkOkSignal = registerSignal("rxPkOk")
 

Additional Inherited Members

- Protected Types inherited from inet::OperationalMixin< cSimpleModule >
enum  State
 

Detailed Description

PPP implementation.

Constructor & Destructor Documentation

◆ ~Ppp()

inet::Ppp::~Ppp ( )
virtual
31 {
32  cancelAndDelete(endTransmissionEvent);
33  delete curTxPacket;
34 }

Member Function Documentation

◆ configureNetworkInterface()

void inet::Ppp::configureNetworkInterface ( )
overrideprotectedvirtual

Implements inet::MacProtocolBase.

70 {
71  // data rate
72  bool connected = datarateChannel != nullptr;
73  double datarate = connected ? datarateChannel->getNominalDatarate() : 0;
74  networkInterface->setDatarate(datarate);
75  networkInterface->setCarrier(connected);
76 
77  // generate a link-layer address to be used as interface token for IPv6
78  InterfaceToken token(0, getSimulation()->getUniqueNumber(), 64);
79  networkInterface->setInterfaceToken(token);
80 
81  // MTU: typical values are 576 (Internet de facto), 1500 (Ethernet-friendly),
82  // 4000 (on some point-to-point links), 4470 (Cisco routers default, FDDI compatible)
83  networkInterface->setMtu(par("mtu"));
84 
85  // capabilities
86  networkInterface->setMulticast(true);
87  networkInterface->setPointToPoint(true);
88 }

◆ decapsulate()

void inet::Ppp::decapsulate ( Packet packet)
protectedvirtual
342 {
343  const auto& pppHeader = packet->popAtFront<PppHeader>();
344  const auto& pppTrailer = packet->popAtBack<PppTrailer>(PPP_TRAILER_LENGTH);
345  if (pppHeader == nullptr || pppTrailer == nullptr)
346  throw cRuntimeError("Invalid PPP packet: PPP header or Trailer is missing");
347  // TODO check CRC
348  packet->addTagIfAbsent<InterfaceInd>()->setInterfaceId(networkInterface->getInterfaceId());
349 
350  auto payloadProtocol = ProtocolGroup::pppprotocol.getProtocol(pppHeader->getProtocol());
351  packet->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(payloadProtocol);
352  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(payloadProtocol);
353 }

Referenced by handleLowerPacket().

◆ encapsulate()

void inet::Ppp::encapsulate ( Packet msg)
protectedvirtual
332 {
333  auto pppHeader = makeShared<PppHeader>();
334  pppHeader->setProtocol(ProtocolGroup::pppprotocol.getProtocolNumber(packet->getTag<PacketProtocolTag>()->getProtocol()));
335  packet->insertAtFront(pppHeader);
336  auto pppTrailer = makeShared<PppTrailer>();
337  packet->insertAtBack(pppTrailer);
338  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::ppp);
339 }

Referenced by startTransmitting().

◆ getProvider()

queueing::IPassivePacketSource * inet::Ppp::getProvider ( cGate *  gate)
overridevirtual

Returns the passive packet source from where packets are pulled or nullptr if the connected module doesn't implement the interface.

The gate parameter must be a valid gate of this module.

Implements inet::queueing::IActivePacketSink.

369 {
370  return (gate->getId() == upperLayerInGateId) ? txQueue.get() : nullptr;
371 }

◆ handleCanPullPacketChanged()

void inet::Ppp::handleCanPullPacketChanged ( cGate *  gate)
overridevirtual

Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate.

This method is called, for example, when a new packet is inserted into a queue. It allows the sink to pull a new packet from the queue.

The gate parameter must be a valid gate of this module.

Implements inet::queueing::IActivePacketSink.

374 {
375  Enter_Method("handleCanPullPacketChanged");
376  while (currentTxFrame == nullptr && canDequeuePacket())
378 }

◆ handleLowerPacket()

void inet::Ppp::handleLowerPacket ( Packet packet)
overrideprotectedvirtual

Reimplemented from inet::LayeredProtocolBase.

246 {
247  // TODO if incoming gate is not connected now, then the link has been deleted
248  // during packet transmission --> discard incomplete packet.
249  EV_INFO << "Received " << packet << " from network.\n";
250  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::ppp);
251 
252  // check for bit errors
253  if (packet->hasBitError()) {
254  EV_WARN << "Bit error in " << packet << endl;
255  PacketDropDetails details;
256  details.setReason(INCORRECTLY_RECEIVED);
257  emit(packetDroppedSignal, packet, &details);
259  delete packet;
260  }
261  else {
262  // pass up payload
263  const auto& pppHeader = packet->peekAtFront<PppHeader>();
264  const auto& pppTrailer = packet->peekAtBack<PppTrailer>(PPP_TRAILER_LENGTH);
265  if (pppHeader == nullptr || pppTrailer == nullptr)
266  throw cRuntimeError("Invalid PPP packet: PPP header or Trailer is missing");
267  emit(rxPkOkSignal, packet);
268  decapsulate(packet);
269  numRcvdOK++;
270  emit(packetSentToUpperSignal, packet);
271  EV_INFO << "Sending " << packet << " to upper layer.\n";
272  send(packet, "upperLayerOut");
273  }
274 }

◆ handleMessageWhenUp()

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

Reimplemented from inet::LayeredProtocolBase.

200 {
202  if (operationalState == State::STOPPING_OPERATION) {
203  if (txQueue->isEmpty()) {
204  networkInterface->setCarrier(false);
205  networkInterface->setState(NetworkInterface::State::DOWN);
206  startActiveOperationExtraTimeOrFinish(par("stopOperationExtraTime"));
207  }
208  }
209 }

◆ handlePullPacketProcessed()

void inet::Ppp::handlePullPacketProcessed ( Packet packet,
cGate *  gate,
bool  successful 
)
overridevirtual

Notifies about the completion of the packet processing for a packet that was pulled earlier independently whether the packet is passed or streamed.

This method is called, for example, when a previously pulled packet is failed to be processed successfully. It allows the sink to retry the operation.

The gate parameter must be a valid gate of this module. The packet must not be nullptr.

Implements inet::queueing::IActivePacketSink.

381 {
382  Enter_Method("handlePullPacketProcessed");
383  throw cRuntimeError("Not supported callback");
384 }

◆ handleSelfMessage()

void inet::Ppp::handleSelfMessage ( cMessage *  message)
overrideprotectedvirtual

Reimplemented from inet::LayeredProtocolBase.

212 {
213  if (message == endTransmissionEvent) {
215  delete curTxPacket;
216  curTxPacket = nullptr;
217  // Transmission finished, we can start next one.
218  EV_INFO << "Transmission successfully completed.\n";
220  if (canDequeuePacket())
222  }
223  else
224  throw cRuntimeError("Unknown self message");
225 }

◆ handleStopOperation()

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

Reimplemented from inet::MacProtocolBase.

356 {
357  if (!txQueue->isEmpty()) {
358  networkInterface->setState(NetworkInterface::State::GOING_DOWN);
359  delayActiveOperationFinish(par("stopOperationTimeout"));
360  }
361  else {
362  networkInterface->setCarrier(false);
363  networkInterface->setState(NetworkInterface::State::DOWN);
364  startActiveOperationExtraTimeOrFinish(par("stopOperationExtraTime"));
365  }
366 }

◆ handleUpperPacket()

void inet::Ppp::handleUpperPacket ( Packet packet)
overrideprotectedvirtual

Reimplemented from inet::LayeredProtocolBase.

228 {
229  EV_INFO << "Received " << packet << " from upper layer.\n";
230  if (datarateChannel == nullptr) {
231  EV_WARN << "Interface is not connected, dropping packet " << packet << endl;
233  PacketDropDetails details;
234  details.setReason(INTERFACE_DOWN);
235  emit(packetDroppedSignal, packet, &details);
236  delete packet;
237  return;
238  }
239  if (currentTxFrame != nullptr)
240  throw cRuntimeError("PPP already in transmit state when packet arrived from upper layer");
241  currentTxFrame = packet;
243 }

Referenced by processUpperPacket().

◆ initialize()

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

Reimplemented from inet::MacProtocolBase.

37 {
39 
40  // all initialization is done in the first stage
41  if (stage == INITSTAGE_LOCAL) {
42  displayStringTextFormat = par("displayStringTextFormat");
43  sendRawBytes = par("sendRawBytes");
44  endTransmissionEvent = new cMessage("pppEndTxEvent");
45  lowerLayerInGateId = findGate("phys$i");
46  physOutGate = gate("phys$o");
48 
49  setTxUpdateSupport(true);
50  // we're connected if other end of connection path is an input gate
51  bool connected = physOutGate->getPathEndGate()->getType() == cGate::INPUT;
52  // if we're connected, get the gate with transmission rate
53  datarateChannel = connected ? physOutGate->getTransmissionChannel() : nullptr;
54 
56  WATCH(numSent);
57  WATCH(numRcvdOK);
58  WATCH(numDroppedBitErr);
59  WATCH(numDroppedIfaceDown);
60 
61  subscribe(PRE_MODEL_CHANGE, this);
62  subscribe(POST_MODEL_CHANGE, this);
64 
66  }
67 }

◆ numInitStages()

virtual int inet::Ppp::numInitStages ( ) const
inlineoverrideprotectedvirtual
65 { return NUM_INIT_STAGES; }

◆ processUpperPacket()

void inet::Ppp::processUpperPacket ( )
protectedvirtual
387 {
388  auto packet = dequeuePacket();
389  handleUpperPacket(packet);
390 }

Referenced by handleCanPullPacketChanged(), handleSelfMessage(), and refreshOutGateConnection().

◆ receiveSignal()

void inet::Ppp::receiveSignal ( cComponent *  source,
simsignal_t  signalID,
cObject *  obj,
cObject *  details 
)
overrideprotectedvirtual

Reimplemented from inet::MacProtocolBase.

91 {
92  Enter_Method("%s", cComponent::getSignalName(signalID));
93 
94  MacProtocolBase::receiveSignal(source, signalID, obj, details);
95 
96  if (getSimulation()->getSimulationStage() == CTX_CLEANUP)
97  return;
98 
99  if (signalID == POST_MODEL_CHANGE) {
100  if (auto gcobj = dynamic_cast<cPostPathCreateNotification *>(obj)) {
101  if (physOutGate == gcobj->pathStartGate)
103  }
104  else if (auto gcobj = dynamic_cast<cPostPathCutNotification *>(obj)) {
105  if (physOutGate == gcobj->pathStartGate)
107  }
108  else if (datarateChannel && dynamic_cast<cPostParameterChangeNotification *>(obj)) {
109  cPostParameterChangeNotification *gcobj = static_cast<cPostParameterChangeNotification *>(obj);
110  if (datarateChannel == gcobj->par->getOwner() && !strcmp("datarate", gcobj->par->getName()))
112  }
113  }
114  else if (signalID == PRE_MODEL_CHANGE) {
115  if (auto gcobj = dynamic_cast<cPrePathCutNotification *>(obj)) {
116  if (physOutGate == gcobj->pathStartGate)
118  }
119  }
120 }

◆ refreshDisplay()

void inet::Ppp::refreshDisplay ( ) const
overrideprotectedvirtual
277 {
279 
280  if (displayStringTextFormat != nullptr) {
281  auto text = StringFormat::formatString(displayStringTextFormat, [&] (char directive) {
282  static std::string result;
283  switch (directive) {
284  case 's':
285  result = std::to_string(numSent);
286  break;
287  case 'r':
288  result = std::to_string(numRcvdOK);
289  break;
290  case 'd':
291  result = std::to_string(numDroppedIfaceDown + numDroppedBitErr);
292  break;
293  case 'q':
294  result = std::to_string(txQueue->getNumPackets());
295  break;
296  case 'b':
297  if (datarateChannel == nullptr)
298  result = "not connected";
299  else {
300  char datarateText[40];
301  double datarate = datarateChannel->getNominalDatarate();
302  if (datarate >= 1e9)
303  sprintf(datarateText, "%gGbps", datarate / 1e9);
304  else if (datarate >= 1e6)
305  sprintf(datarateText, "%gMbps", datarate / 1e6);
306  else if (datarate >= 1e3)
307  sprintf(datarateText, "%gkbps", datarate / 1e3);
308  else
309  sprintf(datarateText, "%gbps", datarate);
310  result = datarateText;
311  }
312  break;
313  default:
314  throw cRuntimeError("Unknown directive: %c", directive);
315  }
316  return result.c_str();
317  });
318  getDisplayString().setTagArg("t", 0, text);
319  }
320 
321  const char *color = "";
322  if (datarateChannel != nullptr) {
323  if (endTransmissionEvent->isScheduled())
324  color = txQueue->getNumPackets() >= 3 ? "red" : "yellow";
325  }
326  else
327  color = "#707070";
328  getDisplayString().setTagArg("i", 1, color);
329 }

◆ refreshOutGateConnection()

void inet::Ppp::refreshOutGateConnection ( bool  connected)
protectedvirtual
123 {
124  Enter_Method("refreshOutGateConnection");
125 
126  // we're connected if other end of connection path is an input gate
127  if (connected)
128  ASSERT(physOutGate->getPathEndGate()->getType() == cGate::INPUT);
129 
130  if (!connected) {
131  if (endTransmissionEvent->isScheduled()) {
132  ASSERT(curTxPacket != nullptr);
133  simtime_t startTransmissionTime = endTransmissionEvent->getSendingTime();
134  simtime_t sentDuration = simTime() - startTransmissionTime;
135  double sentPart = sentDuration / (endTransmissionEvent->getArrivalTime() - startTransmissionTime);
136  b newLength = b(floor(curTxPacket->getBitLength() * sentPart));
138  curTxPacket->setBitError(true);
139  send(curTxPacket, SendOptions().finishTx(curTxPacket->getId()).duration(sentDuration), physOutGate);
140  curTxPacket = nullptr;
141  cancelEvent(endTransmissionEvent);
142  }
143 
144  PacketDropDetails details;
145  details.setReason(INTERFACE_DOWN); // TODO choose a correct PacketDropReason value
146  flushQueue(details);
147  }
148 
149  cChannel *oldChannel = datarateChannel;
150  // if we're connected, get the gate with transmission rate
151  datarateChannel = connected ? physOutGate->getTransmissionChannel() : nullptr;
152  double datarate = connected ? datarateChannel->getNominalDatarate() : 0;
153 
154  if (datarateChannel && !oldChannel)
155  datarateChannel->subscribe(POST_MODEL_CHANGE, this);
156 
157  // update interface state if it is in use
158  if (networkInterface) {
159  networkInterface->setCarrier(connected);
160  networkInterface->setDatarate(datarate);
161  }
162 
163  if (connected && currentTxFrame == nullptr && canDequeuePacket()) {
164  ASSERT(!endTransmissionEvent->isScheduled());
166  }
167 }

Referenced by receiveSignal().

◆ startTransmitting()

void inet::Ppp::startTransmitting ( )
protectedvirtual
170 {
171  // if there's any control info, remove it; then encapsulate the packet
172  Packet *pppFrame = currentTxFrame->dup();
173  encapsulate(pppFrame);
174 
175  // send
176  EV_INFO << "Transmission of " << pppFrame << " started.\n";
178  emit(packetSentToLowerSignal, pppFrame);
179  auto& oldPacketProtocolTag = pppFrame->removeTag<PacketProtocolTag>();
180  pppFrame->clearTags();
181  auto newPacketProtocolTag = pppFrame->addTag<PacketProtocolTag>();
182  *newPacketProtocolTag = *oldPacketProtocolTag;
183  if (sendRawBytes) {
184  auto bytes = pppFrame->peekDataAsBytes();
185  pppFrame->eraseAll();
186  pppFrame->insertAtFront(bytes);
187  }
188  curTxPacket = pppFrame->dup();
189  send(pppFrame, SendOptions().transmissionId(curTxPacket->getId()), physOutGate);
190 
191  ASSERT(datarateChannel == physOutGate->getTransmissionChannel()); // FIXME reread datarateChannel when changed
192 
193  // schedule an event for the time when last bit will leave the gate.
194  simtime_t endTransmissionTime = datarateChannel->getTransmissionFinishTime();
195  scheduleAt(endTransmissionTime, endTransmissionEvent);
196  numSent++;
197 }

Referenced by handleUpperPacket().

Member Data Documentation

◆ curTxPacket

Packet* inet::Ppp::curTxPacket = nullptr
protected

◆ datarateChannel

cChannel* inet::Ppp::datarateChannel = nullptr
protected

◆ displayStringTextFormat

const char* inet::Ppp::displayStringTextFormat = nullptr
protected

Referenced by initialize(), and refreshDisplay().

◆ endTransmissionEvent

cMessage* inet::Ppp::endTransmissionEvent = nullptr
protected

◆ numDroppedBitErr

long inet::Ppp::numDroppedBitErr = 0
protected

◆ numDroppedIfaceDown

long inet::Ppp::numDroppedIfaceDown = 0
protected

◆ numRcvdOK

long inet::Ppp::numRcvdOK = 0
protected

◆ numSent

long inet::Ppp::numSent = 0
protected

◆ oldConnColor

std::string inet::Ppp::oldConnColor
protected

◆ physOutGate

cGate* inet::Ppp::physOutGate = nullptr
protected

◆ rxPkOkSignal

simsignal_t inet::Ppp::rxPkOkSignal = registerSignal("rxPkOk")
staticprotected

Referenced by handleLowerPacket().

◆ sendRawBytes

bool inet::Ppp::sendRawBytes = false
protected

Referenced by initialize(), and startTransmitting().

◆ transmissionStateChangedSignal

simsignal_t inet::Ppp::transmissionStateChangedSignal = registerSignal("transmissionStateChanged")
staticprotected

The documentation for this class was generated from the following files:
inet::MacProtocolBase::networkInterface
opp_component_ptr< NetworkInterface > networkInterface
Definition: MacProtocolBase.h:30
inet::LayeredProtocolBase::handleMessageWhenUp
virtual void handleMessageWhenUp(cMessage *message) override
Definition: LayeredProtocolBase.cc:14
inet::Ppp::startTransmitting
virtual void startTransmitting()
Definition: Ppp.cc:169
inet::Ppp::curTxPacket
Packet * curTxPacket
Definition: Ppp.h:35
inet::OperationalMixin< cSimpleModule >::operationalState
State operationalState
Definition: OperationalMixin.h:23
inet::Ppp::numRcvdOK
long numRcvdOK
Definition: Ppp.h:41
inet::MacProtocolBase::flushQueue
virtual void flushQueue(PacketDropDetails &details)
should clear queue and emit signal "packetDropped" with entire packets
Definition: MacProtocolBase.cc:106
inet::Packet::getDataLength
b getDataLength() const
Returns the current length of the data part of the packet.
Definition: Packet.h:206
inet::INCORRECTLY_RECEIVED
@ INCORRECTLY_RECEIVED
Definition: Simsignals_m.h:71
inet::Ppp::processUpperPacket
virtual void processUpperPacket()
Definition: Ppp.cc:386
inet::Ppp::sendRawBytes
bool sendRawBytes
Definition: Ppp.h:28
inet::Ppp::displayStringTextFormat
const char * displayStringTextFormat
Definition: Ppp.h:27
inet::Ppp::numDroppedIfaceDown
long numDroppedIfaceDown
Definition: Ppp.h:43
DispatchProtocolReq
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
inet::Ppp::datarateChannel
cChannel * datarateChannel
Definition: Ppp.h:30
inet::packetDroppedSignal
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::MacProtocolBase::lowerLayerInGateId
int lowerLayerInGateId
Definition: MacProtocolBase.h:26
inet::Protocol::ppp
static const Protocol ppp
Definition: Protocol.h:104
inet::Ppp::physOutGate
cGate * physOutGate
Definition: Ppp.h:29
inet::Ppp::refreshOutGateConnection
virtual void refreshOutGateConnection(bool connected)
Definition: Ppp.cc:122
inet::Packet::dup
virtual Packet * dup() const override
Definition: Packet.h:171
inet::Packet::removeAtBack
const Ptr< Chunk > removeAtBack(b length=b(-1), int flags=0)
Removes the designated part from the end of the data part of the packet and returns it as a mutable c...
Definition: Packet.h:665
inet::MacProtocolBase::currentTxFrame
Packet * currentTxFrame
Currently transmitted frame if any.
Definition: MacProtocolBase.h:35
inet::MacProtocolBase::upperLayerInGateId
int upperLayerInGateId
Gate ids.
Definition: MacProtocolBase.h:24
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::MacProtocolBase::receiveSignal
virtual void receiveSignal(cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
Definition: MacProtocolBase.cc:151
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::PPP_TRAILER_LENGTH
const B PPP_TRAILER_LENGTH
Definition: PppFrame_m.h:47
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::Ppp::rxPkOkSignal
static simsignal_t rxPkOkSignal
Definition: Ppp.h:46
inet::Packet::getBitLength
virtual int64_t getBitLength() const override
Returns the length in bits between the front and back offsets.
Definition: Packet.h:199
inet::MacProtocolBase::deleteCurrentTxFrame
virtual void deleteCurrentTxFrame()
Definition: MacProtocolBase.cc:93
inet::MacProtocolBase::initialize
virtual void initialize(int stage) override
Definition: MacProtocolBase.cc:37
inet::Ppp::numSent
long numSent
Definition: Ppp.h:40
inet::Ppp::transmissionStateChangedSignal
static simsignal_t transmissionStateChangedSignal
Definition: Ppp.h:45
inet::OperationalMixin< cSimpleModule >::delayActiveOperationFinish
virtual void delayActiveOperationFinish(simtime_t timeout)
Definition: OperationalMixinImpl.h:161
inet::Ppp::decapsulate
virtual void decapsulate(Packet *packet)
Definition: Ppp.cc:341
inet::StringFormat::formatString
const char * formatString(IDirectiveResolver *resolver) const
Definition: StringFormat.cc:17
inet::INTERFACE_DOWN
@ INTERFACE_DOWN
Definition: Simsignals_m.h:72
inet::MacProtocolBase::getQueue
queueing::IPacketQueue * getQueue(cGate *gate) const
Definition: MacProtocolBase.cc:157
inet::OperationalMixin< cSimpleModule >::startActiveOperationExtraTimeOrFinish
virtual void startActiveOperationExtraTimeOrFinish(simtime_t extraTime)
Definition: OperationalMixinImpl.h:179
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::MacProtocolBase::lowerLayerOutGateId
int lowerLayerOutGateId
Definition: MacProtocolBase.h:27
inet::MacProtocolBase::dequeuePacket
virtual Packet * dequeuePacket()
Definition: MacProtocolBase.cc:175
inet::packetSentToUpperSignal
simsignal_t packetSentToUpperSignal
Definition: Simsignals.cc:87
inet::ProtocolGroup::getProtocol
const Protocol * getProtocol(int protocolNumber) const
Definition: ProtocolGroup.cc:31
inet::MacProtocolBase::txQueue
opp_component_ptr< queueing::IPacketQueue > txQueue
Messages received from upper layer and to be transmitted later.
Definition: MacProtocolBase.h:38
inet::Ppp::encapsulate
virtual void encapsulate(Packet *msg)
Definition: Ppp.cc:331
inet::Ppp::numDroppedBitErr
long numDroppedBitErr
Definition: Ppp.h:42
inet::OperationalMixin< cSimpleModule >::refreshDisplay
virtual void refreshDisplay() const override
Definition: OperationalMixinImpl.h:200
inet::MacProtocolBase::canDequeuePacket
virtual bool canDequeuePacket() const
Definition: MacProtocolBase.cc:170
inet::Ppp::handleUpperPacket
virtual void handleUpperPacket(Packet *packet) override
Definition: Ppp.cc:227
inet::ProtocolGroup::pppprotocol
static ProtocolGroup pppprotocol
Definition: ProtocolGroup.h:43
inet::Ppp::endTransmissionEvent
cMessage * endTransmissionEvent
Definition: Ppp.h:32
inet::packetSentToLowerSignal
simsignal_t packetSentToLowerSignal
Definition: Simsignals.cc:90