Don't flood multicasts if no route found

This commit is contained in:
Craig Dowell
2007-09-04 15:10:47 -07:00
parent 65c0b60e5f
commit f652969936
3 changed files with 48 additions and 17 deletions

View File

@@ -30,6 +30,7 @@ namespace ns3 {
Ipv4Route::Ipv4Route ()
{}
Ipv4Route::Ipv4Route (Ipv4Route const &route)
: m_dest (route.m_dest),
m_destNetworkMask (route.m_destNetworkMask),
@@ -37,6 +38,13 @@ Ipv4Route::Ipv4Route (Ipv4Route const &route)
m_interface (route.m_interface)
{}
Ipv4Route::Ipv4Route (Ipv4Route const *route)
: m_dest (route->m_dest),
m_destNetworkMask (route->m_destNetworkMask),
m_gateway (route->m_gateway),
m_interface (route->m_interface)
{}
Ipv4Route::Ipv4Route (Ipv4Address dest,
Ipv4Address gateway,
uint32_t interface)
@@ -236,6 +244,15 @@ Ipv4MulticastRoute::Ipv4MulticastRoute (Ipv4MulticastRoute const &route)
{
}
Ipv4MulticastRoute::Ipv4MulticastRoute (Ipv4MulticastRoute const *route)
:
m_origin (route->m_origin),
m_group (route->m_group),
m_inputInterface (route->m_inputInterface),
m_outputInterfaces (route->m_outputInterfaces)
{
}
Ipv4MulticastRoute::Ipv4MulticastRoute (
Ipv4Address origin,
Ipv4Address group,

View File

@@ -37,12 +37,19 @@ public:
* \brief This constructor does nothing
*/
Ipv4Route ();
/**
* \brief Copy Constructor
* \param route The route to copy
*/
Ipv4Route (Ipv4Route const &route);
/**
* \brief Copy Constructor
* \param route The route to copy
*/
Ipv4Route (Ipv4Route const *route);
bool IsHost (void) const;
/**
* \return The IPv4 address of the destination of this route
@@ -108,12 +115,19 @@ public:
* \brief This constructor does nothing
*/
Ipv4MulticastRoute ();
/**
* \brief Copy Constructor
* \param route The route to copy
*/
Ipv4MulticastRoute (Ipv4MulticastRoute const &route);
/**
* \brief Copy Constructor
* \param route The route to copy
*/
Ipv4MulticastRoute (Ipv4MulticastRoute const *route);
/**
* \return The IPv4 address of the source of this route
*/