INET Framework for OMNeT++/OMNEST
DiffservUtil.h File Reference

Namespaces

 inet
 Copyright (c) 2005 Jan Ringo�, www.ringos.cz.
 
 inet::DiffservUtil
 

Enumerations

enum  inet::DiffservUtil::Color { inet::DiffservUtil::GREEN, inet::DiffservUtil::YELLOW, inet::DiffservUtil::RED }
 

Functions

bool inet::DiffservUtil::isEmpty (const char *str)
 Returns true, if the string is empty (nullptr or "");. More...
 
const char * inet::DiffservUtil::getRequiredAttribute (cXMLElement *element, const char *attrName)
 Returns the value of the named attribute of the XML element, or throws an exception if not found. More...
 
double inet::DiffservUtil::parseInformationRate (const char *attrValue, const char *attrName, IInterfaceTable *ift, cSimpleModule &owner, int defaultValue)
 Parses the information rate parameter (bits/sec). More...
 
int inet::DiffservUtil::parseIntAttribute (const char *attrValue, const char *attrName, bool isOptional=true)
 Parses an integer attribute. More...
 
int inet::DiffservUtil::parseProtocol (const char *attrValue, const char *attrName)
 Parses an IP protocol number. More...
 
int inet::DiffservUtil::parseDSCP (const char *attrValue, const char *attrName)
 Parses a Diffserv code point. More...
 
void inet::DiffservUtil::parseDSCPs (const char *attrValue, const char *attrName, std::vector< int > &result)
 Parses a space separated list of DSCP values and puts them into the result vector. More...
 
std::string inet::DiffservUtil::dscpToString (int dscp)
 Returns the string representation of the given DSCP value. More...
 
std::string inet::DiffservUtil::colorToString (int color)
 Returns the string representation of the given color. More...
 
double inet::DiffservUtil::getInterfaceDatarate (IInterfaceTable *ift, cSimpleModule *interfaceModule)
 Returns the datarate of the interface containing the given module. More...
 
cPacket * inet::DiffservUtil::findIPDatagramInPacket (cPacket *packet)
 Returns the IP datagram encapsulated inside packet, or the packet itself if it is an IPv4/IPv6 datagram. More...
 
int inet::DiffservUtil::getColor (cPacket *packet)
 Returns the color of the packet. More...
 
void inet::DiffservUtil::setColor (cPacket *packet, int color)
 Sets the color of the packet. More...