32 #include "ns3/packet.h"
33 #include "ns3/ipv4-header.h"
34 #include "ns3/udp-header.h"
35 #include "ns3/tcp-header.h"
36 #include "ns3/udp-l4-protocol.h"
37 #include "ns3/tcp-l4-protocol.h"
95 uint8_t tos = ipv4Header.
GetTos ();
97 uint16_t localPort = 0;
98 uint16_t remotePort = 0;
138 <<
" localAddr=" << localAddress
139 <<
" remoteAddr=" << remoteAddress
140 <<
" localPort=" << localPort
141 <<
" remotePort=" << remotePort
142 <<
" tos=0x" << (uint16_t) tos );
147 std::map <uint32_t, Ptr<EpcTft> >::const_reverse_iterator it;
155 if (tft->Matches (direction, remoteAddress, localAddress, remotePort, localPort, tos))
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Direction
Indicates the direction of the traffic that is to be classified.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void Add(Ptr< EpcTft > tft, uint32_t id)
add a TFT to the Classifier
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
uint32_t Classify(Ptr< Packet > p, EpcTft::Direction direction)
classify an IP packet
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
static const uint8_t PROT_NUMBER
protocol number (0x6)
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
std::map< uint32_t, Ptr< EpcTft > > m_tftMap
Ipv4 addresses are stored in host order in this class.
void Delete(uint32_t id)
delete an existing TFT from the classifier
static const uint8_t PROT_NUMBER
protocol number (0x11)