Remove m_peer from Ipv4InterfaceAddress class (unused member)
authorTom Henderson <tomh@tomh.org>
Fri, 17 Apr 2009 15:38:53 -0700
changeset 4381 3e6c3e4b55bd
parent 4380 bbbc2e622f50
child 4382 e63da65e8fb9
Remove m_peer from Ipv4InterfaceAddress class (unused member)
src/node/ipv4-interface-address.cc
src/node/ipv4-interface-address.h
--- a/src/node/ipv4-interface-address.cc	Fri Apr 17 15:10:23 2009 -0700
+++ b/src/node/ipv4-interface-address.cc	Fri Apr 17 15:38:53 2009 -0700
@@ -45,7 +45,6 @@
 
 Ipv4InterfaceAddress::Ipv4InterfaceAddress (const Ipv4InterfaceAddress &o)
   : m_local (o.m_local),
-    m_peer (o.m_peer),
     m_mask (o.m_mask),
     m_broadcast (o.m_broadcast),
     m_scope (o.m_scope),
@@ -69,20 +68,6 @@
 }
 
 void 
-Ipv4InterfaceAddress::SetPeer (Ipv4Address peer)
-{
-  NS_LOG_FUNCTION_NOARGS ();
-  m_peer = peer;
-}
-
-Ipv4Address 
-Ipv4InterfaceAddress::GetPeer (void) const
-{
-  NS_LOG_FUNCTION_NOARGS ();
-  return m_peer;
-}
-
-void 
 Ipv4InterfaceAddress::SetMask (Ipv4Mask mask) 
 {
   NS_LOG_FUNCTION_NOARGS ();
@@ -147,7 +132,7 @@
 
 std::ostream& operator<< (std::ostream& os, const Ipv4InterfaceAddress &addr)
 { 
-  os << "m_local=" << addr.GetLocal () << "; m_peer=" << addr.GetPeer () << "; m_mask=" <<
+  os << "m_local=" << addr.GetLocal () << "; m_mask=" <<
     addr.GetMask () << "; m_broadcast=" << addr.GetBroadcast () << "; m_scope=" << addr.GetScope() <<
     "; m_secondary=" << addr.IsSecondary ();
   return os;
--- a/src/node/ipv4-interface-address.h	Fri Apr 17 15:10:23 2009 -0700
+++ b/src/node/ipv4-interface-address.h	Fri Apr 17 15:38:53 2009 -0700
@@ -27,6 +27,8 @@
 namespace ns3 {
 
 /**
+ * \ingroup address
+ *
  * \brief a class to store IPv4 address information on an interface
  *
  * Corresponds to Linux struct in_ifaddr.  A list of these addresses
@@ -53,8 +55,6 @@
 
   void SetLocal (Ipv4Address local);
   Ipv4Address GetLocal (void) const;
-  void SetPeer (Ipv4Address peer);
-  Ipv4Address GetPeer (void) const;
   void SetMask (Ipv4Mask mask);
   Ipv4Mask GetMask (void) const;
   void SetBroadcast (Ipv4Address broadcast);
@@ -68,8 +68,10 @@
   void SetPrimary (void);
   
 private:
+
   Ipv4Address m_local;     // Interface address
-  Ipv4Address m_peer;      // Peer destination address (in Linux:  m_address)
+  // Note:  m_peer may be added in future when necessary
+  // Ipv4Address m_peer;      // Peer destination address (in Linux:  m_address)
   Ipv4Mask m_mask;         // Network mask
   Ipv4Address m_broadcast; // Broadcast address