25 #include "ns3/uinteger.h"
39 .AddAttribute (
"ProtocolNumber",
"The Ip protocol number.",
42 MakeUintegerChecker<int> ())
54 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
56 const uint8_t payload[8])
58 NS_LOG_FUNCTION (
this << icmpSource << static_cast<uint32_t> (icmpTtl) << static_cast<uint32_t> (icmpType) << static_cast<uint32_t> (icmpCode) << icmpInfo << payloadSource << payloadDestination << payload);
62 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
64 const uint8_t payload[8])
66 NS_LOG_FUNCTION (
this << icmpSource << static_cast<uint32_t> (icmpTtl) << static_cast<uint32_t> (icmpType) << static_cast<uint32_t> (icmpCode) << icmpInfo << payloadSource << payloadDestination << payload);
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
virtual void ReceiveIcmp(Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource, Ipv4Address payloadDestination, const uint8_t payload[8])
Called from lower-level layers to send the ICMP packet up in the stack.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual int GetProtocolNumber(void) const =0
Hold an unsigned integer type.
static TypeId GetTypeId(void)
Get the type ID.
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
a base class which provides memory management and object aggregation
a unique identifier for an interface.
TypeId SetParent(TypeId tid)