Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion WifiNetDevice::Rx trace: why overheard frames?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
francesco  
View profile  
 More options Feb 19 2009, 2:05 am
From: francesco <francesco.malandr...@gmail.com>
Date: Wed, 18 Feb 2009 23:05:01 -0800 (PST)
Local: Thurs, Feb 19 2009 2:05 am
Subject: Re: WifiNetDevice::Rx trace: why overheard frames?

> Can you be a bit more specific here ?

src/devices/wifi/wifi-net-device.cc, lines 283-314

void
WifiNetDevice::ForwardUp (Ptr<Packet> packet, Mac48Address from,
Mac48Address to)
{
  m_rxLogger (packet, from);
  LlcSnapHeader llc;
  packet->RemoveHeader (llc);
  enum NetDevice::PacketType type;
  if (to.IsBroadcast ())
    {
      type = NetDevice::PACKET_BROADCAST;
    }
  else if (to.IsGroup ())
    {
      type = NetDevice::PACKET_MULTICAST;
    }
  else if (to == m_mac->GetAddress ())
    {
      type = NetDevice::PACKET_HOST;
    }
  else
    {
      type = NetDevice::PACKET_OTHERHOST;
    }
  if (type != NetDevice::PACKET_OTHERHOST)
    {
      m_forwardUp (this, packet, llc.GetType (), from);
    }
  if (!m_promiscRx.IsNull ())
    {
      m_promiscRx (this, packet, llc.GetType (), from, to, type);
    }

}

As far as I could understand, this code checks whether the received L2
payload should be passed to upper layers (i.e. it is either broadcast,
multicast or unicast directed to the current host) or not (case
PACKET_OTHERHOST). In the latter case, it is only passed to upper
layers if the promiscuous mode is activated.
Nevertheless, m_rxLogger is called before the switch statement, i.e.
in _all_ the above cases, including the one in which the frame is
directed to another host.

I think naming this event "Rx" can be misleading. I feel it would be
more correct to move the m_rxLogger call inside the "if (type !=
NetDevice::PACKET_OTHERHOST)" branch, and possibly add a distinct
trace source, say "FrameSeen", where Rx currently is. Anyway, I would
suggest to state more explicitly the exact semantics of Rx in the
documentation.

Francesco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.