' qos.ab

' Definitions for valued-based Service Type for each direction of data flow.

TypeDef SERVICETYPE = DWord

Const SERVICETYPE_NOTRAFFIC = &h00000000
Const SERVICETYPE_BESTEFFORT = &h00000001
Const SERVICETYPE_CONTROLLEDLOAD = &h00000002
Const SERVICETYPE_GUARANTEED = &h00000003
Const SERVICETYPE_NETWORK_UNAVAILABLE = &h00000004
Const SERVICETYPE_GENERAL_INFORMATION = &h00000005
Const SERVICETYPE_NOCHANGE = &h00000006
Const SERVICETYPE_NONCONFORMING = &h00000009
Const SERVICETYPE_NETWORK_CONTROL = &h0000000A
Const SERVICETYPE_QUALITATIVE = &h0000000D
' The usage of these is currently not supported.
Const SERVICE_BESTEFFORT = &h80010000
Const SERVICE_CONTROLLEDLOAD = &h80020000
Const SERVICE_GUARANTEED = &h80040000
Const SERVICE_QUALITATIVE = &h80200000

' Flags to control the usage of RSVP on this flow.
Const SERVICE_NO_TRAFFIC_CONTROL = &h81000000

Const SERVICE_NO_QOS_SIGNALING = &h40000000

' Flow Specifications for each direction of data flow.
Type FLOWSPEC
	TokenRate As DWord
	TokenBucketSize As DWord
	PeakBandwidth As DWord
	Latency As DWord
	DelayVariation As DWord
	ServiceType As SERVICETYPE
	MaxSduSize As DWord
	MinimumPolicedSize As DWord
End Type
TypeDef PFLOWSPEC = *FLOWSPEC
TypeDef LPFLOWSPEC = *FLOWSPEC

Const QOS_NOT_SPECIFIED = &hFFFFFFFF

Const POSITIVE_INFINITY_RAT = &hFFFFFFFE

Type QOS_OBJECT_HDR
	bjectType As DWord
	bjectLength As DWord
End Type
TypeDef LPQOS_OBJECT_HDR = *QOS_OBJECT_HDR

Const QOS_GENERAL_ID_BASE = 2000

Const QOS_OBJECT_END_OF_LIST = (&h00000001 + QOS_GENERAL_ID_BASE)
Const QOS_OBJECT_SD_MODE = (&h00000002 + QOS_GENERAL_ID_BASE)
Const QOS_OBJECT_SHAPING_RATE = (&h00000003 + QOS_GENERAL_ID_BASE)
Const QOS_OBJECT_DESTADDR = (&h00000004 + QOS_GENERAL_ID_BASE)


Type QOS_SD_MODE
	ObjectHdr As QOS_OBJECT_HDR
	ShapeDiscardMode As DWord
End Type
TypeDef LPQOS_SD_MODE = QOS_SD_MODE

Const TC_NONCONF_BORROW = 0
Const TC_NONCONF_SHAPE = 1
Const TC_NONCONF_DISCARD = 2
Const TC_NONCONF_BORROW_PLUS = 3 ' Not supported currently

Type QOS_SHAPING_RATE
	ObjectHdr As QOS_OBJECT_HDR
	ShapingRate As DWord
End Type
TypeDef LPQOS_SHAPING_RATE = *QOS_SHAPING_RATE
