adding QOS-Tag to packets

1,756 views
Skip to first unread message

solmaz soltani

unread,
Aug 3, 2013, 3:06:43 AM8/3/13
to ns-3-...@googlegroups.com
./libns3.16-evalvid-debug.so: undefined reference to `ns3::QosTag::QosTag(unsigned char)'
./libns3.16-evalvid-debug.so: undefined reference to `vtable for ns3::QosTag'
collect2: ld returned 1 exit status


hello
is there any one who can solve my problem
how do i add  qos in sending packet?

gigoudt

unread,
Dec 16, 2013, 6:04:34 PM12/16/13
to ns-3-...@googlegroups.com
Hi,

Im having also the same problem, read a lot and cant find any clue

Im using the udptraceclienthelper to send video stream. Everything is working fine but when I want to mark it to use it in a 802.11e simulation I have the same error. 

I add in udp-trace-client.cc this lines :

 Ptr<Packet> p;

   QosTag tag ;
 tag.SetTid(4) ; // AC_VI
 p -> AddPacketTag ( tag );


could someone give a clue in this or how to use tagging in main script.

IN main script I use :

 uint16_t port = i+4000;
  UdpServerHelper server (port);
  ApplicationContainer apps = server.Install (wifiStaNodes.Get (i+6));
  apps.Start (Seconds (2.0));
  apps.Stop (Seconds (10.0));

//
// Create one UdpTraceClient application to send UDP datagrams from node zero to
// node one.
//
  uint32_t MaxPacketSize = 1472;  // Back off 20 (IP) + 8 (UDP) bytes from MTU
  UdpTraceClientHelper client (IPSTA.GetAddress (i+6), port,"trace.txt");
  client.SetAttribute ("MaxPacketSize", UintegerValue (MaxPacketSize));
  apps = client.Install (wifiApNode.Get (0));
  apps.Start (Seconds (2.0));
  apps.Stop (Seconds (10.0));

without tagging everything works fine.

thanks a lot for any help !!!!

gigoudt

unread,
Dec 16, 2013, 6:08:29 PM12/16/13
to ns-3-...@googlegroups.com
this is my error output 

./libns3-dev-applications-debug.so: referencia a `vtable for ns3::QosTag' sin definir
./libns3-dev-applications-debug.so: referencia a `ns3::QosTag::SetTid(unsigned char)' sin definir
./libns3-dev-applications-debug.so: referencia a `ns3::QosTag::QosTag()' sin definir
collect2: error: ld returned 1 exit status

Konstantinos

unread,
Dec 16, 2013, 6:12:57 PM12/16/13
to ns-3-...@googlegroups.com
Hi, 

It is a linking error.
Application module has no reference to QosTag. You should add the 'wifi' module as a dependency to the application module.

This is done by changing the wscript file

e.g.

    module = bld.create_ns3_module('applications', ['internet', 'config-store','stats', 'wifi'])

Regards,
K.
Message has been deleted

sai kishore

unread,
Dec 16, 2013, 10:46:02 PM12/16/13
to ns-3-...@googlegroups.com
Hi,
You can add QOS tag by changing code in udp-echo-server.cc and udp-echo-client.cc by adding attributes 
e.g. 
AddAttribute ("AccessClass", "The access class: AC_BE, AC_VO, AC_VI, AC_BK",
                   UintegerValue (0),
                   MakeUintegerAccessor (&UdpEchoClient::m_ac),
                   MakeUintegerChecker<uint8_t> ())
After changing the source code, you can add tag directly in your code like
echoClient.SetAttribute("AccessClass",UintegerValue(UP_VO));

Diego Romero

unread,
Dec 17, 2013, 7:06:48 AM12/17/13
to ns-3-...@googlegroups.com
Hi, I've added that dependendy on wifi module, as you said, but this is what I get:

../src/applications/model/udp-trace-client.cc: In member function ‘void ns3::UdpTraceClient::SendPacket(uint32_t)’:
../src/applications/model/udp-trace-client.cc:288:1: error: ‘QosTag’ was not declared in this scope
../src/applications/model/udp-trace-client.cc:288:8: error: expected ‘;’ before ‘tag’
../src/applications/model/udp-trace-client.cc:289:1: error: ‘tag’ was not declared in this scope

What could it be wrong?
Thanks!

Konstantinos

unread,
Dec 17, 2013, 7:18:52 AM12/17/13
to ns-3-...@googlegroups.com
Have you added the qos-tag.h header file in either the udp-trace-client.cc or .h file?

Konstantinos

unread,
Dec 17, 2013, 7:22:08 AM12/17/13
to ns-3-...@googlegroups.com
Hi,

Adding this attribute in the udp-echo-client/server classes does not solve the problem. 
This solution is a smart way to dynamically adjust them, but it is not what was asked.

Regards,
K.

Diego Romero

unread,
Dec 17, 2013, 7:27:23 AM12/17/13
to ns-3-...@googlegroups.com
If I add qos-tag.h in udp-trace-client.cc I get the following:

../src/applications/model/udp-trace-client.cc:37:21: fatal error: qos-tag.h: No such file or directory
compilation terminated

Konstantinos

unread,
Dec 17, 2013, 7:29:13 AM12/17/13
to ns-3-...@googlegroups.com
How did you add the qos-tag.h? 

Was it like this? #include <ns3/qos-tag.h> 

Diego Romero

unread,
Dec 17, 2013, 7:41:14 AM12/17/13
to ns-3-...@googlegroups.com
I made a mistake in the include.... Now it works!!!!
Konstantinos, you're great! Thanks for your time!!!!
Regards,
Diego

gigoudt

unread,
Dec 18, 2013, 4:32:13 PM12/18/13
to ns-3-...@googlegroups.com
Kontastinos ,

thanks a lot its working !!!!! I could never find the way I guess ...

kind regards !

Andres

Zahra Nasr

unread,
Feb 2, 2014, 3:25:59 PM2/2/14
to ns-3-...@googlegroups.com
HI Konstantinos
when i searched for solve my problem i sow your comments 
plz help me 
in my post link :

sean hughes

unread,
Feb 23, 2016, 1:19:30 PM2/23/16
to ns-3-users
Hi Konstantinos,

I know this is an old thread but I've been searching everywhere for a solution to this problem and by adding in 'wifi' I just get the cycle error.
Is there any solution for this?

Kind regards,
Sean


Sardar Sadaqat

unread,
Mar 10, 2016, 12:43:53 PM3/10/16
to ns-3-users
sir i want to work in qos can i get the code for understanding through this code m able to develop intserv model.
thanks in advance
Reply all
Reply to author
Forward
0 new messages