diff --git a/src/inet/linklayer/ppp/Ppp.cc b/src/inet/linklayer/ppp/Ppp.cc index 59dbe767859..9e9aaaebd45 100644 --- a/src/inet/linklayer/ppp/Ppp.cc +++ b/src/inet/linklayer/ppp/Ppp.cc @@ -215,6 +215,7 @@ void Ppp::handleMessageWhenUp(cMessage *message) void Ppp::handleSelfMessage(cMessage *message) { if (message == endTransmissionEvent) { + emit(transmissionEndedSignal, curTxPacket); deleteCurrentTxFrame(); delete curTxPacket; curTxPacket = nullptr; @@ -268,6 +269,7 @@ void Ppp::handleLowerPacket(Packet *packet) const auto& pppTrailer = packet->peekAtBack(PPP_TRAILER_LENGTH); if (pppHeader == nullptr || pppTrailer == nullptr) throw cRuntimeError("Invalid PPP packet: PPP header or Trailer is missing"); + emit(receptionEndedSignal, packet); emit(rxPkOkSignal, packet); decapsulate(packet); numRcvdOK++; diff --git a/src/inet/linklayer/ppp/Ppp.ned b/src/inet/linklayer/ppp/Ppp.ned index ab01cb7e31b..ac679d57147 100644 --- a/src/inet/linklayer/ppp/Ppp.ned +++ b/src/inet/linklayer/ppp/Ppp.ned @@ -51,6 +51,8 @@ simple Ppp @signal[packetReceivedFromLower](type=cPacket); @signal[packetSentToUpper](type=cPacket); @signal[packetReceivedFromUpper](type=cPacket); + @signal[transmissionEnded](type=inet::Packet); + @signal[receptionEnded](type=inet::Packet); @statistic[transmissionState](title="tx state"; source=transmissionStateChanged; record=timeavg,vector; interpolationmode=sample-hold); @statistic[txPk](title="packets transmitted"; source=packetSentToLower; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[rxPkOk](title="packets received OK"; source=rxPkOk; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);