Account Options

  1. Sign in
Google Groups Home
« Groups Home
WifiNetDevice::Rx trace: why overheard frames?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
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 17 2009, 1:54 pm
From: francesco <francesco.malandr...@gmail.com>
Date: Tue, 17 Feb 2009 10:54:16 -0800 (PST)
Local: Tues, Feb 17 2009 1:54 pm
Subject: WifiNetDevice::Rx trace: why overheard frames?
Hi,

I have noticed that the Rx trace source of WifiNetDevice is called
whenever _any_ frame is received, including overheard ones -- i.e.
directed to some other host.
Is this "by design"? If so, I feel:
* it should be stated clearly in the documentation -- to me, "Received
payload from the MAC layer." suggests that the MAC layer has also
checked that the frame is really for the host;
* users of the trace should be given a fast way to detect whether the
frame is being overheard or not - e.g. passing the destination address
along with the source one.

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.
Mathieu Lacage  
View profile  
 More options Feb 18 2009, 6:33 am
From: Mathieu Lacage <mathieu.lac...@sophia.inria.fr>
Date: Wed, 18 Feb 2009 12:33:49 +0100
Local: Wed, Feb 18 2009 6:33 am
Subject: Re: WifiNetDevice::Rx trace: why overheard frames?

On Tue, 2009-02-17 at 10:54 -0800, francesco wrote:
> I have noticed that the Rx trace source of WifiNetDevice is called
> whenever _any_ frame is received, including overheard ones -- i.e.
> directed to some other host.

Can you be a bit more specific here ?

 
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.
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.
Mathieu Lacage  
View profile  
 More options Feb 19 2009, 2:17 am
From: Mathieu Lacage <mathieu.lac...@sophia.inria.fr>
Date: Thu, 19 Feb 2009 08:17:32 +0100
Local: Thurs, Feb 19 2009 2:17 am
Subject: Re: WifiNetDevice::Rx trace: why overheard frames?

On Wed, 2009-02-18 at 23:05 -0800, francesco wrote:
> > 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)

[snip]

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

Ok, I understand your concern better now. Would you mind file a bug to
keep track of this issue ? (if you have not done so yet)

regards,
Mathieu


 
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.
francesco  
View profile  
 More options Feb 19 2009, 7:19 am
From: francesco <francesco.malandr...@gmail.com>
Date: Thu, 19 Feb 2009 04:19:02 -0800 (PST)
Local: Thurs, Feb 19 2009 7:19 am
Subject: Re: WifiNetDevice::Rx trace: why overheard frames?

> Ok, I understand your concern better now. Would you mind file a bug to
> keep track of this issue ? (if you have not done so yet)

Sure (I was unsure whether this could be considered a bug):
http://www.nsnam.org/bugzilla/show_bug.cgi?id=505

 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »