Merge with ns-3-dev.
This commit is contained in:
@@ -37,6 +37,12 @@ Ipv4::GetTypeId (void)
|
||||
MakeBooleanAccessor (&Ipv4::SetIpForward,
|
||||
&Ipv4::GetIpForward),
|
||||
MakeBooleanChecker ())
|
||||
.AddAttribute ("WeakEsModel",
|
||||
"RFC1122 term for whether host accepts datagram with a dest. address on another interface",
|
||||
BooleanValue (true),
|
||||
MakeBooleanAccessor (&Ipv4::SetWeakEsModel,
|
||||
&Ipv4::GetWeakEsModel),
|
||||
MakeBooleanChecker ())
|
||||
#if 0
|
||||
.AddAttribute ("MtuDiscover", "If enabled, every outgoing ip packet will have the DF flag set.",
|
||||
BooleanValue (false),
|
||||
|
||||
@@ -123,10 +123,32 @@ public:
|
||||
* This method searches the list of interfaces for one that holds a
|
||||
* particular address. This call takes an IP address as a parameter and
|
||||
* returns the interface number of the first interface that has been assigned
|
||||
* that address, or -1 if not found. There must be an exact match.
|
||||
* that address, or -1 if not found. There must be an exact match; this
|
||||
* method will not match broadcast or multicast addresses.
|
||||
*/
|
||||
virtual int32_t GetInterfaceForAddress (Ipv4Address address) const = 0;
|
||||
|
||||
/**
|
||||
* \brief Determine whether address and interface corresponding to
|
||||
* received packet can be accepted for local delivery
|
||||
*
|
||||
* \param address The IP address being considered
|
||||
* \param iif The incoming Ipv4 interface index
|
||||
*
|
||||
* This method can be used to determine whether a received packet has
|
||||
* an acceptable address for local delivery on the host. The address
|
||||
* may be a unicast, multicast, or broadcast address. This method will
|
||||
* return true if address is an exact match of a unicast address on
|
||||
* one of the host's interfaces (see below), if address corresponds to
|
||||
* a multicast group that the host has joined (and the incoming device
|
||||
* is acceptable), or if address corresponds to a broadcast address.
|
||||
*
|
||||
* If the Ipv4 attribute WeakEsModel is true, the unicast address may
|
||||
* match any of the Ipv4 addresses on any interface. If the attribute is
|
||||
* false, the address must match one assigned to the incoming device.
|
||||
*/
|
||||
virtual bool IsDestinationAddress (Ipv4Address address, uint32_t iif) const = 0;
|
||||
|
||||
/**
|
||||
* \brief Return the interface number of first interface found that
|
||||
* has an Ipv4 address within the prefix specified by the input
|
||||
@@ -257,6 +279,8 @@ private:
|
||||
// Indirect the Ipv4 attributes through private pure virtual methods
|
||||
virtual void SetIpForward (bool forward) = 0;
|
||||
virtual bool GetIpForward (void) const = 0;
|
||||
virtual void SetWeakEsModel (bool model) = 0;
|
||||
virtual bool GetWeakEsModel (void) const = 0;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user