Module:       WinSock2
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

// This file is automatically generated from "qos.h"; do not edit.


// Adapted from:
/*++


Module Name:

    qos.h - QoS definitions for NDIS components.

Abstract:

    This module defines the Quality of Service structures and types used
    by Winsock applications.

Revision History:

--*/
define inline constant <SERVICETYPE> = <ULONG>;
define inline-only constant $SERVICETYPE-NOTRAFFIC      = #x00000000;
define inline-only constant $SERVICETYPE-BESTEFFORT     = #x00000001;
define inline-only constant $SERVICETYPE-CONTROLLEDLOAD = #x00000002;
define inline-only constant $SERVICETYPE-GUARANTEED     = #x00000003;
define inline-only constant $SERVICETYPE-NETWORK-UNAVAILABLE =
	#x00000004;
define inline-only constant $SERVICETYPE-GENERAL-INFORMATION =
	#x00000005;
define inline-only constant $SERVICETYPE-NOCHANGE       = #x00000006;
define inline-only constant $SERVICE-IMMEDIATE-TRAFFIC-CONTROL =
	as(<machine-word>, #x80000000);
define inline-only constant $SERVICE-NO-QOS-SIGNALING   =
	as(<machine-word>, #x40000000);

define C-struct <FLOWSPEC>
  sealed inline-only slot TokenRate-value :: <ULONG>;
  sealed inline-only slot TokenBucketSize-value :: <ULONG>;
  sealed inline-only slot PeakBandwidth-value :: <ULONG>;
  sealed inline-only slot Latency-value  :: <ULONG>;
  sealed inline-only slot DelayVariation-value :: <ULONG>;
  sealed inline-only slot ServiceType-value :: <SERVICETYPE>;
  sealed inline-only slot MaxSduSize-value :: <ULONG>;
  sealed inline-only slot MinimumPolicedSize-value :: <ULONG>;
  pointer-type-name: <LPFLOWSPEC>;
  c-name: "struct _flowspec";
end C-struct <FLOWSPEC>;
define inline constant <PFLOWSPEC> = <LPFLOWSPEC>;

define C-struct <QOS-OBJECT-HDR>
  sealed inline-only slot ObjectType-value :: <ULONG>;
  sealed inline-only slot ObjectLength-value :: <ULONG>;
  pointer-type-name: <LPQOS-OBJECT-HDR>;
end C-struct <QOS-OBJECT-HDR>;
define inline-only constant $RSVP-OBJECT-ID-BASE        = 1000;
define inline-only constant $QOS-GENERAL-ID-BASE        = 2000;
define inline-only constant $QOS-NOT-SPECIFIED          = $FFFFFFFF;
define inline-only constant $POSITIVE-INFINITY-RATE     =
	as(<machine-word>, #xFFFFFFFE);

define C-union <IN-ADDR-IPV4>
  sealed inline-only slot Addr-value     :: <ULONG>;
  sealed inline-only array slot AddrBytes-array :: <UCHAR>,
	length: 4, address-getter: AddrBytes-value;
end C-union <IN-ADDR-IPV4>;
define inline constant <LPIN-ADDR-IPV4> = <LPIN-ADDR-IPV4>;

define C-struct <IN-ADDR-IPV6>
  sealed inline-only array slot Addr-array :: <UCHAR>, length: 16,
	address-getter: Addr-value;
  pointer-type-name: <LPIN-ADDR-IPV6>;
  c-name: "struct _IN_ADDR_IPV6";
end C-struct <IN-ADDR-IPV6>;
define inline constant <LPCIN-ADDR-IPV6> =  /* const */ <LPIN-ADDR-IPV6>;

define C-struct <RSVP-FILTERSPEC-V4>
  sealed inline-only slot Address-value  :: <IN-ADDR-IPV4>;
  sealed inline-only slot Unused-value   :: <USHORT>;
  sealed inline-only slot Port-value     :: <USHORT>;
  pointer-type-name: <LPRSVP-FILTERSPEC-V4>;
  c-name: "struct _RSVP_FILTERSPEC_V4";
end C-struct <RSVP-FILTERSPEC-V4>;

define C-struct <RSVP-FILTERSPEC-V6>
  sealed inline-only slot Address-value  :: <IN-ADDR-IPV6>;
  sealed inline-only slot UnUsed-value   :: <USHORT>;
  sealed inline-only slot Port-value     :: <USHORT>;
  pointer-type-name: <LPRSVP-FILTERSPEC-V6>;
  c-name: "struct _RSVP_FILTERSPEC_V6";
end C-struct <RSVP-FILTERSPEC-V6>;

define C-struct <RSVP-FILTERSPEC-V6-FLOW>
  sealed inline-only slot Address-value  :: <IN-ADDR-IPV6>;
  sealed inline-only slot UnUsed-value   :: <UCHAR>;
  sealed inline-only array slot FlowLabel-array :: <UCHAR>,
	length: 3, address-getter: FlowLabel-value;
  pointer-type-name: <LPRSVP-FILTERSPEC-V6-FLOW>;
  c-name: "struct _RSVP_FILTERSPEC_V6_FLOW";
end C-struct <RSVP-FILTERSPEC-V6-FLOW>;

define C-struct <RSVP-FILTERSPEC-V4-GPI>
  sealed inline-only slot Address-value  :: <IN-ADDR-IPV4>;
  sealed inline-only slot GeneralPortId-value :: <ULONG>;
  pointer-type-name: <LPRSVP-FILTERSPEC-V4-GPI>;
  c-name: "struct _RSVP_FILTERSPEC_V4_GPI";
end C-struct <RSVP-FILTERSPEC-V4-GPI>;

define C-struct <RSVP-FILTERSPEC-V6-GPI>
  sealed inline-only slot Address-value  :: <IN-ADDR-IPV6>;
  sealed inline-only slot GeneralPortId-value :: <ULONG>;
  pointer-type-name: <LPRSVP-FILTERSPEC-V6-GPI>;
  c-name: "struct _RSVP_FILTERSPEC_V6_GPI";
end C-struct <RSVP-FILTERSPEC-V6-GPI>;
// enum FilterType:
define inline-only constant $FILTERSPECV4 = 1;
define inline-only constant $FILTERSPECV6 = 1 + 1;
define inline-only constant $FILTERSPECV6-FLOW = $FILTERSPECV6 + 1;
define inline-only constant $FILTERSPECV4-GPI = $FILTERSPECV6-FLOW + 1;
define inline-only constant $FILTERSPECV6-GPI = $FILTERSPECV4-GPI + 1;
define inline-only constant $FILTERSPEC-END = $FILTERSPECV6-GPI + 1;

define C-union <u%1>
  sealed inline-only slot FilterSpecV4-value :: <RSVP-FILTERSPEC-V4>;
  sealed inline-only slot FilterSpecV6-value :: <RSVP-FILTERSPEC-V6>;
  sealed inline-only slot FilterSpecV6Flow-value :: <RSVP-FILTERSPEC-V6-FLOW>;
  sealed inline-only slot FilterSpecV4Gpi-value :: <RSVP-FILTERSPEC-V4-GPI>;
  sealed inline-only slot FilterSpecV6Gpi-value :: <RSVP-FILTERSPEC-V6-GPI>;
end;

define C-struct <RSVP-FILTERSPEC>
  sealed inline-only slot Type-value     :: <C-int>;
  sealed inline-only slot u-value        :: <u%1>;
  pointer-type-name: <LPRSVP-FILTERSPEC>;
  c-name: "struct _RSVP_FILTERSPEC";
end C-struct <RSVP-FILTERSPEC>;

define C-struct <FLOWDESCRIPTOR>
  sealed inline-only slot FlowSpec-value :: <FLOWSPEC>;
  sealed inline-only slot NumFilters-value :: <ULONG>;
  sealed inline-only slot FilterList-value :: <LPRSVP-FILTERSPEC>;
  pointer-type-name: <LPFLOWDESCRIPTOR>;
  c-name: "struct _FLOWDESCRIPTOR";
end C-struct <FLOWDESCRIPTOR>;

define C-struct <RSVP-POLICY>
  sealed inline-only slot Type-value     :: <HANDLE>;
  pointer-type-name: <LPRSVP-POLICY>;
  c-name: "struct _RSVP_POLICY";
end C-struct <RSVP-POLICY>;
define inline constant <LPCRSVP-POLICY> =  /* const */ <LPRSVP-POLICY>;

define C-struct <RSVP-RESERVE-INFO>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot Style-value    :: <ULONG>;
  sealed inline-only slot ConfirmRequest-value :: <ULONG>;
  sealed inline-only slot Policy-value   :: <LPRSVP-POLICY>;
  sealed inline-only slot NumFlowDesc-value :: <ULONG>;
  sealed inline-only slot FlowDescList-value :: <LPFLOWDESCRIPTOR>;
  pointer-type-name: <LPRSVP-RESERVE-INFO>;
  c-name: "struct _RSVP_RESERVE_INFO";
end C-struct <RSVP-RESERVE-INFO>;
define inline constant <LPCRSVP-RESERVE-INFO> =  /* const */ <LPRSVP-RESERVE-INFO>;
define inline-only constant $RSVP-WILDCARD-STYLE        = #x00000001;
define inline-only constant $RSVP-FIXED-FILTER-STYLE    = #x00000002;
define inline-only constant $RSVP-SHARED-EXPLICIT-STYLE = #x00000003;

define C-struct <RSVP-STATUS-INFO>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot StatusCode-value :: <ULONG>;
  sealed inline-only slot ExtendedStatus1-value :: <ULONG>;
  sealed inline-only slot ExtendedStatus2-value :: <ULONG>;
  pointer-type-name: <LPRSVP-STATUS-INFO>;
  c-name: "struct _RSVP_STATUS_INFO";
end C-struct <RSVP-STATUS-INFO>;
define inline constant <LPCRSVP-STATUS-INFO> =  /* const */ <LPRSVP-STATUS-INFO>;

define C-struct <QOS-PRIORITY>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot SendPriority-value :: <UCHAR>;
  sealed inline-only slot SendFlags-value :: <UCHAR>;
  sealed inline-only slot ReceivePriority-value :: <UCHAR>;
  sealed inline-only slot Unused-value   :: <UCHAR>;
  pointer-type-name: <LPQOS-PRIORITY>;
  c-name: "struct _QOS_PRIORITY";
end C-struct <QOS-PRIORITY>;

define C-struct <QOS-SD-MODE>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot ShapeDiscardMode-value :: <ULONG>;
  pointer-type-name: <LPQOS-SD-MODE>;
  c-name: "struct _QOS_SD_MODE";
end C-struct <QOS-SD-MODE>;
define inline-only constant $TC-NONCONF-BORROW          =    0;
define inline-only constant $TC-NONCONF-SHAPE           =    1;
define inline-only constant $TC-NONCONF-DISCARD         =    2;

define C-struct <QOS-TRAFFIC-CLASS>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot TrafficClass-value :: <ULONG>;
  pointer-type-name: <LPQOS-TRAFFIC-CLASS>;
  c-name: "struct _QOS_TRAFFIC_CLASS";
end C-struct <QOS-TRAFFIC-CLASS>;

define C-struct <AD-GENERAL-PARAMS>
  sealed inline-only slot IntServAwareHopCount-value :: <ULONG>;
  sealed inline-only slot PathBandwidthEstimate-value :: <ULONG>;
  sealed inline-only slot MinimumLatency-value :: <ULONG>;
  sealed inline-only slot PathMTU-value  :: <ULONG>;
  sealed inline-only slot Flags-value    :: <ULONG>;
  pointer-type-name: <LPAD-GENERAL-PARAMS>;
  c-name: "struct _AD_GENERAL_PARAMS";
end C-struct <AD-GENERAL-PARAMS>;
define inline-only constant $AD-FLAG-BREAK-BIT          = #x00000001;

define C-struct <AD-GUARANTEED>
  sealed inline-only slot CTotal-value   :: <ULONG>;
  sealed inline-only slot DTotal-value   :: <ULONG>;
  sealed inline-only slot CSum-value     :: <ULONG>;
  sealed inline-only slot DSum-value     :: <ULONG>;
  pointer-type-name: <LPAD-GUARANTEED>;
  c-name: "struct _AD_GUARANTEED";
end C-struct <AD-GUARANTEED>;

define C-struct <PARAM-BUFFER>
  sealed inline-only slot ParameterId-value :: <ULONG>;
  sealed inline-only slot Length-value   :: <ULONG>;
  sealed inline-only array slot Buffer-array :: <UCHAR>, length: 1,
	address-getter: Buffer-value;
  pointer-type-name: <LPPARAM-BUFFER>;
  c-name: "struct _PARAM_BUFFER";
end C-struct <PARAM-BUFFER>;
define C-union <u%2>
  sealed inline-only slot Guaranteed-value :: <AD-GUARANTEED>;
  sealed inline-only array slot ParamBuffer-array :: <PARAM-BUFFER>,
	length: 1, address-getter: ParamBuffer-value;
end;

define C-struct <CONTROL-SERVICE>
  sealed inline-only slot Length-value   :: <ULONG>;
  sealed inline-only slot Service-value  :: <SERVICETYPE>;
  sealed inline-only slot Overrides-value :: <AD-GENERAL-PARAMS>;
  sealed inline-only slot u-value        :: <u%2>;
  pointer-type-name: <LPCONTROL-SERVICE>;
  c-name: "struct _CONTROL_SERVICE";
end C-struct <CONTROL-SERVICE>;

define C-struct <RSVP-ADSPEC>
  sealed inline-only slot ObjectHdr-value :: <QOS-OBJECT-HDR>;
  sealed inline-only slot GeneralParams-value :: <AD-GENERAL-PARAMS>;
  sealed inline-only slot NumberOfServices-value :: <ULONG>;
  sealed inline-only array slot Services-array :: <CONTROL-SERVICE>,
	length: 1, address-getter: Services-value;
  pointer-type-name: <LPRSVP-ADSPEC>;
  c-name: "struct _RSVP_ADSPEC";
end C-struct <RSVP-ADSPEC>;

define sealed domain make (singleton(<LPFLOWSPEC>));
define sealed domain initialize (<LPFLOWSPEC>);
define sealed domain make (singleton(<LPQOS-OBJECT-HDR>));
define sealed domain initialize (<LPQOS-OBJECT-HDR>);
define sealed domain make (singleton(<LPIN-ADDR-IPV6>));
define sealed domain initialize (<LPIN-ADDR-IPV6>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC-V4>));
define sealed domain initialize (<LPRSVP-FILTERSPEC-V4>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC-V6>));
define sealed domain initialize (<LPRSVP-FILTERSPEC-V6>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC-V6-FLOW>));
define sealed domain initialize (<LPRSVP-FILTERSPEC-V6-FLOW>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC-V4-GPI>));
define sealed domain initialize (<LPRSVP-FILTERSPEC-V4-GPI>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC-V6-GPI>));
define sealed domain initialize (<LPRSVP-FILTERSPEC-V6-GPI>);
define sealed domain make (singleton(<LPRSVP-FILTERSPEC>));
define sealed domain initialize (<LPRSVP-FILTERSPEC>);
define sealed domain make (singleton(<LPFLOWDESCRIPTOR>));
define sealed domain initialize (<LPFLOWDESCRIPTOR>);
define sealed domain make (singleton(<LPRSVP-POLICY>));
define sealed domain initialize (<LPRSVP-POLICY>);
define sealed domain make (singleton(<LPRSVP-RESERVE-INFO>));
define sealed domain initialize (<LPRSVP-RESERVE-INFO>);
define sealed domain make (singleton(<LPRSVP-STATUS-INFO>));
define sealed domain initialize (<LPRSVP-STATUS-INFO>);
define sealed domain make (singleton(<LPQOS-PRIORITY>));
define sealed domain initialize (<LPQOS-PRIORITY>);
define sealed domain make (singleton(<LPQOS-SD-MODE>));
define sealed domain initialize (<LPQOS-SD-MODE>);
define sealed domain make (singleton(<LPQOS-TRAFFIC-CLASS>));
define sealed domain initialize (<LPQOS-TRAFFIC-CLASS>);
define sealed domain make (singleton(<LPAD-GENERAL-PARAMS>));
define sealed domain initialize (<LPAD-GENERAL-PARAMS>);
define sealed domain make (singleton(<LPAD-GUARANTEED>));
define sealed domain initialize (<LPAD-GUARANTEED>);
define sealed domain make (singleton(<LPPARAM-BUFFER>));
define sealed domain initialize (<LPPARAM-BUFFER>);
define sealed domain make (singleton(<LPCONTROL-SERVICE>));
define sealed domain initialize (<LPCONTROL-SERVICE>);
define sealed domain make (singleton(<LPRSVP-ADSPEC>));
define sealed domain initialize (<LPRSVP-ADSPEC>);
