4 * QOS class used by PWLIB dscp or Windows GQOS implementation.
6 * Copyright (c) 2003 AliceStreet Ltd
8 * The contents of this file are subject to the Mozilla Public License
9 * Version 1.0 (the "License"); you may not use this file except in
10 * compliance with the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS"
14 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 * the License for the specific language governing rights and limitations
18 * Contributor(s): ______________________________________.
21 * Revision 1.2 2003/10/27 03:51:38 csoutheren
22 * Added ifdef to disable QoS code on systems that do not support it
24 * Revision 1.1 2003/10/27 03:20:10 csoutheren
25 * Initial version of QoS implementation
26 * Thanks to Henry Harrison of AliceStreet
46 #ifndef QOS_NOT_SPECIFIED
47 #define QOS_NOT_SPECIFIED 0xFFFFFFFF
51 #define SERVICETYPE DWORD
54 #ifndef SERVICETYPE_GUARANTEED
55 #define SERVICETYPE_GUARANTEED 0x00000003
58 #ifndef SERVICETYPE_CONTROLLEDLOAD
59 #define SERVICETYPE_CONTROLLEDLOAD 0x00000002
62 #ifndef SERVICETYPE_BESTEFFORT
63 #define SERVICETYPE_BESTEFFORT 0x00000001
66 #define SERVICETYPE_PNOTDEFINED 0xFFFFFFFF
68 class PQoS
: public PObject
70 PCLASSINFO(PQoS
, PObject
);
74 PQoS(DWORD avgBytesPerSec
,
76 int DSCPalternative
= -1,
77 DWORD maxFrameBytes
= 1500,
78 DWORD peakBytesPerSec
= QOS_NOT_SPECIFIED
);
81 void SetAvgBytesPerSec(DWORD avgBytesPerSec
);
82 void SetWinServiceType(DWORD winServiceType
);
83 void SetDSCP(int DSCPvalue
);
84 void SetMaxFrameBytes(DWORD maxFrameBytes
);
85 void SetPeakBytesPerSec(DWORD peakBytesPerSec
);
87 DWORD
GetTokenRate() const { return tokenRate
;}
88 DWORD
GetTokenBucketSize() const { return tokenBucketSize
;}
89 DWORD
GetPeakBandwidth() const { return peakBandwidth
;}
90 DWORD
GetServiceType() const { return serviceType
;}
91 int GetDSCP() const { return dscp
;}
93 static void SetDSCPAlternative(DWORD winServiceType
,
95 static char bestEffortDSCP
;
96 static char controlledLoadDSCP
;
97 static char guaranteedDSCP
;
102 DWORD tokenBucketSize
;