21 #include "ns3/assert.h" 33 : m_dest (route.m_dest),
34 m_destNetworkPrefix (route.m_destNetworkPrefix),
35 m_gateway (route.m_gateway),
36 m_interface (route.m_interface),
37 m_prefixToUse (route.m_prefixToUse)
42 : m_dest (route->m_dest),
43 m_destNetworkPrefix (route->m_destNetworkPrefix),
44 m_gateway (route->m_gateway),
45 m_interface (route->m_interface),
46 m_prefixToUse (route->m_prefixToUse)
54 m_interface (interface),
63 m_interface (interface),
70 m_destNetworkPrefix (networkPrefix),
72 m_interface (interface),
73 m_prefixToUse (prefixToUse)
79 m_destNetworkPrefix (networkPrefix),
81 m_interface (interface),
89 m_destNetworkPrefix (networkPrefix),
91 m_interface (interface),
92 m_prefixToUse (prefixToUse)
98 m_destNetworkPrefix (networkPrefix),
100 m_interface (interface),
217 os <<
"host: "<< route.
GetDest () <<
223 os <<
"host: " << route.
GetDest () <<
255 : m_origin (route.m_origin),
256 m_group (route.m_group),
257 m_inputInterface (route.m_inputInterface),
258 m_outputInterfaces (route.m_outputInterfaces)
263 : m_origin (route->m_origin),
264 m_group (route->m_group),
265 m_inputInterface (route->m_inputInterface),
266 m_outputInterfaces (route->m_outputInterfaces)
273 m_inputInterface (inputInterface),
274 m_outputInterfaces (outputInterfaces)
317 os <<
"origin: " << route.
GetOrigin () <<
320 ", output interfaces: ";
void SetPrefixToUse(Ipv6Address prefix)
Set the prefix to use.
bool IsGateway() const
Is it the gateway ?
Ipv6Address GetGroup() const
Get the group.
Ipv6Address GetPrefixToUse() const
Get the prefix to use (for multihomed link).
static Ipv6RoutingTableEntry CreateNetworkRouteTo(Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface)
Create a route to a network.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
A record of an IPv6 multicast route.
Ipv6RoutingTableEntry()
Constructor.
static Ipv6RoutingTableEntry CreateHostRouteTo(Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address())
Create a route to a host.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
bool IsNetwork() const
Is the route entry correspond to a network ?
Ipv6MulticastRoutingTableEntry()
Constructor.
static Ipv6MulticastRoutingTableEntry CreateMulticastRoute(Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector< uint32_t > outputInterfaces)
Create a multicast route.
uint32_t m_inputInterface
The input interface.
Ipv6Address GetDestNetwork() const
Get the destination network.
Ipv6Address m_prefixToUse
Prefix to use.
Ipv6Address GetOrigin() const
Get the source of this route.
A record of an IPv6 route.
Ipv6Address m_group
The IPv6 address of the group.
Ipv6Prefix m_destNetworkPrefix
IPv6 prefix of the destination.
bool IsEqual(const Ipv6Address &other) const
Comparison operation between two Ipv6Addresses.
Ipv6Address GetDest() const
Get the destination.
bool IsHost() const
Is the route entry correspond to a host ?
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address.
Ipv6Address GetGateway() const
Get the gateway.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
bool IsDefault() const
Is it the default route ?
static Ipv6RoutingTableEntry CreateDefaultRoute(Ipv6Address nextHop, uint32_t interface)
Create a default route.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ipv6Address m_origin
The IPv6 address of the source.
Ipv6Address m_gateway
IPv6 address of the gateway.
uint8_t GetPrefixLength() const
Get prefix length.
bool IsEqual(const Ipv6Prefix &other) const
Comparison operation between two Ipv6Prefix.
Describes an IPv6 address.
static Ipv6Prefix GetOnes()
Get the "all-1" IPv6 mask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).
uint32_t GetInputInterface() const
Get the input interface address.
uint32_t m_interface
The interface index.
virtual ~Ipv6RoutingTableEntry()
Destructor.
Describes an IPv6 prefix.
std::vector< uint32_t > m_outputInterfaces
The output interfaces.
Ipv6Prefix GetDestNetworkPrefix() const
Get the destination prefix.
Ipv6Address m_dest
IPv6 address of the destination.
uint32_t GetNOutputInterfaces() const
Get the number of output interfaces of this route.
uint32_t GetInterface() const
Get the interface index.
uint32_t GetOutputInterface(uint32_t n) const
Get a specified output interface.
std::vector< uint32_t > GetOutputInterfaces() const
Get all of the output interfaces of this route.