FLOWSPEC

typedef struct _flowspec {
    uint32        TokenRate;            /* In Bytes/sec    */
    uint32        TokenBucketSize;      /* In Bytes        */
    uint32        PeakBandwidth;        /* In Bytes/sec    */
    uint32        Latency;              /* In microseconds */
    uint32        DelayVariation;       /* In microseconds */
    SERVICETYPE   ServiceType;          /* Guaranteed, Predictive, */
                                        /* Best Effort, etc.  */
   uint32         MaxSduSize            /* In Bytes           */
   uint32         MinimumPolicedSize    /* In Bytes           */
} FLOWSPEC, *PFLOWSPEC,  FAR * LPFLOWSPEC;

typedef struc _QualityOfService {
    FLOWSPECSendingFlowspec/*The flowspec for data sending*/
    FLOWSPECReceivingFlowspec/*Theflowspec for data receiving*/
    WSABUFProviderSpecific/*Additonal Provider*/
} QOS, FAR * LPQOS;
 

Members

TokenRate
A token bucket model is used to specify the rate at which permission to send traffic (or credits) accrues. In the model, the token bucket has a maximum volume (TokenBucketSize) and continuously fills at a certain rate, (TokenRate). If the bucket contains sufficient credit, the application can send data and reduce the available credit by that amount. If sufficient credits are not available, the application must wait or discard the extra traffic.

A value of -1 in the members TokenRate and TokenBucketSize indicates that no rate-limiting is in force. The TokenRate is expressed in bytes per second.

If an application has been sending at a low rate for a period of time, it can send a large burst of data all at once until it runs out of credit. Having done so, it must limit itself to sending at TokenRate until its data burst is exhausted.

In video applications, the TokenRate is typically the average bit rate peak to peak. In constant rate applications, the TokenRate is equal to the PeakBandwidth.

TokenBucketSize
Largest typical frame size in video applications, expressed in bytes. In constant rate applications, the TokenBucketSize is chosen to accommodate small variations.
PeakBandwidth
Limits how fast packets may be sent back to back from the application, expressed in bytes/second. Some intermediate systems can take advantage of this information resulting in a more efficient resource allocation.
Latency
Maximum acceptable delay between transmission of a bit by the sender and its receipt by the intended receiver or receivers, expressed in microseconds. The precise interpretation of this number depends on the level of guarantee specified in the QOS request.
DelayVariation
Difference, in microseconds, between the maximum and minimum possible delay that a packet will experience. This value is used by applications to determine the amount of buffer space needed at the receiving side in order to restore the original data transmission pattern.
ServiceType
Contains the value of the level of service to negotiate for the flow. The following ServiceTypes have been defined.
SERVICETYPE_NOTRAFFIC
In either the sending or receiving flow specification, this value indicates that there will be no traffic in this direction. On duplex capable media, this signals underlying software to set up unidirectional connections only.
SERVICETYPE_BESTEFFORT
The service provider takes the FLOWSPEC as a guideline and makes reasonable efforts to maintain the level of service requested, without making any guarantees on packet delivery.
SERVICETYPE_CONTROLLEDLOAD
Denotes that end-to-end behavior, provided to an application by a series of network elements, tightly approximates the behavior visible to applications receiving best-effort service "under unloaded conditions" from the same series of network elements. Thus, applications using this service may assume that: (1) A very high percentage of transmitted packets will be successfully delivered by the network to the receiving end notes. (Packet loss rate will closely approximate the basic packet error rate of the transmission medium.) and (2) Transit delay experienced by a very high percentage of the delivered packets will not greatly exceed the minimum transit delay experienced by any successfully delivered packet at the speed of light.
SERVICETYPE_GUARANTEED
The service provider implements a queuing algorithm which isolates the flow from the effects of other flows as much as possible and guarantees the flow the ability to propagate data at the TokenRate for the duration of the connection. If the sender sends faster than the TokenRate, the network may delay or discard the excess traffic. If the sender does not exceed the TokenRate over time, then Latency is also guaranteed. This ServiceType is designed for applications that require a precisely known quality of service but world not benefit from better service, such as real-time control systems.
SERVICETYPE_NETWORK UNAVAILABLE
In either sending or receiving flow specifications, this value may be used by a service provider to indicate a loss of service in the corresponding direction.
SERVICETYPE_GENERAL_INFORMATION
All service types are supported for this traffic flow.
SERVICETYPE_NOCHANGE
In either sending or receiving flow specifications, this level of service requests that the quality of service in the corresponding direction is not changed. ServiceType_NoChange can be used when requesting a QOS change in one direction only, or when requesting a change only in the ProvderSpecific part of a QOS specification and not in the SendingFlowspec or the ReceivingFlowspec.
SERVICETYPE_IMMEDIATE_TRAFFIC_CONROL
In either a Sending or Receiving flowspec, this may be combined using bit-wise OR with one of the other defined ServiceType values to request the service provider to activate traffic control coincident with provision of the FLOWSPEC.
MaxSduSize
The maximum packet size, in bytes, that is permitted or used in the traffic flow.
MinimumPolicedSize
The minimum packet size that will be given the level of service requested.