Source: trafficclassvalues.h


Annotated List
Files
Globals
Hierarchy
Index
// ##########################################################################
// ####                                                                  ####
// ####                      RTP Audio Server Project                    ####
// ####                    ============================                  ####
// ####                                                                  ####
// #### Traffic Class Values                                             ####
// ####                                                                  ####
// #### Version 1.00  --  February 04, 2001                              ####
// ####                                                                  ####
// #### Copyright (C) 1999  Thomas Dreibholz                             ####
// ####               2000  Universität Bonn, Abt. IV                    ####
// ####               2001  EMail: Dreibholz@bigfoot.com                 ####
// ####                     WWW:   http://www.bigfoot.com/~dreibholz     ####
// ####                                                                  ####
// ##########################################################################


#ifndef TRAFFICCLASSVALUES_H
#define TRAFFICCLASSVALUES_H


#include "system.h"


namespace Coral {


/**
  * This class contains a set of values for the traffic class/TOS byte of
  * IP packets. This class contains only static methods and attributes.
  *
  * @short   Traffic Class Values
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
class TrafficClassValues
{
   // ====== Values =========================================================
   public:
   /**
     * Number of values.
     */
   static const cardinal MaxValues = 16;


   /**
     * Get traffic class of given index.
     *
     * @param index Index.
     * @return Traffic class.
     */
   inline static card8 getTrafficClassForIndex(const cardinal index);

   /**
     * Get traffic class for name.
     *
     * @param name Name.
     * @return Traffic class or 0xffff, if name in unknown.
     */
   static const card16 getTrafficClassForName(const char* name);


   /**
     * Get name for given traffic class.
     *
     * @param trafficClass Traffic class.
     * @return Name.
     */
   static const char* getNameForTrafficClass(const card8 trafficClass);

   /**
     * Get name for index entry.
     *
     * @param index Index.
     * @return Name.
     */
   inline static const char* getNameForIndex(const cardinal index);


   /**
     * Get index for given traffic class.
     *
     * @param trafficClass Traffic class.
     * @return Index.
     */
   static cardinal getIndexForTrafficClass(const card8 trafficClass);


   // ====== Private data ===================================================
   private:
   static const card8 TCValues[MaxValues];
   static const char* TCNames[TrafficClassValues::MaxValues];
};


}


#include "trafficclassvalues.icc"


#endif

Generated by: viper@odin on Sun Feb 4 18:54:51 2001, using kdoc 2.0a22.