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);
#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.
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.
Hold a signed integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual int GetProtocolNumber(void) const =0
Returns the protocol number of this protocol.
The attribute can be read.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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)
Set the parent TypeId.