39 .SetGroupName (
"Internet")
58 return (DynamicCast<Ipv4QueueDiscItem> (item) != 0);
68 static TypeId tid =
TypeId (
"ns3::PfifoFastIpv4PacketFilter")
70 .SetGroupName (
"Internet")
72 .AddAttribute (
"Mode",
73 "Whether to interpret the TOS byte as legacy TOS or DSCP",
103 uint8_t tos = ipv4Item->GetHeader ().GetTos ();
105 NS_LOG_DEBUG (
"Found Ipv4 packet; TOS " << (uint8_t) tos <<
" band " << band);
111 NS_LOG_DEBUG (
"Found Ipv4 packet; DSCP " << ipv4Item->GetHeader ().DscpTypeToString (dscp) <<
" band " << band);
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 "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
PfifoFastIpv4PacketFilter()
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual int32_t DoClassify(Ptr< QueueDiscItem > item) const
Classify a packet.
#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.
Hold variables of type enum.
Ipv4TrafficClassMode m_trafficClassMode
traffic class mode
virtual ~Ipv4PacketFilter()
PfifoFastIpv4PacketFilter is the filter to be added to the PfifoFast queue disc to simulate the behav...
virtual ~PfifoFastIpv4PacketFilter()
static TypeId GetTypeId(void)
Get the type ID.
uint32_t DscpToBand(Ipv4Header::DscpType dscpType) const
Converts a DSCP field value into a priority band.
virtual bool CheckProtocol(Ptr< QueueDiscItem > item) const
Checks if the filter is able to classify a kind of items.
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name.
static TypeId GetTypeId(void)
Get the type ID.
Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets. ...
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
PacketFilter is the abstract base class for filters used by queue discs to classify packets...
use DSCP semantics to interpret TOS byte
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t TosToBand(uint8_t tos) const
Converts a TOS field value into a priority band.
use legacy TOS semantics to interpret TOS byte