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"
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",
70 MakeBooleanChecker ())
71 .AddAttribute (
"MtuDiscover",
"If enabled, every outgoing ip packet will have the DF flag set.",
75 MakeBooleanChecker ())
virtual uint8_t GetIpTtl(void) const
Query the value of IP Time to Live field of this socket.
virtual uint8_t GetIpMulticastTtl(void) const =0
Get the IP multicast TTL.
NS_LOG_COMPONENT_DEFINE("UdpSocket")
virtual void SetIpMulticastTtl(uint8_t ipTtl)=0
Set the IP multicast TTL.
Hold a signed integer type.
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
virtual bool GetIpMulticastLoop(void) const =0
Get the IP multicast loop capability.
static TypeId GetTypeId(void)
Get the type ID.
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.
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.
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual void SetIpTtl(uint8_t ipTtl)
Manually set IP Time to Live field.