22 #include "ns3/assert.h"
39 : m_dest (route.m_dest),
40 m_destNetworkMask (route.m_destNetworkMask),
41 m_gateway (route.m_gateway),
42 m_interface (route.m_interface)
48 : m_dest (route->m_dest),
49 m_destNetworkMask (route->m_destNetworkMask),
50 m_gateway (route->m_gateway),
51 m_interface (route->m_interface)
60 m_destNetworkMask (
Ipv4Mask::GetOnes ()),
62 m_interface (interface)
68 m_destNetworkMask (
Ipv4Mask::GetOnes ()),
70 m_interface (interface)
78 m_destNetworkMask (networkMask),
80 m_interface (interface)
82 NS_LOG_FUNCTION (
this << network << networkMask << gateway << interface);
88 m_destNetworkMask (networkMask),
90 m_interface (interface)
225 os <<
"host="<< route.
GetDest () <<
231 os <<
"host="<< route.
GetDest () <<
277 m_origin (route.m_origin),
278 m_group (route.m_group),
279 m_inputInterface (route.m_inputInterface),
280 m_outputInterfaces (route.m_outputInterfaces)
287 m_origin (route->m_origin),
288 m_group (route->m_group),
289 m_inputInterface (route->m_inputInterface),
290 m_outputInterfaces (route->m_outputInterfaces)
298 uint32_t inputInterface,
299 std::vector<uint32_t> outputInterfaces)
301 NS_LOG_FUNCTION (
this << origin << group << inputInterface << &outputInterfaces);
341 "Ipv4MulticastRoutingTableEntry::GetOutputInterface (): index out of bounds");
346 std::vector<uint32_t>
356 uint32_t inputInterface,
357 std::vector<uint32_t> outputInterfaces)
359 NS_LOG_FUNCTION (origin << group << inputInterface << outputInterfaces);
369 ", output interfaces=";
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetZero(void)
a class to represent an Ipv4 address mask
static Ipv4Mask GetZero(void)
static Ipv4Mask GetOnes(void)
A record of an IPv4 multicast route for Ipv4GlobalRouting and Ipv4StaticRouting.
Ipv4Address GetGroup(void) const
Ipv4Address m_origin
source address
std::vector< uint32_t > m_outputInterfaces
output interfaces
std::vector< uint32_t > GetOutputInterfaces(void) const
Ipv4Address m_group
destination address
uint32_t GetOutputInterface(uint32_t n) const
Ipv4Address GetOrigin(void) const
uint32_t GetInputInterface(void) const
Ipv4MulticastRoutingTableEntry()
This constructor does nothing.
static Ipv4MulticastRoutingTableEntry CreateMulticastRoute(Ipv4Address origin, Ipv4Address group, uint32_t inputInterface, std::vector< uint32_t > outputInterfaces)
uint32_t m_inputInterface
input interface
uint32_t GetNOutputInterfaces(void) const
A record of an IPv4 routing table entry for Ipv4GlobalRouting and Ipv4StaticRouting.
static Ipv4RoutingTableEntry CreateDefaultRoute(Ipv4Address nextHop, uint32_t interface)
Ipv4Address m_dest
destination address
Ipv4RoutingTableEntry()
This constructor does nothing.
uint32_t m_interface
output interface
bool IsNetwork(void) const
bool IsDefault(void) const
uint32_t GetInterface(void) const
bool IsGateway(void) const
Ipv4Mask m_destNetworkMask
destination network mask
Ipv4Address GetDestNetwork(void) const
Ipv4Address GetDest(void) const
Ipv4Mask GetDestNetworkMask(void) const
Ipv4Address m_gateway
gateway
static Ipv4RoutingTableEntry CreateNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface)
static Ipv4RoutingTableEntry CreateHostRouteTo(Ipv4Address dest, Ipv4Address nextHop, uint32_t interface)
Ipv4Address GetGateway(void) const
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#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 ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
std::ostream & operator<<(std::ostream &os, const Angles &a)