# 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.

## 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 | integer | The value that you must use in subsequent function calls to specify this Telnet connection. Negative values indicate that an error occurred.