PTLib
Version 2.10.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
qos.h
Go to the documentation of this file.
1
/*
2
* qos.h
3
*
4
* QOS class used by PWLIB dscp or Windows GQOS implementation.
5
*
6
* Copyright (c) 2003 AliceStreet Ltd
7
*
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/
12
*
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
16
* under the License.
17
*
18
* Contributor(s): ______________________________________.
19
*
20
* $Revision: 21788 $
21
* $Author: rjongbloed $
22
* $Date: 2008-12-11 23:42:13 -0600 (Thu, 11 Dec 2008) $
23
*/
24
25
#ifndef PTLIB_QOS_H
26
#define PTLIB_QOS_H
27
28
#ifdef P_USE_PRAGMA
29
#pragma interface
30
#endif
31
32
#if P_QOS
33
#ifdef _WIN32
34
#ifndef P_KNOCKOUT_WINSOCK2
35
#include <winsock2.h>
36
#include <ws2tcpip.h>
37
38
#ifndef P_KNOCKOUT_QOS
39
#include <qossp.h>
40
#endif // KNOCKOUT_QOS
41
#endif // KNOCKOUT_WINSOCK2
42
#endif // _WIN32
43
#endif // P_QOS
44
45
#ifndef QOS_NOT_SPECIFIED
46
#define QOS_NOT_SPECIFIED 0xFFFFFFFF
47
#endif
48
49
#ifndef SERVICETYPE
50
#define SERVICETYPE DWORD
51
#endif
52
53
#ifndef SERVICETYPE_GUARANTEED
54
#define SERVICETYPE_GUARANTEED 0x00000003
55
#endif
56
57
#ifndef SERVICETYPE_CONTROLLEDLOAD
58
#define SERVICETYPE_CONTROLLEDLOAD 0x00000002
59
#endif
60
61
#ifndef SERVICETYPE_BESTEFFORT
62
#define SERVICETYPE_BESTEFFORT 0x00000001
63
#endif
64
65
#define SERVICETYPE_PNOTDEFINED 0xFFFFFFFF
66
67
class
PQoS
:
public
PObject
68
{
69
PCLASSINFO(
PQoS
,
PObject
);
70
71
public
:
72
PQoS
();
73
PQoS
(DWORD avgBytesPerSec,
74
DWORD winServiceType,
75
int
DSCPalternative = -1,
76
DWORD maxFrameBytes = 1500,
77
DWORD peakBytesPerSec =
QOS_NOT_SPECIFIED
);
78
PQoS
(
int
DSCPvalue);
79
80
void
SetAvgBytesPerSec
(DWORD avgBytesPerSec);
81
void
SetWinServiceType
(DWORD winServiceType);
82
void
SetDSCP
(
int
DSCPvalue);
83
void
SetMaxFrameBytes
(DWORD maxFrameBytes);
84
void
SetPeakBytesPerSec
(DWORD peakBytesPerSec);
85
86
DWORD
GetTokenRate
()
const
{
return
tokenRate
;}
87
DWORD
GetTokenBucketSize
()
const
{
return
tokenBucketSize
;}
88
DWORD
GetPeakBandwidth
()
const
{
return
peakBandwidth
;}
89
DWORD
GetServiceType
()
const
{
return
serviceType
;}
90
int
GetDSCP
()
const
{
return
dscp
;}
91
92
static
void
SetDSCPAlternative
(DWORD winServiceType,
93
UINT
dscp
);
94
static
char
bestEffortDSCP
;
95
static
char
controlledLoadDSCP
;
96
static
char
guaranteedDSCP
;
97
98
protected
:
99
int
dscp
;
100
DWORD
tokenRate
;
101
DWORD
tokenBucketSize
;
102
DWORD
peakBandwidth
;
103
DWORD
serviceType
;
104
105
};
106
107
108
#endif // PTLIB_QOS_H
109
110
111
// End Of File ///////////////////////////////////////////////////////////////
include
ptlib
qos.h
Generated on Tue Mar 11 2014 15:09:30 for PTLib by
1.8.1.2