--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Thanks for your reply, can you give me an example show me these process?
On Mon, Jun 22, 2015 at 1:33 PM, Konstantinos <dinos.k...@gmail.com> wrote:
Have you read the manual?https://www.nsnam.org/docs/models/html/packets.html?#adding-and-removing-tags
There are also several examples that use tags.
Create your own tag (e.g. specifying the TOS) and add it to packets from OnOff application.Then at the IP-layer read that tag, and construct the IP-header accordingly.Regards,K.
On Monday, June 22, 2015 at 1:19:46 PM UTC+1, Ahmed Lafta wrote:Anybody can give me a way to how can tag OnOff Application packets to indicate Type Of Service (QoS) and how to read this tag.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Which process? Of creating tags, adding to packets and reading them?
They are ALL in the manual (link provided in the previous post).
On Monday, June 22, 2015 at 1:37:31 PM UTC+1, Ahmed Lafta wrote:
Thanks for your reply, can you give me an example show me these process?
On Mon, Jun 22, 2015 at 1:33 PM, Konstantinos <dinos.k...@gmail.com> wrote:
Have you read the manual?https://www.nsnam.org/docs/models/html/packets.html?#adding-and-removing-tags
There are also several examples that use tags.
Create your own tag (e.g. specifying the TOS) and add it to packets from OnOff application.Then at the IP-layer read that tag, and construct the IP-header accordingly.Regards,K.
On Monday, June 22, 2015 at 1:19:46 PM UTC+1, Ahmed Lafta wrote:Anybody can give me a way to how can tag OnOff Application packets to indicate Type Of Service (QoS) and how to read this tag.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
uint8_t tid = 1;
Tag SCTag;
tag.Set (tid);
packet->AddPacketTag (SCTag);
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Thanks for reply, I agree with you that I need to develop my knowledge about C++ programming. I am trying to but at the same time I am limited with time as I told you before.I would like to summarize what I did:
I think the second method is simple to add tag for OnOff_1 application packets.
1. I added "ns3/wifi-module.h" in the include list.
2. I made function called "ServiceClassMarkerTag" before the main program
In this function, I created an object (qosTag); a copy of QosTag class reference, then I set and add to the packet the service class marker.
void ServiceClassMarkerTag (uint8_t tid,Ptr<const Packet> packet)
{
QosTag qosTag;
qosTag.SetTid(tid);
packet->AddPacketTag(qosTag);
}
3. in the main program and after the installation of OnOff_1 helper, I trace the OnOff_1 packets and called the function for setting and adding the service class marker as:
// Create a helper called (OnOff_1) which is used to create and configure OnOff application. a protocol type and destination socket address should be given.
OnOffHelper OnOff_1("ns3::UdpSocketFactory",node2socketaddress);
Config::ConnectWithoutContext("/NodeList/*/ApplicationList/*/$ns3::OnOff_1/Tx",MakeBoundCallback (&ServiceClassMarkerTag,AC_VI));
I executed the program without error, but in the output the service class marker is not appear with the packet that is transmitted from node to node. The output was appeared as in the attachment. Should I create Ipv4 Header and add this header to the OnOff_1 packets in order to read the Tag during the simulation processes and appear it on the output screen?
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Thanks Dr. Konstantinos,
Regarding to your commands:
"Why do you expect to see something in the output from that function? You do not tell it to print something. It just adds a PacketTag to the transmitted packet, that's all.
Yes that is correct, I did not give a print order. I thought that by adding tag to OnOff_1 packets, the tag would appear as the output.
"Why are you obsessed with creating Ipv4 headers yourself? Do you think that IP headers are not created?"
I reviewed yours previous comments, you said that “ by default OnOffApplication does not add any header” this thing pushed me to thought that the OnOff application generate packets without header. From your explanation, OnOff application packets contain a header with empty fields
"I mentioned in my previous reply, you need to understand WHERE the IP header is created, go to that function, read the QosTag that you added to the packet and set the TOS field properly."
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Thanks Dr. Konstantinos,
Regarding to your commands:
"Why do you expect to see something in the output from that function? You do not tell it to print something. It just adds a PacketTag to the transmitted packet, that's all.
Yes that is correct, I did not give a print order. I thought that by adding tag to OnOff_1 packets, the tag would appear as the output.
"Why are you obsessed with creating Ipv4 headers yourself? Do you think that IP headers are not created?"
I reviewed yours previous comments, you said that “ by default OnOffApplication does not add any header” this thing pushed me to thought that the OnOff application generate packets without header. From your explanation, OnOff application packets contain a header with empty fields
"I mentioned in my previous reply, you need to understand WHERE the IP header is created, go to that function, read the QosTag that you added to the packet and set the TOS field properly."
As I know IP header is constructed at layer-3 (packet layer) and TCP/UDP at the upper layer, so I should go to ns3::Ipv4L3Protocol Class Reference (not Ipv4 Class Reference that is used for upper layer). By creating an object from Ipv4L3Protocol in the main program, read the QosTag and set the ToS field of IP header for OnOff_1 application packets with QosTag that is added to the packets. If this correct, I will write the codes and send to you.
Regards
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/9bkEpyyG_po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.