Source: congestionmanagerpacket.h


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


#ifndef CONGESTIONMANAGERPACKET_H
#define CONGESTIONMANAGERPACKET_H


#include "system.h"
#include "internetaddress.h"
#include "extendedtransportinfo.h"


// #include <linux/ip.h>


namespace Coral {


/**
  * This is a packet which is received and sent by CongestionManager.
  *
  * @short   Congestion Manager Packet
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */            
class CongestionManagerPacket
{
   // ====== Constructor ====================================================
   public:
   /**
     * Constructor.
     */
   CongestionManagerPacket();

   // ====== Byte order translation =========================================
   /**
     * Translate byte order.
     */
   void translate();

   // ====== Reset ==========================================================
   /**
     * Reset.
     */
   void reset();

   
   // ====== Packet types ===================================================
   /**
     * Packet types.
     */
   enum CongestionManagerPacketType {
      CMPT_Unknown    = 0,
      CMPT_Request    = 1,
      CMPT_Bye        = 2,
      CMPT_Suggestion = 3,
   };

   /**
     * Congestion manager packet ID.
     */   
   static const card16 CongestionManagerPacketID = 0x4533;

   /**
     * Default traffic class for congestion manager packets.
     */
   static const card8 CongestionManagerTrafficClass = 0x00;
      // IPTOS_THROUGHPUT|IPTOS_RELIABILITY|IPTOS_LOWDELAY|IPTOS_PREC_FLASH;


   // ====== Values =========================================================
   public:
   /**
     * PacketID.
     */
   card16 PacketID;

   /**
     * Sequence number.
     */
   card16 SequenceNumber;

   /**
     * Packet type.
     */
   card16 Type;

   /**
     * Total packet length.
     */
   card16 Length;
};


/**
  * This is a packet which is received and sent by CongestionManager.
  *
  * @short   Congestion Manager Request
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0          
  */
class CongestionManagerRequest : public CongestionManagerPacket
{
   // ====== Constructor ====================================================
   public:
   /**
     * Constructor.
     */
   CongestionManagerRequest();

   // ====== Byte order translation =========================================
   /**
     * Translate byte order.
     */
   void translate();

   // ====== Rest ===========================================================
   /**
     * Reset.
     */
   void reset();


   // ====== Values =========================================================
   public:
   /**
     * Address to send CongestionManager reply to in portable address format.
     */
   PortableAddress ReplyTo;

   /**
     * Identifier for usage by the member, *not* the CongestionManager.
     * This can be used to implement management of multiple streams
     * within one member and using only one connection to the
     * CongestionManager.
     */
   card32 Identifier;

   /**
     * ExtendedTransportInfo with description of the stream.
     */
   ExtendedTransportInfo StreamDescription;
};


/**
  * This is a packet which is received and sent by CongestionManager.
  *
  * @short   Congestion Manager Suggestion
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0          
  */
class CongestionManagerSuggestion : public CongestionManagerPacket
{
   // ====== Constructor ====================================================
   public:
   /**
     * Constructor.
     */
   CongestionManagerSuggestion();

   // ====== Byte order translation =========================================
   /**
     * Translate byte order.
     */
   void translate();


   // ====== Status functions ===============================================
   /**
     * Reset report.
     */
   void reset();


   // ====== Values =========================================================
   public:
   /**
     * The identifier, the client has sent in his request.
     */
   card32 Identifier;

   /**
     * ExtendedTransportInfo with suggestions for the stream.
     */
   ExtendedTransportInfo Suggestion;
};


}


#endif

Generated by: viper@odin on Fri Feb 23 12:41:26 2001, using kdoc 2.0a36.