src/internet/model/ipv4-l3-protocol.h
changeset 10670 d04c750525d7
parent 10566 9594a4df3bde
child 10707 bc08a6c3350b
--- a/src/internet/model/ipv4-l3-protocol.h	Mon Mar 17 19:43:11 2014 +0100
+++ b/src/internet/model/ipv4-l3-protocol.h	Mon Mar 17 19:44:36 2014 +0100
@@ -225,6 +225,18 @@
 
   Ptr<NetDevice> GetNetDevice (uint32_t i);
 
+  /**
+   * \brief Check if an IPv4 address is unicast according to the node.
+   *
+   * This function checks all the node's interfaces and the respective subnet masks.
+   * An address is considered unicast if it's not broadcast, subnet-broadcast or multicast.
+   *
+   * \param ad address
+   *
+   * \return true if the address is unicast
+   */
+  bool IsUnicast (Ipv4Address ad) const;
+
 protected:
 
   virtual void DoDispose (void);