equal
deleted
inserted
replaced
29 * By default, Ipv4 interface are created in the "down" state |
29 * By default, Ipv4 interface are created in the "down" state |
30 * with ip address 192.168.0.1 and a matching mask. Before |
30 * with ip address 192.168.0.1 and a matching mask. Before |
31 * becoming useable, the user must invoke SetUp on them |
31 * becoming useable, the user must invoke SetUp on them |
32 * once the final Ipv4 address and mask has been set. |
32 * once the final Ipv4 address and mask has been set. |
33 */ |
33 */ |
34 Ipv4Interface::Ipv4Interface (NetDevice *nd) |
34 Ipv4Interface::Ipv4Interface (Ptr<NetDevice> nd) |
35 : m_netdevice (nd), |
35 : m_netdevice (nd), |
36 m_ifup(false) |
36 m_ifup(false) |
37 { |
37 {} |
38 if (m_netdevice != 0) |
|
39 { |
|
40 m_netdevice->Ref (); |
|
41 } |
|
42 } |
|
43 |
38 |
44 Ipv4Interface::~Ipv4Interface () |
39 Ipv4Interface::~Ipv4Interface () |
45 { |
40 {} |
46 if (m_netdevice != 0) |
|
47 { |
|
48 m_netdevice->Unref (); |
|
49 } |
|
50 } |
|
51 |
41 |
52 NetDevice* |
42 Ptr<NetDevice> |
53 Ipv4Interface::PeekDevice (void) const |
43 Ipv4Interface::GetDevice (void) const |
54 { |
44 { |
55 return m_netdevice; |
45 return m_netdevice; |
56 } |
46 } |
57 |
47 |
58 TraceResolver * |
48 TraceResolver * |