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

ICMPv6 implementation. More...

#include <Icmpv6.h>

Inheritance diagram for inet::Icmpv6:
inet::LifecycleUnsupported inet::DefaultProtocolRegistrationListener inet::ILifecycle inet::IProtocolRegistrationListener

Public Member Functions

virtual void sendErrorMessage (Packet *datagram, Icmpv6Type type, int code)
 This method can be called from other modules to send an ICMPv6 error packet. More...
 
void insertCrc (const Ptr< Icmpv6Header > &icmpHeader, Packet *packet)
 
- Public Member Functions inherited from inet::LifecycleUnsupported
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. 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
 
virtual void handleRegisterAnyProtocol (cGate *gate, ServicePrimitive servicePrimitive) override
 

Static Public Member Functions

static bool verifyCrc (const Packet *packet)
 
static void insertCrc (CrcMode crcMode, const Ptr< Icmpv6Header > &icmpHeader, Packet *packet)
 

Protected Types

typedef std::map< long, int > PingMap
 

Protected Member Functions

virtual void sendToIP (Packet *msg, const Ipv6Address &dest)
 
virtual void sendToIP (Packet *msg)
 
virtual PacketcreateDestUnreachableMsg (Icmpv6DestUnav code)
 
virtual PacketcreatePacketTooBigMsg (int mtu)
 
virtual PacketcreateTimeExceededMsg (Icmpv6TimeEx code)
 
virtual PacketcreateParamProblemMsg (Icmpv6ParameterProblem code)
 
virtual void initialize (int stage) override
 Initialization. More...
 
virtual int numInitStages () const override
 
virtual void handleMessage (cMessage *msg) override
 Processing of messages that arrive in this module. More...
 
virtual void processICMPv6Message (Packet *packet)
 
virtual void processEchoRequest (Packet *packet, const Ptr< const Icmpv6EchoRequestMsg > &header)
 Respond to the machine that tried to ping us. More...
 
virtual void processEchoReply (Packet *packet, const Ptr< const Icmpv6EchoReplyMsg > &header)
 Forward the ping reply to the "pingOut" of this module. More...
 
virtual bool validateDatagramPromptingError (Packet *packet)
 Validate the received Ipv6 datagram before responding with error message. More...
 
virtual void errorOut (const Ptr< const Icmpv6Header > &header)
 
virtual void handleRegisterService (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocol (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 

Protected Attributes

CrcMode crcMode = CRC_MODE_UNDEFINED
 
PingMap pingMap
 
std::set< int > transportProtocols
 

Detailed Description

ICMPv6 implementation.

Member Typedef Documentation

◆ PingMap

typedef std::map<long, int> inet::Icmpv6::PingMap
protected

Member Function Documentation

◆ createDestUnreachableMsg()

Packet * inet::Icmpv6::createDestUnreachableMsg ( Icmpv6DestUnav  code)
protectedvirtual
253 {
254  auto errorMsg = makeShared<Icmpv6DestUnreachableMsg>();
255  errorMsg->setType(ICMPv6_DESTINATION_UNREACHABLE);
256  errorMsg->setCode(code);
257  auto packet = new Packet("Dest Unreachable");
258  packet->insertAtBack(errorMsg);
259  return packet;
260 }

Referenced by sendErrorMessage().

◆ createPacketTooBigMsg()

Packet * inet::Icmpv6::createPacketTooBigMsg ( int  mtu)
protectedvirtual
263 {
264  auto errorMsg = makeShared<Icmpv6PacketTooBigMsg>();
265  errorMsg->setType(ICMPv6_PACKET_TOO_BIG);
266  errorMsg->setCode(0); // Set to 0 by sender and ignored by receiver.
267  errorMsg->setMTU(mtu);
268  auto packet = new Packet("Packet Too Big");
269  packet->insertAtBack(errorMsg);
270  return packet;
271 }

Referenced by sendErrorMessage().

◆ createParamProblemMsg()

Packet * inet::Icmpv6::createParamProblemMsg ( Icmpv6ParameterProblem  code)
protectedvirtual
284 {
285  auto errorMsg = makeShared<Icmpv6ParamProblemMsg>();
286  errorMsg->setType(ICMPv6_PARAMETER_PROBLEM);
287  errorMsg->setCode(code);
288  // TODO What Pointer? section 3.4
289  auto packet = new Packet("Parameter Problem");
290  packet->insertAtBack(errorMsg);
291  return packet;
292 }

Referenced by sendErrorMessage().

◆ createTimeExceededMsg()

Packet * inet::Icmpv6::createTimeExceededMsg ( Icmpv6TimeEx  code)
protectedvirtual
274 {
275  auto errorMsg = makeShared<Icmpv6TimeExceededMsg>();
276  errorMsg->setType(ICMPv6_TIME_EXCEEDED);
277  errorMsg->setCode(code);
278  auto packet = new Packet("Time Exceeded");
279  packet->insertAtBack(errorMsg);
280  return packet;
281 }

Referenced by sendErrorMessage().

◆ errorOut()

void inet::Icmpv6::errorOut ( const Ptr< const Icmpv6Header > &  header)
protectedvirtual
315 {
316 }

Referenced by processICMPv6Message().

◆ handleMessage()

void inet::Icmpv6::handleMessage ( cMessage *  msg)
overrideprotectedvirtual

Processing of messages that arrive in this module.

Messages arrived here could be for ICMP ping requests or ICMPv6 messages that require processing.

47 {
48  ASSERT(!msg->isSelfMessage()); // no timers in ICMPv6
49 
50  // process arriving ICMP message
51  if (msg->getArrivalGate()->isName("ipv6In")) {
52  EV_INFO << "Processing ICMPv6 message.\n";
53  processICMPv6Message(check_and_cast<Packet *>(msg));
54  return;
55  }
56  else
57  throw cRuntimeError("Message %s(%s) arrived in unknown '%s' gate", msg->getName(), msg->getClassName(), msg->getArrivalGate()->getName());
58 }

◆ handleRegisterProtocol()

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

Reimplemented from inet::DefaultProtocolRegistrationListener.

324 {
325  Enter_Method("handleRegisterProtocol");
326  if (!strcmp("transportOut", gate->getBaseName())) {
328  if (protocolNumber != -1)
329  transportProtocols.insert(protocolNumber);
330  }
331 }

◆ handleRegisterService()

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

Reimplemented from inet::DefaultProtocolRegistrationListener.

319 {
320  Enter_Method("handleRegisterService");
321 }

◆ initialize()

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

Initialization.

28 {
29  cSimpleModule::initialize(stage);
30 
31  if (stage == INITSTAGE_LOCAL) {
32  const char *crcModeString = par("crcMode");
33  crcMode = parseCrcMode(crcModeString, false);
34  }
35  else if (stage == INITSTAGE_NETWORK_LAYER_PROTOCOLS) {
36  bool isOperational;
37  NodeStatus *nodeStatus = dynamic_cast<NodeStatus *>(getContainingNode(this)->getSubmodule("status"));
38  isOperational = (!nodeStatus) || nodeStatus->getState() == NodeStatus::UP;
39  if (!isOperational)
40  throw cRuntimeError("This module doesn't support starting in node DOWN state");
41  registerService(Protocol::icmpv6, gate("transportIn"), gate("transportOut"));
42  registerProtocol(Protocol::icmpv6, gate("ipv6Out"), gate("ipv6In"));
43  }
44 }

◆ insertCrc() [1/2]

void inet::Icmpv6::insertCrc ( const Ptr< Icmpv6Header > &  icmpHeader,
Packet packet 
)
inline
93 { insertCrc(crcMode, icmpHeader, packet); }

Referenced by insertCrc().

◆ insertCrc() [2/2]

void inet::Icmpv6::insertCrc ( CrcMode  crcMode,
const Ptr< Icmpv6Header > &  icmpHeader,
Packet packet 
)
static
334 {
335  icmpHeader->setCrcMode(crcMode);
336  switch (crcMode) {
338  // if the CRC mode is declared to be correct, then set the CRC to an easily recognizable value
339  icmpHeader->setChksum(0xC00D);
340  break;
342  // if the CRC mode is declared to be incorrect, then set the CRC to an easily recognizable value
343  icmpHeader->setChksum(0xBAAD);
344  break;
345  case CRC_COMPUTED: {
346  // if the CRC mode is computed, then compute the CRC and set it
347  icmpHeader->setChksum(0x0000); // make sure that the CRC is 0 in the header before computing the CRC
348  MemoryOutputStream icmpStream;
349  Chunk::serialize(icmpStream, icmpHeader);
350  if (packet->getByteLength() > 0)
351  Chunk::serialize(icmpStream, packet->peekDataAsBytes());
352  uint16_t crc = TcpIpChecksum::checksum(icmpStream.getData());
353  icmpHeader->setChksum(crc);
354  break;
355  }
356  default:
357  throw cRuntimeError("Unknown CRC mode");
358  }
359 }

Referenced by inet::Ipv6NeighbourDiscovery::createAndSendNsPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRaPacket(), inet::Ipv6NeighbourDiscovery::createAndSendRsPacket(), processEchoRequest(), sendErrorMessage(), inet::PingApp::sendPingRequest(), inet::Ipv6NeighbourDiscovery::sendSolicitedNa(), and inet::Ipv6NeighbourDiscovery::sendUnsolicitedNa().

◆ numInitStages()

virtual int inet::Icmpv6::numInitStages ( ) const
inlineoverrideprotectedvirtual
62 { return NUM_INIT_STAGES; }

◆ processEchoReply()

void inet::Icmpv6::processEchoReply ( Packet packet,
const Ptr< const Icmpv6EchoReplyMsg > &  header 
)
protectedvirtual

Forward the ping reply to the "pingOut" of this module.

180 {
181  delete packet;
182 }

Referenced by processICMPv6Message().

◆ processEchoRequest()

void inet::Icmpv6::processEchoRequest ( Packet packet,
const Ptr< const Icmpv6EchoRequestMsg > &  header 
)
protectedvirtual

Respond to the machine that tried to ping us.

148 {
149  // Create an ICMPv6 Reply Message
150  auto replyPacket = new Packet();
151  replyPacket->setName((std::string(requestPacket->getName()) + "-reply").c_str());
152  auto replyHeader = makeShared<Icmpv6EchoReplyMsg>();
153  replyHeader->setIdentifier(requestHeader->getIdentifier());
154  replyHeader->setSeqNumber(requestHeader->getSeqNumber());
155  replyPacket->insertAtBack(requestPacket->peekData());
156  insertCrc(replyHeader, replyPacket);
157  replyPacket->insertAtFront(replyHeader);
158 
159  auto addressInd = requestPacket->getTag<L3AddressInd>();
160  replyPacket->addTag<PacketProtocolTag>()->setProtocol(&Protocol::icmpv6);
161  auto addressReq = replyPacket->addTag<L3AddressReq>();
162  addressReq->setDestAddress(addressInd->getSrcAddress());
163 
164  if (addressInd->getDestAddress().isMulticast() /*TODO check for anycast too*/) {
165  IInterfaceTable *it = getModuleFromPar<IInterfaceTable>(par("interfaceTableModule"), this);
166  auto ipv6Data = it->getInterfaceById(requestPacket->getTag<InterfaceInd>()->getInterfaceId())->getProtocolDataForUpdate<Ipv6InterfaceData>();
167  addressReq->setSrcAddress(ipv6Data->getPreferredAddress());
168  // TODO implement default address selection properly.
169  // According to RFC 3484, the source address to be used
170  // depends on the destination address
171  }
172  else
173  addressReq->setSrcAddress(addressInd->getDestAddress());
174 
175  delete requestPacket;
176  sendToIP(replyPacket);
177 }

Referenced by processICMPv6Message().

◆ processICMPv6Message()

void inet::Icmpv6::processICMPv6Message ( Packet packet)
protectedvirtual
61 {
62  if (!verifyCrc(packet)) {
63  // drop packet
64  EV_WARN << "incoming ICMP packet has wrong CRC, dropped\n";
65  PacketDropDetails details;
66  details.setReason(INCORRECTLY_RECEIVED);
67  emit(packetDroppedSignal, packet, &details);
68  delete packet;
69  return;
70  }
71 
72  auto icmpv6msg = packet->peekAtFront<Icmpv6Header>();
73  int type = icmpv6msg->getType();
74  if (type < 128) {
75  // ICMP errors are delivered to the appropriate higher layer protocols
76  EV_INFO << "ICMPv6 packet: passing it to higher layer\n";
77  const auto& bogusIpv6Header = packet->peekDataAt<Ipv6Header>(icmpv6msg->getChunkLength());
78  int transportProtocol = bogusIpv6Header->getProtocolId();
79  if (transportProtocol == IP_PROT_IPv6_ICMP) {
80  // ICMP error answer to an ICMP packet:
81  errorOut(icmpv6msg);
82  delete packet;
83  }
84  else {
85  auto dispatchProtocolReq = packet->addTagIfAbsent<DispatchProtocolReq>();
86  dispatchProtocolReq->setServicePrimitive(SP_INDICATION);
87  dispatchProtocolReq->setProtocol(ProtocolGroup::ipprotocol.getProtocol(transportProtocol));
88  send(packet, "transportOut");
89  }
90  }
91  else {
92  auto icmpv6msg = packet->popAtFront<Icmpv6Header>();
93  if (dynamicPtrCast<const Icmpv6DestUnreachableMsg>(icmpv6msg)) {
94  EV_INFO << "ICMPv6 Destination Unreachable Message Received." << endl;
95  errorOut(icmpv6msg);
96  delete packet;
97  }
98  else if (dynamicPtrCast<const Icmpv6PacketTooBigMsg>(icmpv6msg)) {
99  EV_INFO << "ICMPv6 Packet Too Big Message Received." << endl;
100  errorOut(icmpv6msg);
101  delete packet;
102  }
103  else if (dynamicPtrCast<const Icmpv6TimeExceededMsg>(icmpv6msg)) {
104  EV_INFO << "ICMPv6 Time Exceeded Message Received." << endl;
105  errorOut(icmpv6msg);
106  delete packet;
107  }
108  else if (dynamicPtrCast<const Icmpv6ParamProblemMsg>(icmpv6msg)) {
109  EV_INFO << "ICMPv6 Parameter Problem Message Received." << endl;
110  errorOut(icmpv6msg);
111  delete packet;
112  }
113  else if (auto echoRequest = dynamicPtrCast<const Icmpv6EchoRequestMsg>(icmpv6msg)) {
114  EV_INFO << "ICMPv6 Echo Request Message Received." << endl;
115  processEchoRequest(packet, echoRequest);
116  }
117  else if (auto echoReply = dynamicPtrCast<const Icmpv6EchoReplyMsg>(icmpv6msg)) {
118  EV_INFO << "ICMPv6 Echo Reply Message Received." << endl;
119  processEchoReply(packet, echoReply);
120  }
121  else
122  throw cRuntimeError("Unknown message type received: (%s)%s.\n", icmpv6msg->getClassName(), icmpv6msg->getName());
123  }
124 }

Referenced by handleMessage(), and sendErrorMessage().

◆ sendErrorMessage()

void inet::Icmpv6::sendErrorMessage ( Packet datagram,
Icmpv6Type  type,
int  code 
)
virtual

This method can be called from other modules to send an ICMPv6 error packet.

RFC 2463, Section 3: ICMPv6 Error Messages There are a total of 4 ICMPv6 error messages as described in the RFC. This method will construct and send error messages corresponding to the given type. Error Types:

  • Destination Unreachable Message - 1
  • Packet Too Big Message - 2
  • Time Exceeded Message - 3
  • Parameter Problem Message - 4 Code Types have different semantics for each error type. See RFC 2463.
185 {
186  Enter_Method("sendErrorMessage(datagram, type=%d, code=%d)", type, code);
187 
188  if (!validateDatagramPromptingError(origDatagram))
189  return;
190 
191  Packet *errorMsg;
192 
194  errorMsg = createDestUnreachableMsg(static_cast<Icmpv6DestUnav>(code));
195  // TODO implement MTU support.
196  else if (type == ICMPv6_PACKET_TOO_BIG)
197  errorMsg = createPacketTooBigMsg(0);
198  else if (type == ICMPv6_TIME_EXCEEDED)
199  errorMsg = createTimeExceededMsg(static_cast<Icmpv6TimeEx>(code));
200  else if (type == ICMPv6_PARAMETER_PROBLEM)
201  errorMsg = createParamProblemMsg(static_cast<Icmpv6ParameterProblem>(code));
202  else
203  throw cRuntimeError("Unknown ICMPv6 error type: %d\n", type);
204 
205  // Encapsulate the original datagram, but the whole ICMPv6 error
206  // packet cannot be larger than the minimum Ipv6 MTU (RFC 4443 2.4. (c)).
207  // NOTE: since we just overwrite the errorMsg length without actually
208  // truncating origDatagram, one can get "packet length became negative"
209  // error when decapsulating the origDatagram on the receiver side.
210  // A workaround is to avoid decapsulation, or to manually set the
211  // errorMessage length to be larger than the encapsulated message.
212  b copyLength = B(IPv6_MIN_MTU) - errorMsg->getTotalLength();
213  errorMsg->insertAtBack(origDatagram->peekDataAt(b(0), std::min(copyLength, origDatagram->getDataLength())));
214 
215  auto icmpHeader = errorMsg->removeAtFront<Icmpv6Header>();
216  insertCrc(icmpHeader, errorMsg);
217  errorMsg->insertAtFront(icmpHeader);
218 
219  // debugging information
220  EV_DEBUG << "sending ICMP error: (" << errorMsg->getClassName() << ")" << errorMsg->getName()
221  << " type=" << type << " code=" << code << endl;
222 
223  // if srcAddr is not filled in, we're still in the src node, so we just
224  // process the ICMP message locally, right away
225  const auto& ipv6Header = origDatagram->peekAtFront<Ipv6Header>();
226  if (ipv6Header->getSrcAddress().isUnspecified()) {
227  // pretend it came from the IP layer
228  errorMsg->addTag<PacketProtocolTag>()->setProtocol(&Protocol::icmpv6);
229  errorMsg->addTag<L3AddressInd>()->setSrcAddress(Ipv6Address::LOOPBACK_ADDRESS); // FIXME maybe use configured loopback address
230 
231  // then process it locally
232  processICMPv6Message(errorMsg);
233  }
234  else {
235  sendToIP(errorMsg, ipv6Header->getSrcAddress());
236  }
237 }

Referenced by inet::Ipv6FragBuf::addFragment(), and inet::Ipv6FragBuf::purgeStaleFragments().

◆ sendToIP() [1/2]

void inet::Icmpv6::sendToIP ( Packet msg)
protectedvirtual
246 {
247  msg->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(&Protocol::ipv6);
248  msg->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::icmpv6);
249  send(msg, "ipv6Out");
250 }

◆ sendToIP() [2/2]

void inet::Icmpv6::sendToIP ( Packet msg,
const Ipv6Address dest 
)
protectedvirtual
240 {
241  msg->addTagIfAbsent<L3AddressReq>()->setDestAddress(dest);
242  sendToIP(msg);
243 }

Referenced by processEchoRequest(), and sendErrorMessage().

◆ validateDatagramPromptingError()

bool inet::Icmpv6::validateDatagramPromptingError ( Packet packet)
protectedvirtual

Validate the received Ipv6 datagram before responding with error message.

295 {
296  auto ipv6Header = packet->peekAtFront<Ipv6Header>();
297  // don't send ICMP error messages for multicast messages
298  if (ipv6Header->getDestAddress().isMulticast()) {
299  EV_INFO << "won't send ICMP error messages for multicast message " << ipv6Header << endl;
300  return false;
301  }
302 
303  // do not reply with error message to error message
304  if (ipv6Header->getProtocolId() == IP_PROT_IPv6_ICMP) {
305  auto recICMPMsg = packet->peekDataAt<Icmpv6Header>(ipv6Header->getChunkLength());
306  if (recICMPMsg->getType() < 128) {
307  EV_INFO << "ICMP error received -- do not reply to it" << endl;
308  return false;
309  }
310  }
311  return true;
312 }

Referenced by sendErrorMessage().

◆ verifyCrc()

bool inet::Icmpv6::verifyCrc ( const Packet packet)
static
362 {
363  const auto& icmpHeader = packet->peekAtFront<Icmpv6Header>(b(-1), Chunk::PF_ALLOW_INCORRECT);
364  switch (icmpHeader->getCrcMode()) {
366  // if the CRC mode is declared to be correct, then the check passes if and only if the chunks are correct
367  return icmpHeader->isCorrect();
369  // if the CRC mode is declared to be incorrect, then the check fails
370  return false;
371  case CRC_COMPUTED: {
372  // otherwise compute the CRC, the check passes if the result is 0xFFFF (includes the received CRC)
373  auto dataBytes = packet->peekDataAsBytes(Chunk::PF_ALLOW_INCORRECT);
374  uint16_t crc = TcpIpChecksum::checksum(dataBytes->getBytes());
375  // TODO delete these isCorrect calls, rely on CRC only
376  return crc == 0 && icmpHeader->isCorrect();
377  }
378  default:
379  throw cRuntimeError("Unknown CRC mode");
380  }
381 }

Referenced by inet::Icmpv6ProtocolDissector::dissect(), and processICMPv6Message().

Member Data Documentation

◆ crcMode

CrcMode inet::Icmpv6::crcMode = CRC_MODE_UNDEFINED
protected

Referenced by initialize(), and insertCrc().

◆ pingMap

PingMap inet::Icmpv6::pingMap
protected

◆ transportProtocols

std::set<int> inet::Icmpv6::transportProtocols
protected

Referenced by handleRegisterProtocol().


The documentation for this class was generated from the following files:
inet::Icmpv6::createDestUnreachableMsg
virtual Packet * createDestUnreachableMsg(Icmpv6DestUnav code)
Definition: Icmpv6.cc:252
inet::Icmpv6::crcMode
CrcMode crcMode
Definition: Icmpv6.h:96
inet::Icmpv6::insertCrc
static void insertCrc(CrcMode crcMode, const Ptr< Icmpv6Header > &icmpHeader, Packet *packet)
Definition: Icmpv6.cc:333
inet::Icmpv6ParameterProblem
Icmpv6ParameterProblem
Enum generated from inet/networklayer/icmpv6/Icmpv6Header.msg:73 by opp_msgtool.
Definition: Icmpv6Header_m.h:167
inet::Icmpv6::transportProtocols
std::set< int > transportProtocols
Definition: Icmpv6.h:99
protocol
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
inet::Icmpv6DestUnav
Icmpv6DestUnav
Enum generated from inet/networklayer/icmpv6/Icmpv6Header.msg:50 by opp_msgtool.
Definition: Icmpv6Header_m.h:122
inet::Icmpv6::errorOut
virtual void errorOut(const Ptr< const Icmpv6Header > &header)
Definition: Icmpv6.cc:314
inet::Icmpv6::processEchoReply
virtual void processEchoReply(Packet *packet, const Ptr< const Icmpv6EchoReplyMsg > &header)
Forward the ping reply to the "pingOut" of this module.
Definition: Icmpv6.cc:179
inet::INCORRECTLY_RECEIVED
@ INCORRECTLY_RECEIVED
Definition: Simsignals_m.h:71
inet::Protocol::ipv6
static const Protocol ipv6
Definition: Protocol.h:94
inet::sctp::min
double min(const double a, const double b)
Returns the minimum of a and b.
Definition: SctpAssociation.h:261
inet::getContainingNode
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
inet::IP_PROT_IPv6_ICMP
@ IP_PROT_IPv6_ICMP
Definition: IpProtocolId_m.h:101
inet::CRC_COMPUTED
@ CRC_COMPUTED
Definition: CrcMode_m.h:59
inet::Chunk::serialize
static void serialize(MemoryOutputStream &stream, const Ptr< const Chunk > &chunk, b offset=b(0), b length=b(-1))
Serializes a chunk into the given stream.
Definition: Chunk.cc:175
DispatchProtocolReq
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
L3AddressInd
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
inet::Icmpv6::validateDatagramPromptingError
virtual bool validateDatagramPromptingError(Packet *packet)
Validate the received Ipv6 datagram before responding with error message.
Definition: Icmpv6.cc:294
inet::parseCrcMode
CrcMode parseCrcMode(const char *crcModeString, bool allowDisable)
Definition: CrcMode.cc:14
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
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::ICMPv6_PARAMETER_PROBLEM
@ ICMPv6_PARAMETER_PROBLEM
Definition: Icmpv6Header_m.h:88
inet::Icmpv6::sendToIP
virtual void sendToIP(Packet *msg, const Ipv6Address &dest)
Definition: Icmpv6.cc:239
inet::Icmpv6::processICMPv6Message
virtual void processICMPv6Message(Packet *packet)
Definition: Icmpv6.cc:60
inet::ICMPv6_TIME_EXCEEDED
@ ICMPv6_TIME_EXCEEDED
Definition: Icmpv6Header_m.h:87
type
removed type
Definition: IUdp-gates.txt:7
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::ProtocolGroup::findProtocolNumber
int findProtocolNumber(const Protocol *protocol) const
Definition: ProtocolGroup.cc:40
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::Chunk::PF_ALLOW_INCORRECT
@ PF_ALLOW_INCORRECT
Definition: Chunk.h:281
inet::SP_INDICATION
@ SP_INDICATION
Definition: ProtocolTag_m.h:175
inet::Ipv6Address::LOOPBACK_ADDRESS
static const Ipv6Address LOOPBACK_ADDRESS
The loopback address.
Definition: Ipv6Address.h:57
inet::Icmpv6TimeEx
Icmpv6TimeEx
Enum generated from inet/networklayer/icmpv6/Icmpv6Header.msg:63 by opp_msgtool.
Definition: Icmpv6Header_m.h:145
inet::TcpIpChecksum::checksum
static uint16_t checksum(const void *addr, unsigned int count)
Definition: TcpIpChecksum.h:33
inet::CRC_DECLARED_CORRECT
@ CRC_DECLARED_CORRECT
Definition: CrcMode_m.h:57
inet::Protocol::icmpv6
static const Protocol icmpv6
Definition: Protocol.h:72
inet::Icmpv6::createParamProblemMsg
virtual Packet * createParamProblemMsg(Icmpv6ParameterProblem code)
Definition: Icmpv6.cc:283
inet::CRC_DECLARED_INCORRECT
@ CRC_DECLARED_INCORRECT
Definition: CrcMode_m.h:58
inet::NodeStatus::UP
@ UP
Definition: NodeStatus.h:28
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
IPv6_MIN_MTU
#define IPv6_MIN_MTU
Definition: Ipv6InterfaceData.h:31
inet::ProtocolGroup::ipprotocol
static ProtocolGroup ipprotocol
Definition: ProtocolGroup.h:42
inet::ICMPv6_PACKET_TOO_BIG
@ ICMPv6_PACKET_TOO_BIG
Definition: Icmpv6Header_m.h:86
inet::Icmpv6::createPacketTooBigMsg
virtual Packet * createPacketTooBigMsg(int mtu)
Definition: Icmpv6.cc:262
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::Icmpv6::processEchoRequest
virtual void processEchoRequest(Packet *packet, const Ptr< const Icmpv6EchoRequestMsg > &header)
Respond to the machine that tried to ping us.
Definition: Icmpv6.cc:147
inet::ICMPv6_DESTINATION_UNREACHABLE
@ ICMPv6_DESTINATION_UNREACHABLE
Definition: Icmpv6Header_m.h:85
inet::Icmpv6::createTimeExceededMsg
virtual Packet * createTimeExceededMsg(Icmpv6TimeEx code)
Definition: Icmpv6.cc:273
inet::INITSTAGE_NETWORK_LAYER_PROTOCOLS
INET_API InitStage INITSTAGE_NETWORK_LAYER_PROTOCOLS
Initialization of network layer protocols over IP.
inet::Icmpv6::verifyCrc
static bool verifyCrc(const Packet *packet)
Definition: Icmpv6.cc:361