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

Icmp module. More...

#include <Icmp.h>

Inheritance diagram for inet::Icmp:
inet::DefaultProtocolRegistrationListener inet::IProtocolRegistrationListener

Public Member Functions

virtual void sendErrorMessage (Packet *packet, int inputInterfaceId, IcmpType type, IcmpCode code)
 This method can be called from other modules to send an ICMP error packet in response to a received bogus packet. More...
 
virtual void sendPtbMessage (Packet *packet, int mtu)
 
void insertCrc (const Ptr< IcmpHeader > &icmpHeader, Packet *payload)
 
bool verifyCrc (const Packet *packet)
 
- 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 void insertCrc (CrcMode crcMode, const Ptr< IcmpHeader > &icmpHeader, Packet *payload)
 

Protected Member Functions

virtual void processIcmpMessage (Packet *)
 
virtual void errorOut (Packet *)
 
virtual void processEchoRequest (Packet *)
 
virtual void sendToIP (Packet *, const Ipv4Address &dest)
 
virtual void sendToIP (Packet *msg)
 
virtual bool possiblyLocalBroadcast (const Ipv4Address &addr, int interfaceId)
 
virtual void handleRegisterService (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual void handleRegisterProtocol (const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive) override
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *msg) override
 
virtual void handleParameterChange (const char *name) override
 
virtual void parseQuoteLengthParameter ()
 
virtual bool maySendErrorMessage (Packet *packet, int inputInterfaceId)
 
virtual void sendOrProcessIcmpPacket (Packet *packet, Ipv4Address origSrcAddr)
 

Protected Attributes

std::set< int > transportProtocols
 
CrcMode crcMode = CRC_MODE_UNDEFINED
 
B quoteLength
 
ModuleRefByPar< IIpv4RoutingTablert
 
ModuleRefByPar< IInterfaceTableift
 

Static Protected Attributes

static long ctr = 0
 

Detailed Description

Icmp module.

Member Function Documentation

◆ errorOut()

void inet::Icmp::errorOut ( Packet packet)
protectedvirtual
292 {
293  delete packet;
294 }

Referenced by processIcmpMessage().

◆ handleMessage()

void inet::Icmp::handleMessage ( cMessage *  msg)
overrideprotectedvirtual
68 {
69  cGate *arrivalGate = msg->getArrivalGate();
70 
71  // process arriving ICMP message
72  if (arrivalGate->isName("ipIn")) {
73  EV_INFO << "Received " << msg << " from network protocol.\n";
74  processIcmpMessage(check_and_cast<Packet *>(msg));
75  return;
76  }
77  else
78  throw cRuntimeError("Message %s(%s) arrived in unknown '%s' gate", msg->getName(), msg->getClassName(), msg->getArrivalGate()->getName());
79 }

◆ handleParameterChange()

void inet::Icmp::handleParameterChange ( const char *  name)
overrideprotectedvirtual
35 {
36  if (name == nullptr)
37  ;
38  else if (!strcmp(name, "crcMode"))
39  crcMode = parseCrcMode(par("crcMode"), false);
40  else if (!strcmp(name, "quoteLength"))
42 }

◆ handleRegisterProtocol()

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

Reimplemented from inet::DefaultProtocolRegistrationListener.

342 {
343  Enter_Method("handleRegisterProtocol");
344  if (!strcmp("transportOut", gate->getBaseName())) {
346  if (protocolNumber != -1)
347  transportProtocols.insert(protocolNumber);
348  }
349 }

◆ handleRegisterService()

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

Reimplemented from inet::DefaultProtocolRegistrationListener.

337 {
338  Enter_Method("handleRegisterService");
339 }

◆ initialize()

void inet::Icmp::initialize ( int  stage)
overrideprotectedvirtual
52 {
53  cSimpleModule::initialize(stage);
54 
55  if (stage == INITSTAGE_LOCAL) {
56  ift.reference(this, "interfaceTableModule", true);
57  rt.reference(this, "routingTableModule", true);
58  crcMode = parseCrcMode(par("crcMode"), false);
60  }
61  if (stage == INITSTAGE_NETWORK_LAYER_PROTOCOLS) {
62  registerService(Protocol::icmpv4, gate("transportIn"), gate("transportOut"));
63  registerProtocol(Protocol::icmpv4, gate("ipOut"), gate("ipIn"));
64  }
65 }

◆ insertCrc() [1/2]

void inet::Icmp::insertCrc ( const Ptr< IcmpHeader > &  icmpHeader,
Packet payload 
)
inline
57 { insertCrc(crcMode, icmpHeader, payload); }

Referenced by insertCrc().

◆ insertCrc() [2/2]

void inet::Icmp::insertCrc ( CrcMode  crcMode,
const Ptr< IcmpHeader > &  icmpHeader,
Packet payload 
)
static
352 {
353  icmpHeader->setCrcMode(crcMode);
354  switch (crcMode) {
356  // if the CRC mode is declared to be correct, then set the CRC to an easily recognizable value
357  icmpHeader->setChksum(0xC00D);
358  break;
360  // if the CRC mode is declared to be incorrect, then set the CRC to an easily recognizable value
361  icmpHeader->setChksum(0xBAAD);
362  break;
363  case CRC_COMPUTED: {
364  // if the CRC mode is computed, then compute the CRC and set it
365  icmpHeader->setChksum(0x0000); // make sure that the CRC is 0 in the header before computing the CRC
366  MemoryOutputStream icmpStream;
367  Chunk::serialize(icmpStream, icmpHeader);
368  if (packet->getByteLength() > 0)
369  Chunk::serialize(icmpStream, packet->peekDataAsBytes());
370  uint16_t crc = TcpIpChecksum::checksum(icmpStream.getData());
371  icmpHeader->setChksum(crc);
372  break;
373  }
374  default:
375  throw cRuntimeError("Unknown CRC mode");
376  }
377 }

Referenced by processEchoRequest(), sendErrorMessage(), inet::PingApp::sendPingRequest(), and sendPtbMessage().

◆ maySendErrorMessage()

bool inet::Icmp::maySendErrorMessage ( Packet packet,
int  inputInterfaceId 
)
protectedvirtual
82 {
83  const auto& ipv4Header = packet->peekAtFront<Ipv4Header>();
84  Ipv4Address origSrcAddr = ipv4Header->getSrcAddress();
85  Ipv4Address origDestAddr = ipv4Header->getDestAddress();
86 
87  // don't send ICMP error messages in response to broadcast or multicast messages
88  if (origDestAddr.isMulticast() || origDestAddr.isLimitedBroadcastAddress() || possiblyLocalBroadcast(origDestAddr, inputInterfaceId)) {
89  EV_DETAIL << "won't send ICMP error messages for broadcast/multicast message " << ipv4Header << endl;
90  return false;
91  }
92 
93  // don't send ICMP error messages response to unspecified, broadcast or multicast addresses
94  if ((inputInterfaceId != -1 && origSrcAddr.isUnspecified())
95  || origSrcAddr.isMulticast()
96  || origSrcAddr.isLimitedBroadcastAddress()
97  || possiblyLocalBroadcast(origSrcAddr, inputInterfaceId)) {
98  EV_DETAIL << "won't send ICMP error messages to broadcast/multicast address, message " << ipv4Header << endl;
99  return false;
100  }
101 
102  // ICMP messages are only sent about errors in handling fragment zero of fragmented datagrams
103  if (ipv4Header->getFragmentOffset() != 0) {
104  EV_DETAIL << "won't send ICMP error messages about errors in non-first fragments" << endl;
105  return false;
106  }
107 
108  // do not reply with error message to error message
109  if (ipv4Header->getProtocolId() == IP_PROT_ICMP) {
110  const auto& recICMPMsg = packet->peekDataAt<IcmpHeader>(B(ipv4Header->getHeaderLength()));
111  if (!isIcmpInfoType(recICMPMsg->getType())) {
112  EV_DETAIL << "ICMP error received -- do not reply to it" << endl;
113  return false;
114  }
115  }
116 
117  return true;
118 }

Referenced by sendErrorMessage(), and sendPtbMessage().

◆ numInitStages()

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

◆ parseQuoteLengthParameter()

void inet::Icmp::parseQuoteLengthParameter ( )
protectedvirtual
45 {
46  quoteLength = B(par("quoteLength"));
47  if (quoteLength < B(8))
48  throw cRuntimeError("The quoteLength must be 8 bytes or larger");
49 }

Referenced by handleParameterChange(), and initialize().

◆ possiblyLocalBroadcast()

bool inet::Icmp::possiblyLocalBroadcast ( const Ipv4Address addr,
int  interfaceId 
)
protectedvirtual
196 {
197  if ((addr.getInt() & 1) == 0)
198  return false;
199 
200  if (rt->isLocalBroadcastAddress(addr))
201  return true;
202 
203  // if the input interface is unconfigured, we won't recognize network-directed broadcasts because we don't what network we are on
204  if (interfaceId != -1) {
205  NetworkInterface *ie = ift->getInterfaceById(interfaceId);
206  auto ipv4Data = ie->findProtocolData<Ipv4InterfaceData>();
207  bool interfaceUnconfigured = (ipv4Data == nullptr) || ipv4Data->getIPAddress().isUnspecified();
208  return interfaceUnconfigured;
209  }
210  else {
211  // if all interfaces are configured, we are OK
212  bool allInterfacesConfigured = true;
213  for (int i = 0; i < ift->getNumInterfaces(); i++) {
214  auto ipv4Data = ift->getInterface(i)->findProtocolData<Ipv4InterfaceData>();
215  if ((ipv4Data == nullptr) || ipv4Data->getIPAddress().isUnspecified())
216  allInterfacesConfigured = false;
217  }
218 
219  return !allInterfacesConfigured;
220  }
221 }

Referenced by maySendErrorMessage().

◆ processEchoRequest()

void inet::Icmp::processEchoRequest ( Packet request)
protectedvirtual
297 {
298  // turn request into a reply
299  const auto& icmpReq = request->popAtFront<IcmpEchoRequest>();
300  Packet *reply = new Packet((std::string(request->getName()) + "-reply").c_str());
301  const auto& icmpReply = makeShared<IcmpEchoReply>();
302  icmpReply->setIdentifier(icmpReq->getIdentifier());
303  icmpReply->setSeqNumber(icmpReq->getSeqNumber());
304  auto addressInd = request->getTag<L3AddressInd>();
305  Ipv4Address src = addressInd->getSrcAddress().toIpv4();
306  Ipv4Address dest = addressInd->getDestAddress().toIpv4();
307  reply->insertAtBack(request->peekData());
308  insertCrc(icmpReply, reply);
309  reply->insertAtFront(icmpReply);
310 
311  // swap src and dest
312  // TODO check what to do if dest was multicast etc?
313  // A. Ariza Modification 5/1/2011 clean the interface id, this forces the use of routing table in the Ipv4 layer
314  auto addressReq = reply->addTag<L3AddressReq>();
315  addressReq->setSrcAddress(addressInd->getDestAddress().toIpv4());
316  addressReq->setDestAddress(addressInd->getSrcAddress().toIpv4());
317 
318  sendToIP(reply);
319  delete request;
320 }

Referenced by processIcmpMessage().

◆ processIcmpMessage()

void inet::Icmp::processIcmpMessage ( Packet packet)
protectedvirtual
224 {
225  if (!verifyCrc(packet)) {
226  EV_WARN << "incoming ICMP packet has wrong CRC, dropped\n";
227  // drop packet
228  PacketDropDetails details;
229  details.setReason(INCORRECTLY_RECEIVED);
230  emit(packetDroppedSignal, packet, &details);
231  delete packet;
232  return;
233  }
234 
235  const auto& icmpmsg = packet->peekAtFront<IcmpHeader>();
236  switch (icmpmsg->getType()) {
237  case ICMP_REDIRECT:
238  // TODO implement redirect handling
239  EV_ERROR << "ICMP_REDIRECT not implemented yet, packet " << EV_FORMAT_OBJECT(packet) << " dropped.\n";
240  delete packet;
241  break;
242 
244  case ICMP_TIME_EXCEEDED:
245  case ICMP_PARAMETER_PROBLEM: {
246  // ICMP errors are delivered to the appropriate higher layer protocol
247  const auto& bogusL3Packet = packet->peekDataAt<Ipv4Header>(icmpmsg->getChunkLength());
248  int transportProtocol = bogusL3Packet->getProtocolId();
249  if (transportProtocol == IP_PROT_ICMP) {
250  // received ICMP error answer to an ICMP packet:
251  // FIXME should send up dest unreachable answers to pingapps
252  errorOut(packet);
253  }
254  else {
255  if (!contains(transportProtocols, transportProtocol)) {
256  EV_ERROR << "Transport protocol " << transportProtocol << " not registered, packet dropped\n";
257  delete packet;
258  }
259  else {
260  auto dispatchProtocolReq = packet->addTagIfAbsent<DispatchProtocolReq>();
261  dispatchProtocolReq->setServicePrimitive(SP_INDICATION);
262  dispatchProtocolReq->setProtocol(ProtocolGroup::ipprotocol.getProtocol(transportProtocol));
263  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::icmpv4);
264  send(packet, "transportOut");
265  }
266  }
267  break;
268  }
269 
270  case ICMP_ECHO_REQUEST:
271  processEchoRequest(packet);
272  break;
273 
274  case ICMP_ECHO_REPLY:
275  delete packet;
276  break;
277 
279  processEchoRequest(packet);
280  break;
281 
283  delete packet;
284  break;
285 
286  default:
287  throw cRuntimeError("Unknown ICMP type %d", icmpmsg->getType());
288  }
289 }

Referenced by handleMessage(), and sendOrProcessIcmpPacket().

◆ sendErrorMessage()

void inet::Icmp::sendErrorMessage ( Packet packet,
int  inputInterfaceId,
IcmpType  type,
IcmpCode  code 
)
virtual

This method can be called from other modules to send an ICMP error packet in response to a received bogus packet.

It will not send ICMP error in response to broadcast or multicast packets – in that case it will simply delete the packet. KLUDGE if inputInterfaceId cannot be determined, pass in -1.

167 {
168  Enter_Method("sendErrorMessage(datagram, type=%d, code=%d)", type, code);
169 
170  if (maySendErrorMessage(packet, inputInterfaceId)) {
171  // assemble a message name
172  char msgname[80];
173  sprintf(msgname, "ICMP-error-#%ld-type%d-code%d", ++ctr, type, code);
174 
175  // debugging information
176  EV_DETAIL << "sending ICMP error " << msgname << endl;
177 
178  // create and send ICMP packet
179  Packet *errorPacket = new Packet(msgname);
180  const auto& icmpHeader = makeShared<IcmpHeader>();
181  icmpHeader->setType(type);
182  icmpHeader->setCode(code);
183  // ICMP message length: the internet header plus the first quoteLength bytes of
184  // the original datagram's data is returned to the sender.
185  const auto& ipv4Header = packet->peekAtFront<Ipv4Header>();
186  B curQuoteLength = std::min(B(packet->getDataLength()), ipv4Header->getHeaderLength() + quoteLength);
187  errorPacket->insertAtBack(packet->peekDataAt(B(0), curQuoteLength));
188  insertCrc(icmpHeader, errorPacket);
189  errorPacket->insertAtFront(icmpHeader);
190 
191  sendOrProcessIcmpPacket(errorPacket, ipv4Header->getSrcAddress());
192  }
193 }

Referenced by inet::Ipv4FragBuf::purgeStaleFragments().

◆ sendOrProcessIcmpPacket()

void inet::Icmp::sendOrProcessIcmpPacket ( Packet packet,
Ipv4Address  origSrcAddr 
)
protectedvirtual
121 {
122  packet->addTag<PacketProtocolTag>()->setProtocol(&Protocol::icmpv4);
123 
124  // if srcAddr is not filled in, we're still in the src node, so we just
125  // process the ICMP message locally, right away
126  if (origSrcAddr.isUnspecified()) {
127  // pretend it came from the Ipv4 layer
128  packet->addTag<L3AddressInd>()->setDestAddress(Ipv4Address::LOOPBACK_ADDRESS); // FIXME maybe use configured loopback address
129 
130  // then process it locally
131  processIcmpMessage(packet);
132  }
133  else {
134  sendToIP(packet, origSrcAddr);
135  }
136 }

Referenced by sendErrorMessage(), and sendPtbMessage().

◆ sendPtbMessage()

void inet::Icmp::sendPtbMessage ( Packet packet,
int  mtu 
)
virtual
139 {
140  Enter_Method("sendPtbMessage(datagram, mtu=%d)", mtu);
141 
142  if (maySendErrorMessage(packet, -1)) {
143  // assemble a message name
144  char msgname[80];
145  sprintf(msgname, "ICMP-PTB-#%ld-mtu%d", ++ctr, mtu);
146 
147  // debugging information
148  EV_DETAIL << "sending ICMP PTB " << msgname << endl;
149 
150  // create and send ICMP packet
151  Packet *errorPacket = new Packet(msgname);
152  const auto& icmpPtb = makeShared<IcmpPtb>();
153  icmpPtb->setMtu(mtu);
154  // ICMP message length: the internet header plus the first quoteLength bytes of
155  // the original datagram's data is returned to the sender.
156  const auto& ipv4Header = packet->peekAtFront<Ipv4Header>();
157  B curQuoteLength = std::min(B(packet->getDataLength()), ipv4Header->getHeaderLength() + quoteLength);
158  errorPacket->insertAtBack(packet->peekDataAt(b(0), curQuoteLength));
159  insertCrc(icmpPtb, errorPacket);
160  errorPacket->insertAtFront(icmpPtb);
161 
162  sendOrProcessIcmpPacket(errorPacket, ipv4Header->getSrcAddress());
163  }
164 }

◆ sendToIP() [1/2]

void inet::Icmp::sendToIP ( Packet msg,
const Ipv4Address dest 
)
protectedvirtual
323 {
324  msg->addTagIfAbsent<L3AddressReq>()->setDestAddress(dest);
325  sendToIP(msg);
326 }

Referenced by processEchoRequest(), and sendOrProcessIcmpPacket().

◆ sendToIP() [2/2]

void inet::Icmp::sendToIP ( Packet msg)
protectedvirtual
329 {
330  EV_INFO << "Sending " << msg << " to lower layer.\n";
331  msg->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(&Protocol::ipv4);
332  msg->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::icmpv4);
333  send(msg, "ipOut");
334 }

◆ verifyCrc()

bool inet::Icmp::verifyCrc ( const Packet packet)
380 {
381  const auto& icmpHeader = packet->peekAtFront<IcmpHeader>(b(-1), Chunk::PF_ALLOW_INCORRECT);
382  switch (icmpHeader->getCrcMode()) {
384  // if the CRC mode is declared to be correct, then the check passes if and only if the chunks are correct
385  return icmpHeader->isCorrect();
387  // if the CRC mode is declared to be incorrect, then the check fails
388  return false;
389  case CRC_COMPUTED: {
390  // otherwise compute the CRC, the check passes if the result is 0xFFFF (includes the received CRC)
391  auto dataBytes = packet->peekDataAsBytes(Chunk::PF_ALLOW_INCORRECT);
392  uint16_t crc = TcpIpChecksum::checksum(dataBytes->getBytes());
393  // TODO delete these isCorrect calls, rely on CRC only
394  return crc == 0 && icmpHeader->isCorrect();
395  }
396  default:
397  throw cRuntimeError("Unknown CRC mode");
398  }
399 }

Referenced by processIcmpMessage().

Member Data Documentation

◆ crcMode

CrcMode inet::Icmp::crcMode = CRC_MODE_UNDEFINED
protected

◆ ctr

long inet::Icmp::ctr = 0
staticprotected

Referenced by sendErrorMessage(), and sendPtbMessage().

◆ ift

ModuleRefByPar<IInterfaceTable> inet::Icmp::ift
protected

◆ quoteLength

B inet::Icmp::quoteLength
protected

◆ rt

ModuleRefByPar<IIpv4RoutingTable> inet::Icmp::rt
protected

◆ transportProtocols

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

The documentation for this class was generated from the following files:
inet::Icmp::rt
ModuleRefByPar< IIpv4RoutingTable > rt
Definition: Icmp.h:33
protocol
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
inet::ICMP_DESTINATION_UNREACHABLE
@ ICMP_DESTINATION_UNREACHABLE
Definition: IcmpHeader_m.h:77
inet::INCORRECTLY_RECEIVED
@ INCORRECTLY_RECEIVED
Definition: Simsignals_m.h:71
inet::Protocol::ipv4
static const Protocol ipv4
Definition: Protocol.h:93
inet::ICMP_TIMESTAMP_REQUEST
@ ICMP_TIMESTAMP_REQUEST
Definition: IcmpHeader_m.h:86
inet::IP_PROT_ICMP
@ IP_PROT_ICMP
Definition: IpProtocolId_m.h:91
inet::ICMP_PARAMETER_PROBLEM
@ ICMP_PARAMETER_PROBLEM
Definition: IcmpHeader_m.h:84
inet::Icmp::parseQuoteLengthParameter
virtual void parseQuoteLengthParameter()
Definition: Icmp.cc:44
inet::sctp::min
double min(const double a, const double b)
Returns the minimum of a and b.
Definition: SctpAssociation.h:261
inet::Protocol::icmpv4
static const Protocol icmpv4
Definition: Protocol.h:71
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
inet::Icmp::insertCrc
static void insertCrc(CrcMode crcMode, const Ptr< IcmpHeader > &icmpHeader, Packet *payload)
Definition: Icmp.cc:351
L3AddressInd
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
inet::parseCrcMode
CrcMode parseCrcMode(const char *crcModeString, bool allowDisable)
Definition: CrcMode.cc:14
inet::ICMP_ECHO_REQUEST
@ ICMP_ECHO_REQUEST
Definition: IcmpHeader_m.h:80
inet::ICMP_TIMESTAMP_REPLY
@ ICMP_TIMESTAMP_REPLY
Definition: IcmpHeader_m.h:87
inet::Icmp::quoteLength
B quoteLength
Definition: Icmp.h:32
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::Icmp::possiblyLocalBroadcast
virtual bool possiblyLocalBroadcast(const Ipv4Address &addr, int interfaceId)
Definition: Icmp.cc:195
inet::ICMP_REDIRECT
@ ICMP_REDIRECT
Definition: IcmpHeader_m.h:79
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::ICMP_TIME_EXCEEDED
@ ICMP_TIME_EXCEEDED
Definition: IcmpHeader_m.h:83
inet::Icmp::sendOrProcessIcmpPacket
virtual void sendOrProcessIcmpPacket(Packet *packet, Ipv4Address origSrcAddr)
Definition: Icmp.cc:120
inet::Icmp::verifyCrc
bool verifyCrc(const Packet *packet)
Definition: Icmp.cc:379
inet::Icmp::maySendErrorMessage
virtual bool maySendErrorMessage(Packet *packet, int inputInterfaceId)
Definition: Icmp.cc:81
inet::Icmp::sendToIP
virtual void sendToIP(Packet *, const Ipv4Address &dest)
Definition: Icmp.cc:322
inet::contains
bool contains(const std::vector< T > &v, const Tk &a)
Definition: stlutils.h:65
inet::Icmp::ift
ModuleRefByPar< IInterfaceTable > ift
Definition: Icmp.h:34
type
removed type
Definition: IUdp-gates.txt:7
inet::isIcmpInfoType
bool isIcmpInfoType(int type)
Definition: IcmpHeader_m.h:211
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::Icmp::crcMode
CrcMode crcMode
Definition: Icmp.h:31
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::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::CRC_DECLARED_INCORRECT
@ CRC_DECLARED_INCORRECT
Definition: CrcMode_m.h:58
EV_FORMAT_OBJECT
#define EV_FORMAT_OBJECT(object)
Definition: INETDefs.h:107
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::Ipv4Address::LOOPBACK_ADDRESS
static const Ipv4Address LOOPBACK_ADDRESS
127.0.0.1
Definition: Ipv4Address.h:92
inet::ProtocolGroup::ipprotocol
static ProtocolGroup ipprotocol
Definition: ProtocolGroup.h:42
inet::Icmp::processIcmpMessage
virtual void processIcmpMessage(Packet *)
Definition: Icmp.cc:223
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::Icmp::processEchoRequest
virtual void processEchoRequest(Packet *)
Definition: Icmp.cc:296
inet::INITSTAGE_NETWORK_LAYER_PROTOCOLS
INET_API InitStage INITSTAGE_NETWORK_LAYER_PROTOCOLS
Initialization of network layer protocols over IP.
inet::Icmp::transportProtocols
std::set< int > transportProtocols
Definition: Icmp.h:30
inet::Icmp::errorOut
virtual void errorOut(Packet *)
Definition: Icmp.cc:291
inet::ICMP_ECHO_REPLY
@ ICMP_ECHO_REPLY
Definition: IcmpHeader_m.h:85
inet::Icmp::ctr
static long ctr
Definition: Icmp.h:35