GetTeredoPort function (netioapi.h)
The GetTeredoPort function retrieves the dynamic UDP port number used by the Teredo client on the local computer.
IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API GetTeredoPort( USHORT *Port );
A pointer to the UDP port number. On successful return, this parameter will be filled with the port number used by the Teredo client.
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
||An invalid parameter was passed to the function. This error is returned if a NULL pointer is passed in the Port parameter.|
||The device is not ready. This error is returned if the Teredo client is not started on the local computer.|
||The request is not supported. This error is returned if no IPv6 stack is on the local computer.|
||Use FormatMessage to obtain the message string for the returned error.|
The GetTeredoPort function is defined on Windows Vista and later.
The GetTeredoPort function retrieves the current UDP port number used by the Teredo client for the Teredo service port. The Teredo port is dynamic and can change any time the Teredo client is restarted on the local computer. An application can register to be notified when the Teredo service port changes by calling the NotifyTeredoPortChange function.
The Teredo client also uses static UDP port 3544 for listening to multicast traffic sent on multicast IPv4 address 126.96.36.199 as defined in RFC 4380. For more information, see http://www.ietf.org/rfc/rfc4380.txt.
The GetTeredoPort function is used primarily by firewall applications in order to configure the appropriate exceptions to allow incoming and outgoing Teredo traffic.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||netioapi.h (include Iphlpapi.h)|