|
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 |
{ |