|
|
| 317 |
WifiNetDevice::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to) |
317 |
WifiNetDevice::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to) |
| 318 |
{ |
318 |
{ |
| 319 |
LlcSnapHeader llc; |
319 |
LlcSnapHeader llc; |
| 320 |
packet->RemoveHeader (llc); |
|
|
| 321 |
enum NetDevice::PacketType type; |
320 |
enum NetDevice::PacketType type; |
| 322 |
if (to.IsBroadcast ()) |
321 |
if (to.IsBroadcast ()) |
| 323 |
{ |
322 |
{ |
|
|
| 336 |
type = NetDevice::PACKET_OTHERHOST; |
335 |
type = NetDevice::PACKET_OTHERHOST; |
| 337 |
} |
336 |
} |
| 338 |
|
337 |
|
|
|
338 |
if (!m_promiscRx.IsNull ()) |
| 339 |
{ |
| 340 |
m_mac->NotifyPromiscRx (packet); |
| 341 |
packet->PeekHeader (llc); |
| 342 |
m_promiscRx (this, packet, llc.GetType (), from, to, type); |
| 343 |
} |
| 344 |
|
| 339 |
if (type != NetDevice::PACKET_OTHERHOST) |
345 |
if (type != NetDevice::PACKET_OTHERHOST) |
| 340 |
{ |
346 |
{ |
| 341 |
m_mac->NotifyRx (packet); |
347 |
m_mac->NotifyRx (packet); |
|
|
348 |
packet->RemoveHeader (llc); |
| 342 |
m_forwardUp (this, packet, llc.GetType (), from); |
349 |
m_forwardUp (this, packet, llc.GetType (), from); |
| 343 |
} |
350 |
} |
| 344 |
|
|
|
| 345 |
if (!m_promiscRx.IsNull ()) |
| 346 |
{ |
| 347 |
m_mac->NotifyPromiscRx (packet); |
| 348 |
m_promiscRx (this, packet, llc.GetType (), from, to, type); |
| 349 |
} |
| 350 |
} |
351 |
} |
| 351 |
|
352 |
|
| 352 |
void |
353 |
void |