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.
Hold a signed integer type.
A low-level Socket API based loosely on the BSD Socket API.
virtual void SetIpTtl(uint8_t ipTtl)
Manually set IP Time to Live field.
virtual uint8_t GetIpTtl(void) const
Query the value of IP Time to Live field of this socket.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void SetIpMulticastIf(int32_t ipIf)=0
Set the IP multicast interface.
virtual uint8_t GetIpMulticastTtl(void) const =0
Get the IP multicast TTL.
virtual bool GetIpMulticastLoop(void) const =0
Get the IP multicast loop capability.
virtual int32_t GetIpMulticastIf(void) const =0
Get the IP multicast interface.
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 void SetIpMulticastLoop(bool loop)=0
Set the IP multicast loop capability.
virtual bool GetMtuDiscover(void) const =0
Get the MTU discover capability.
static TypeId GetTypeId(void)
Get the type ID.
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
virtual void SetIpMulticastTtl(uint8_t ipTtl)=0
Set the IP multicast TTL.
Hold an unsigned integer type.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeUintegerAccessor(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.