Ipv4::ifIndex -> Ipv4::interface
This commit is contained in:
@@ -41,7 +41,7 @@ Ipv4::~Ipv4 ()
|
||||
{}
|
||||
|
||||
uint32_t
|
||||
Ipv4::GetIfIndexByAddress (Ipv4Address addr, Ipv4Mask mask)
|
||||
Ipv4::GetInterfaceByAddress (Ipv4Address addr, Ipv4Mask mask)
|
||||
{
|
||||
for (uint32_t i = 0; i < GetNInterfaces (); i++)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ Ipv4::GetIfIndexByAddress (Ipv4Address addr, Ipv4Mask mask)
|
||||
}
|
||||
}
|
||||
// Mapping not found
|
||||
NS_ASSERT_MSG (false, "Ipv4::GetIfIndexByAddress failed");
|
||||
NS_ASSERT_MSG (false, "Ipv4::GetInterfaceByAddress failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
/**
|
||||
* \brief Request that a packet be routed.
|
||||
*
|
||||
* \param ifIndex The interface index on which the packet was received.
|
||||
* \param interface The interface index on which the packet was received.
|
||||
* \param ipHeader IP header of the packet
|
||||
* \param packet packet that is being sent or forwarded
|
||||
* \param routeReply callback that will receive the route reply
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
* destination will be serviced by cloning the packet and calling the
|
||||
* route reply callback once for each outgoing interface in the route.
|
||||
*/
|
||||
virtual bool RequestRoute (uint32_t ifIndex,
|
||||
virtual bool RequestRoute (uint32_t interface,
|
||||
const Ipv4Header &ipHeader,
|
||||
Ptr<Packet> packet,
|
||||
RouteReplyCallback routeReply) = 0;
|
||||
@@ -134,12 +134,12 @@ public:
|
||||
* that includeds multiple output interfaces, that route cannot be used.
|
||||
*
|
||||
* If there are multiple paths out of the node, the resolution is performed
|
||||
* by Ipv4L3Protocol::GetIfIndexforDestination which has access to more
|
||||
* by Ipv4L3Protocol::GetInterfaceforDestination which has access to more
|
||||
* contextual information that is useful for making a determination.
|
||||
*
|
||||
* \param destination The Ipv4Address if the destination of a hypothetical
|
||||
* packet. This may be a multicast group address.
|
||||
* \param ifIndex A reference to the interface index over which a packet
|
||||
* \param interface A reference to the interface index over which a packet
|
||||
* sent to this destination would be sent.
|
||||
* \return Returns true if a route is found to the destination that involves
|
||||
* a single output interface index, otherwise false.
|
||||
@@ -148,10 +148,10 @@ public:
|
||||
* \see Ipv4RoutingProtocol
|
||||
* \see Ipv4L3Protocol
|
||||
*/
|
||||
virtual bool RequestIfIndex (Ipv4Address destination,
|
||||
uint32_t& ifIndex) = 0;
|
||||
virtual bool RequestInterface (Ipv4Address destination,
|
||||
uint32_t& interface) = 0;
|
||||
|
||||
static const uint32_t IF_INDEX_ANY = 0xffffffff;
|
||||
static const uint32_t INTERFACE_ANY = 0xffffffff;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -447,12 +447,12 @@ public:
|
||||
|
||||
/**
|
||||
* \param dest The IP address of a hypothetical destination.
|
||||
* \param ifIndex filled in with the interface index that will be used to
|
||||
* \param interface filled in with the interface index that will be used to
|
||||
* send a packet to the hypothetical destination.
|
||||
* \returns true if a single interface can be identified, false otherwise.
|
||||
*/
|
||||
virtual bool GetIfIndexForDestination (Ipv4Address dest,
|
||||
uint32_t &ifIndex) const = 0;
|
||||
virtual bool GetInterfaceForDestination (Ipv4Address dest,
|
||||
uint32_t &interface) const = 0;
|
||||
|
||||
/**
|
||||
* \param i index of ipv4 interface
|
||||
@@ -485,14 +485,14 @@ public:
|
||||
virtual void SetDown (uint32_t i) = 0;
|
||||
|
||||
/**
|
||||
* \brief Convenience function to return the ifIndex corresponding
|
||||
* \brief Convenience function to return the interface corresponding
|
||||
* to the Ipv4Address provided
|
||||
*
|
||||
* \param addr Ipv4Address
|
||||
* \param mask corresponding Ipv4Mask
|
||||
* \returns ifIndex corresponding to a/amask
|
||||
* \returns interface corresponding to a/amask
|
||||
*/
|
||||
virtual uint32_t GetIfIndexByAddress (Ipv4Address addr,
|
||||
virtual uint32_t GetInterfaceByAddress (Ipv4Address addr,
|
||||
Ipv4Mask mask = Ipv4Mask("255.255.255.255"));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user