hi nuno,

On Wed, 2008-03-12 at 15:06 +0000, Nuno Farias wrote:
> Hi,
> I've been studying NS3. My goal is to create a 802.11s module by
> extending 802.11 code (recently added by Mathieu Lacage).

cool ! 

> At this point I have some doubts that maybe someone could give some pointers:
> 1. How do I active tracing to see (wifi) frames and if it's possible
> to trace frames in pcap format.

There are two aspects to getting pcap trace output:
  - you need to make sure you get a trace event for the packet tx or rx
event. 
  - you need to connect the trace event to a pcap generator.

The latter is really not a problem: you can trivially use the PcapWriter
class. The former might be more complicated and really depends on the
version of ns-3 you are using: so, which version of ns-3 are you using ?

> 2. How to add IP to the main-ap-wifi.cc example? Do I need just to use
> InternetNode instead of Node? What else should I need?

That should be enough, yes.

> 3. After analyzing Mathieu's 802.11 code, it seems that it wasn't
> structured in such a way that it is possible/easy to add more
> management frames, new beacon, etc. At first glance, it seems that I
> need to create a WifiMacHeader subclass and create new methods and
> enum types, instead of overriding methods such as:
>     - void SetType (enum WifiMacType_e type)
>     - enum WifiMacType_e GetType ( )

I have not read the 802.11s specification so, the following might not be
the right answer. If so, please, tell me what is wrong. 

I suspect that what you are trying to do is to set the type/subtype
field of the header to a value which was not specified in the original
802.11-1999 spec. If so, I think that the simplest thing to do would be
for you to submit a patch which extends the existing type enum and the
code to handle this new value. 

Mathieu

Reply via email to