21 #include "ns3/object.h" 23 #include "ns3/uinteger.h" 24 #include "ns3/integer.h" 25 #include "ns3/boolean.h" 26 #include "ns3/trace-source-accessor.h" 40 .SetGroupName (
"Internet")
41 .AddAttribute (
"RcvBufSize",
42 "UdpSocket maximum receive buffer size (bytes)",
46 MakeUintegerChecker<uint32_t> ())
47 .AddAttribute (
"IpTtl",
48 "socket-specific TTL for unicast IP packets (if non-zero)",
52 MakeUintegerChecker<uint8_t> ())
53 .AddAttribute (
"IpMulticastTtl",
54 "socket-specific TTL for multicast IP packets (if non-zero)",
58 MakeUintegerChecker<uint8_t> ())
59 .AddAttribute (
"IpMulticastIf",
60 "interface index for outgoing multicast on this socket; -1 indicates to use default interface",
64 MakeIntegerChecker<int32_t> ())
65 .AddAttribute (
"IpMulticastLoop",
66 "whether outgoing multicast sent also to loopback interface",
71 .AddAttribute (
"MtuDiscover",
"If enabled, every outgoing ip packet will have the DF flag set.",
AttributeValue implementation for Boolean.
virtual uint8_t GetIpMulticastTtl(void) const =0
Get the IP multicast TTL.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SetIpMulticastTtl(uint8_t ipTtl)=0
Set the IP multicast TTL.
Hold a signed integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
virtual bool GetIpMulticastLoop(void) const =0
Get the IP multicast loop capability.
virtual uint8_t GetIpTtl(void) const
Query the value of IP Time to Live field of this socket.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SetIpMulticastIf(int32_t ipIf)=0
Set the IP multicast interface.
A low-level Socket API based loosely on the BSD Socket API.
Hold an unsigned integer type.
virtual int32_t GetIpMulticastIf(void) const =0
Get the IP multicast interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
virtual void SetRcvBufSize(uint32_t size)=0
Set the receiving buffer size.
virtual uint32_t GetRcvBufSize(void) const =0
Get the receiving buffer size.
virtual bool GetMtuDiscover(void) const =0
Get the MTU discover capability.
virtual void SetIpMulticastLoop(bool loop)=0
Set the IP multicast loop capability.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void SetIpTtl(uint8_t ipTtl)
Manually set IP Time to Live field.