25 #include "ns3/integer.h"
40 .SetGroupName(
"Internet")
41 .AddAttribute(
"ProtocolNumber",
42 "The IP protocol number.",
46 MakeIntegerChecker<int>(0, 255));
63 const uint8_t payload[8])
66 <<
static_cast<uint32_t
>(icmpType) <<
static_cast<uint32_t
>(icmpCode)
67 << icmpInfo << payloadSource << payloadDestination << payload);
78 const uint8_t payload[8])
81 <<
static_cast<uint32_t
>(icmpType) <<
static_cast<uint32_t
>(icmpCode)
82 << icmpInfo << payloadSource << payloadDestination << payload);
Hold a signed integer type.
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.
virtual int GetProtocolNumber() const =0
Returns the protocol number of this protocol.
static TypeId GetTypeId()
Get the type ID.
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
@ ATTR_GET
The attribute can be read.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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 an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.