View | Details | Raw Unified | Return to bug 406
Collapse All | Expand All

(-)src/helper/ipv4-interface-container.cc (+26 lines)
 Lines 11-16    Link Here 
11
{
11
{
12
  return m_interfaces.size ();
12
  return m_interfaces.size ();
13
}
13
}
14
//====Abdul Code=============
15
void
16
Ipv4InterfaceContainer::SetDown (uint32_t i)
17
{
18
  Ptr<Ipv4> ipv4 = m_interfaces[i].first;
19
  uint32_t interface = m_interfaces[i].second;
20
//  cout << interface << endl;
21
  return ipv4->SetDown (interface);
22
}
23
24
Ptr<Ipv4> 
25
Ipv4InterfaceContainer::Get (uint32_t i) const
26
{
27
  Ptr<Ipv4> ipv4 = m_interfaces[i].first;
28
  return ipv4;
29
}
30
31
uint32_t
32
Ipv4InterfaceContainer::GetInterface(uint32_t i) const
33
{
34
  uint32_t interface = m_interfaces[i].second;
35
  return interface;
36
}
37
38
//==========================
39
14
Ipv4Address 
40
Ipv4Address 
15
Ipv4InterfaceContainer::GetAddress (uint32_t i) const
41
Ipv4InterfaceContainer::GetAddress (uint32_t i) const
16
{
42
{
(-)src/helper/ipv4-interface-container.h (+5 lines)
 Lines 24-30    Link Here 
24
   * \returns the number of interfaces stored in this Ipv4InterfaceContainer.
24
   * \returns the number of interfaces stored in this Ipv4InterfaceContainer.
25
   */
25
   */
26
  uint32_t GetN (void) const;
26
  uint32_t GetN (void) const;
27
//============= Abdul Code==============
28
void SetDown (uint32_t i);
29
Ptr<Ipv4> Get (uint32_t i) const;
30
uint32_t GetInterface(uint32_t i) const;
27
31
32
//============Abdul Code===================
28
  Ipv4Address GetAddress (uint32_t i) const;
33
  Ipv4Address GetAddress (uint32_t i) const;
29
  void SetMetric (uint32_t i, uint16_t metric);
34
  void SetMetric (uint32_t i, uint16_t metric);
30
35

Return to bug 406