Admin Production ni-theme
Current Publication

InetTelnetOpen

LabWindows/CVI

InetTelnetOpen

int InetTelnetOpen (const char *telnetServer, unsigned short remotePort, unsigned short localPort);

Purpose

Attempts to open a new Telnet connection with the specified Telnet server and port. Returns a nonnegative integer Telnet handle if the connection attempt succeeds or a negative error code if the connection attempt fails.

Note  This library allows opening a maximum of 1024 concurrent Telnet connections.

Parameters

Input
Name Type Description
telnetServer const char * The name or IP address, in dot notation, of a remote machine running a Telnet server on the specified port.
remotePort unsigned short The port on the specified server with which to establish a Telnet connection. The standard Telnet port is 23.
localPort unsigned short The port on the local machine through which to establish the Telnet connection. Entering 0 forces the system to choose any available port. National Instruments generally recommends entering 0.

Return Value

Name Type Description
telnetHandle int The value that you must use in subsequent function calls to specify this Telnet connection. Negative values indicate that an error occurred.

Additional Information

Library: Internet Library

Include file: cvintwrk.h

LabWindows/CVI compatibility: LabWindows/CVI 7.1 and later

Example

Refer to internet\telnet\telnet.cws for an example of using the InetTelnetOpen function.