UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:traffic.TcAddFlow |
TcAddFlow function (traffic.h) |
The TcAddFlow function adds a new flow on the specified interface. |
|
qos\tcaddflow.htm |
QOS |
20b4f34b-a84e-4211-8d41-0efa0dbc6cd4 |
12/05/2018 |
TcAddFlow, TcAddFlow function [QOS], _gqos_tcaddflow, qos.tcaddflow, traffic/TcAddFlow |
traffic.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Traffic.lib |
Traffic.dll |
Windows |
19H1 |
|
|
|
|
|
|
The TcAddFlow function adds a new flow on the specified interface. Note that the successful addition of a flow does not necessarily indicate a change in the way traffic is handled; traffic handling changes are effected by attaching a filter to the added flow, using the TcAddFilter function.
Traffic control clients that have registered an AddFlowComplete handler (a mechanism for allowing traffic control to call the ClAddFlowComplete callback function in order to alert clients of completed flow additions) can expect a return value of ERROR_SIGNAL_PENDING. For more information, see Traffic Control Objects.
Handle associated with the interface on which the flow is to be added. This handle is obtained by a previous call to the TcOpenInterface function.
Client provided–flow context handle. Used subsequently by traffic control when referring to the added flow.
Reserved for future use. Must be set to zero.
Pointer to a description of the flow being installed.
Pointer to a location into which traffic control will return the flow handle. This flow handle should be used in subsequent calls to traffic control to refer to the installed flow.
There are many reasons why a request to add a flow might be rejected. Error codes returned by traffic control from calls to TcAddFlow are provided to aid in determining the reason for rejection.
Return code | Description |
---|---|
|
The function executed without errors. |
|
The function is being executed asynchronously; the client will be called back through the client-exposed ClAddFlowComplete function when the flow has been added or when the process has been completed. |
|
The interface handle is invalid. |
|
The system is out of memory. |
|
A parameter is invalid. |
|
An unspecified or bad INTSERV service type has been provided. |
|
An unspecified or bad TOKENRATE value has been provided. |
|
The PEAKBANDWIDTH value is invalid. |
|
The SHAPEDISCARDMODE is invalid. |
|
The priority value is invalid. |
|
The traffic class value is invalid. |
|
There are not enough resources to accommodate the requested flow. |
|
Bad length specified for the TC objects. |
|
Applies to Diffserv flows. Indicates that the QOS_DIFFSERV object was passed with an invalid parameter. |
|
Applies to Diffserv flows. Indicates that the QOS_DIFFSERV_RULE specified in TC_GEN_FLOW already applies to an existing flow on the interface. |
|
The QOS_SHAPING_RATE object was passed with an invalid ShapingRate member. |
|
The QOS_DS_CLASS is invalid. |
|
The network cable is not plugged into the adapter. |
If the TcAddFlow function returns ERROR_SIGNAL_PENDING, the ClAddFlowComplete function will be called on a different thread than the thread that called the TcAddFlow function.
Only the addition of a filter will affect traffic control. However, the addition of a flow will cause resources to be committed within traffic control components. This enables traffic control to prepare for handling traffic on the added flow.
Traffic control may delete a flow for various reasons, including the inability to accommodate the flow due to bandwidth restrictions, and adjusted policy requirements. Clients are notified of deleted flows through the ClNotifyHandler callback function, with the TC_NOTIFY_FLOW_CLOSE event.