25 #include "ns3/integer.h"
39 .SetGroupName (
"Internet")
40 .AddAttribute (
"ProtocolNumber",
"The IP protocol number.",
44 MakeIntegerChecker<int> (0,255))
56 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
58 const uint8_t payload[8])
60 NS_LOG_FUNCTION (
this << icmpSource <<
static_cast<uint32_t
> (icmpTtl) <<
static_cast<uint32_t
> (icmpType) <<
static_cast<uint32_t
> (icmpCode) << icmpInfo << payloadSource << payloadDestination << payload);
64 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
66 const uint8_t payload[8])
68 NS_LOG_FUNCTION (
this << icmpSource <<
static_cast<uint32_t
> (icmpTtl) <<
static_cast<uint32_t
> (icmpType) <<
static_cast<uint32_t
> (icmpCode) << 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.
static TypeId GetTypeId(void)
Get the type ID.
virtual int GetProtocolNumber(void) const =0
Returns the protocol number of this protocol.
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.