summaryrefslogtreecommitdiff
path: root/ace/ATM_QoS.h
diff options
context:
space:
mode:
authorjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-02 23:38:04 +0000
committerjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-02 23:38:04 +0000
commite349c40fd5806b0e4abe68a48b661405fbb6b78c (patch)
tree86edb2eb7bea85bb26aa258e676fcbe76791dc03 /ace/ATM_QoS.h
parent78380acd0bb8175d147832e6c39a4cafc07460b3 (diff)
downloadATCD-e349c40fd5806b0e4abe68a48b661405fbb6b78c.tar.gz
Adding new classes to wrap ATM functionality
Diffstat (limited to 'ace/ATM_QoS.h')
-rw-r--r--ace/ATM_QoS.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/ace/ATM_QoS.h b/ace/ATM_QoS.h
new file mode 100644
index 00000000000..57f3b257c6d
--- /dev/null
+++ b/ace/ATM_QoS.h
@@ -0,0 +1,120 @@
+/* -*- C++ -*- */
+// $Id$
+
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// ATM_QoS.h
+//
+// = AUTHOR
+// Joe Hoffert
+//
+// ============================================================================
+
+#ifndef ACE_ATM_QoS_H
+#define ACE_ATM_QoS_H
+
+#include "ace/ACE.h"
+
+#if !defined(ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if defined (ACE_HAS_ATM)
+
+#if defined (ACE_HAS_FORE_ATM_WS2)
+// just map to WS2 GQOS struct
+typedef QOS ATM_QoS;
+#elif defined (ACE_HAS_FORE_ATM_XTI)
+// typedef enum {
+// BEST_EFFORT,
+// CONTROLLED_LOAD,
+// GUARANTEED
+// } SERVICETYPE;
+
+// typedef struct _flowspec {
+// int TokeRate;
+// int TokenBucketSize;
+// int PeakBandwidth;
+// int Latency;
+// int DelayVariation;
+// SERVICETYPE ServiceType;
+// int MaxSduSize;
+// int MinimumPolicedSize;
+// } FLOWSPEC;
+
+// typedef struct _BUF {
+// ulong len;
+// char *buf;
+// } BUF;
+
+// typedef struct _QualityOfService {
+// FLOWSPEC SendingFlowspec;
+// FLOWSPEC ReceivingFlowspec;
+// BUF ProviderSpecific;
+// } ATM_QoS;
+typedef struct netbuf ATM_QoS;
+#else
+typedef int ATM_QoS;
+#endif /* ACE_HAS_FORE_ATM_WS2 */
+
+class ACE_Export ACE_ATM_QoS
+{
+ // = TITLE
+ // Define the QoS parameters for ATM
+ //
+ // = DESCRIPTION
+ // This class wraps up QoS parameters for both ATM/XTI and
+ // ATM/WinSock2 to make the mechanism for the ATM protocol
+ // transparent.
+public:
+ // Constants used for ATM options
+ static const long LINE_RATE;
+ static const int OPT_FLAGS_CPID;
+ static const int OPT_FLAGS_PMP;
+ static const int DEFAULT_SELECTOR;
+
+ // = Initializattion and termination methods.
+ ACE_ATM_QoS ();
+ // Default constructor
+
+ ~ACE_ATM_QoS ();
+
+ void set_rate (ACE_HANDLE,
+ int,
+ int);
+ // set the rate
+
+ void set_cbr_rate (int);
+ // set CBR rate
+
+ ATM_QoS get_qos (void);
+ // get ATM_QoS struct
+
+ void dump (void) const;
+ // Dump the state of an object.
+
+ ACE_ALLOC_HOOK_DECLARE;
+ // Declare the dynamic allocation hooks.
+
+protected:
+ char* construct_options(ACE_HANDLE,
+ int,
+ int,
+ long*);
+ // Construct QoS options
+
+private:
+ ATM_QoS qos_;
+};
+
+#if defined (__ACE_INLINE__)
+#include "ace/ATM_QoS.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* ACE_HAS_ATM */
+#endif /* ACE_ATM_QoS_H */