TcEnumerateInterfaces function (traffic.h)
The TcEnumerateInterfaces function enumerates all traffic control–enabled network interfaces. Clients are notified of interface changes through the ClNotifyHandler function.
Syntax
ULONG TcEnumerateInterfaces(
[in] HANDLE ClientHandle,
[in, out] PULONG pBufferSize,
[out] PTC_IFC_DESCRIPTOR InterfaceBuffer
);
Parameters
[in] ClientHandle
Handle used by traffic control to identify the client. Clients receive handles when registering with traffic control through the TcRegisterClient function.
[in, out] pBufferSize
Pointer to a value indicating the size of the buffer. For input, this value is the size of the buffer, in bytes, allocated by the caller. For output, this value is the actual size of the buffer, in bytes, used or needed by traffic control. A value of zero on output indicates that no traffic control interfaces are available, indicating that the QOS Packet Scheduler is not installed.
[out] InterfaceBuffer
Pointer to the buffer containing the returned list of interface descriptors.
Return value
Successful completion returns the device name of the interface.
Return code | Description |
---|---|
|
The function executed without errors. |
|
The client handle is invalid. |
|
One of the parameters is NULL. |
|
The buffer is too small to enumerate all interfaces. If this error is returned, the correct (required) size of the buffer is passed back in pBufferSize. |
|
The system is out of memory. |
Remarks
The client calling the TcEnumerateInterfaces function must first allocate a buffer, then pass the buffer to traffic control through InterfaceBuffer. Traffic control returns a pointer to an array of interface descriptors in InterfaceBuffer. Each interface descriptor contains two elements:
- The traffic control interface's identifying text string.
- The network address list descriptor currently associated with the interface.
- For connectionless media such as a LAN, the network address list contains all the protocol-specific addresses associated with the interface.
- For connection-oriented media such as a WAN, the network address list contains an even number of network addresses:
- The first address in each pair represents the local (source) address of the interface.
- The second address in each pair represents the remote (destination) address of the interface.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | traffic.h |
Library | Traffic.lib |
DLL | Traffic.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for