How to include ns3/wifi-mac-header.h ?

73 views
Skip to first unread message

fbil

unread,
Dec 28, 2008, 4:22:56 AM12/28/08
to ns-3-users
Hi All,

I want to peek the header information in my main script so i used
----
WifiMacHeader hdrPeek;
packet->PeekHeader (hdrPeek);
std::cout << "Addr1 = " <<hdrPeek.GetAddr1 () << std::endl;
----
and included thef
----
#include "ns3/wifi-mac-header.h"
----

However, the compiler complains the ns3/wifi-mac-header.h can not be
found!
Did i forget anything in my setting?

Many thanks!

Best,
Scott




Mathieu Lacage

unread,
Dec 28, 2008, 7:14:33 AM12/28/08
to ns-3-...@googlegroups.com

That header is not public by default (i.e., it is considered a private
implementation detail of the wifi code) but you can easily make it
public by modifying src/devices/wifi/wscript:
headers = bld.create_obj('ns3header')
headers.module = 'wifi'
headers.source = [
'propagation-delay-model.h'
'wifi-mac-header.h'
...
]

and then, re-running waf which will 'install' the file, that is, copy
this file in build/debug/ns3/

hope this helps,
Mathieu

fbil

unread,
Dec 28, 2008, 7:18:41 AM12/28/08
to ns-3-users
Ha, I just added it and then see your reply now :)
Thank you very much!

Best,
Scott

On 12月28日, 下午8時14分, Mathieu Lacage <mathieu.lac...@sophia.inria.fr>
wrote:
Reply all
Reply to author
Forward
0 new messages