equal
deleted
inserted
replaced
110 Ptr<NetDevice> |
110 Ptr<NetDevice> |
111 TapFdNetDeviceHelper::InstallPriv (Ptr<Node> node) const |
111 TapFdNetDeviceHelper::InstallPriv (Ptr<Node> node) const |
112 { |
112 { |
113 Ptr<NetDevice> d = FdNetDeviceHelper::InstallPriv (node); |
113 Ptr<NetDevice> d = FdNetDeviceHelper::InstallPriv (node); |
114 Ptr<FdNetDevice> device = d->GetObject<FdNetDevice> (); |
114 Ptr<FdNetDevice> device = d->GetObject<FdNetDevice> (); |
115 Ptr<FdNetDevice> fdnd = device->GetObject<FdNetDevice> (); |
|
116 |
115 |
117 // |
116 // |
118 // We need to explicitly set the encapsulation mode for the traffic |
117 // We need to explicitly set the encapsulation mode for the traffic |
119 // traversing the TAP device, so the FdNetDevice is able to know |
118 // traversing the TAP device, so the FdNetDevice is able to know |
120 // how to treat the traffic in a way that in compatible with the |
119 // how to treat the traffic in a way that in compatible with the |
121 // TAP device. |
120 // TAP device. |
122 // |
121 // |
123 if (m_modePi) |
122 if (m_modePi) |
124 { |
123 { |
125 fdnd->SetEncapsulationMode (FdNetDevice::DIXPI); |
124 device->SetEncapsulationMode (FdNetDevice::DIXPI); |
126 } |
125 } |
127 |
126 |
128 SetFileDescriptor (device); |
127 SetFileDescriptor (device); |
129 return device; |
128 return device; |
130 } |
129 } |