|
This email has been sent from a virus-free computer protected by Avast. www.avast.com |
--
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/o8OgpfKSxYg/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.
void SetMyClassifier(bool val);
bool GetMyClassifier();
bool m_My_classify;
void Node::SetMyClassifier(bool val)
{
m_My_classify=val;
}
bool Node::GetMyClassifier()
{
return m_My_classify;
}
// enable the node to classifiy packets
bool classify=m_node->GetMyClassifier();
//modif Classification
Ipv6Address src_My=Ipv6Address("2001:1::200:ff:fe00:1");
Ipv6Address dst_My=Ipv6Address("2001:2::200:ff:fe00:5");
Ipv6Address dst_org = header.GetDestinationAddress ();
Ipv6Address src_org = header.GetSourceAddress ();
if(classify){
if(src_My.IsEqual(src_org))
{
//modification for Marking the matching packets
ipHeader.SetNextHeader(200);
Ipv6ExtensionMyHeader MyHeader;
MyHeader.SetNextHeader(header.GetNextHeader());
MyHeader.SetLength(16);
uint16_t new_length = ipHeader.GetPayloadLength() + (uint16_t) MyHeader.GetLength() ;
ipHeader.SetPayloadLength(new_length);
packet->AddHeader(MyHeader);
}
}
uint16_t new_length = ipHeader.GetPayloadLength() + (uint16_t) MyHeader.GetLength() ;uint16_t new_length = ipHeader.GetPayloadLength() + (uint16_t) MyHeader.GetSerializedSize() ;
--
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/o8OgpfKSxYg/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.