3 //==========================================================================
9 //==========================================================================
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/config-all.h"
17 #if !defined(ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #if defined (ACE_HAS_ATM)
23 #if defined (ACE_HAS_FORE_ATM_WS2)
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 // just map to WS2 GQOS struct
26 typedef ACE_QoS ATM_QoS
;
27 ACE_END_VERSIONED_NAMESPACE_DECL
28 #elif defined (ACE_HAS_FORE_ATM_XTI)
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 typedef struct netbuf ATM_QoS
;
31 ACE_END_VERSIONED_NAMESPACE_DECL
32 #elif defined (ACE_HAS_LINUX_ATM)
34 #include "ace/ATM_Params.h"
35 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
36 typedef struct atm_qos ATM_QoS
;
37 ACE_END_VERSIONED_NAMESPACE_DECL
39 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
41 ACE_END_VERSIONED_NAMESPACE_DECL
42 #endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */
44 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
49 * @brief Define the QoS parameters for ATM
51 * This class wraps up QoS parameters for both ATM/XTI and
52 * ATM/WinSock2 to make the mechanism for the ATM protocol
55 class ACE_Export ACE_ATM_QoS
58 // Constants used for ATM options
59 static const long LINE_RATE
;
60 static const int OPT_FLAGS_CPID
;
61 static const int OPT_FLAGS_PMP
;
62 static const int DEFAULT_SELECTOR
;
63 static const int DEFAULT_PKT_SIZE
;
65 /// Default constructor.
66 ACE_ATM_QoS(int = DEFAULT_PKT_SIZE
);
68 /// Constructor with a CBR rate.
70 int = DEFAULT_PKT_SIZE
);
75 void set_rate (ACE_HANDLE
,
79 /// Set CBR rate in cells per second.
80 void set_cbr_rate (int,
81 int = DEFAULT_PKT_SIZE
);
83 /// Get ATM_QoS struct.
86 /// Dump the state of an object.
89 /// Declare the dynamic allocation hooks.
90 ACE_ALLOC_HOOK_DECLARE
;
93 /// Construct QoS options.
94 char* construct_options(ACE_HANDLE
,
103 ACE_END_VERSIONED_NAMESPACE_DECL
105 #if defined (__ACE_INLINE__)
106 #include "ace/ATM_QoS.inl"
107 #endif /* __ACE_INLINE__ */
109 #endif /* ACE_HAS_ATM */
110 #include /**/ "ace/post.h"
111 #endif /* ACE_ATM_QoS_H */