AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/addons/telnet/nxd_telnet_client.c
UINT  _nx_telnet_client_connect(NX_TELNET_CLIENT *client_ptr, ULONG server_ip_address, 
                                UINT server_port, ULONG wait_option)
{
#ifndef NX_DISABLE_IPV4
NXD_ADDRESS server_ipduo_address;

    /* Construct an IP address structure, and fill in IPv4 address information. */
    server_ipduo_address.nxd_ip_version = NX_IP_VERSION_V4;
    server_ipduo_address.nxd_ip_address.v4 = server_ip_address;

    /* Invoke the real connection call. */
    return (_nxd_telnet_client_connect(client_ptr, &server_ipduo_address, server_port, wait_option));
#else
    NX_PARAMETER_NOT_USED(client_ptr);
    NX_PARAMETER_NOT_USED(server_ip_address);
    NX_PARAMETER_NOT_USED(server_port);
    NX_PARAMETER_NOT_USED(wait_option);

    return(NX_NOT_SUPPORTED);
#endif /* NX_DISABLE_IPV4 */
}
/**************************************************************************/
/*                                                                        */
/*  FUNCTION                                               RELEASE        */
/*                                                                        */
/*    _nx_telnet_client_connect                           PORTABLE C      */
/*                                                           6.1          */
/*  AUTHOR                                                                */
/*                                                                        */
/*    Yuxin Zhou, Microsoft Corporation                                   */
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*    This function converts the IPv4 address to a NetX Duo NXD_ADDRESS   */
/*    data and forwarded to the NetX Duo Telnet connect function,         */
/*    nxd_telnet_client_connect to connect a previously created TELNET    */
/*    instance with the TCP port at the specified IPv4 address.           */
/*                                                                        */
/*    This serves primarily as a wrapper function for backward            */
/*    compatibility with NetX Telnet applications.                        */
/*                                                                        */
/*                                                                        */
/*  INPUT                                                                 */
/*                                                                        */
/*    client_ptr                            Pointer to TELNET client      */
/*    server_ip_address                     TELNET server IPv4 address    */
/*    server_port                           Server TCP port (usually 23)  */
/*    wait_option                           Specifies how long to wait    */
/*                                                                        */
/*  OUTPUT                                                                */
/*                                                                        */
/*    status                                Completion status             */
/*                                                                        */
/*  CALLS                                                                 */
/*                                                                        */
/*    nxd_tcp_client_socket_connect         Connect to TELNET server      */
/*                                                                        */
/*  CALLED BY                                                             */
/*                                                                        */
/*    Application Code                                                    */
/*                                                                        */
/*  RELEASE HISTORY                                                       */
/*                                                                        */
/*    DATE              NAME                      DESCRIPTION             */
/*                                                                        */
/*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
/*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
/*                                            resulting in version 6.1    */
/*                                                                        */
/**************************************************************************/
FUNCTION                                               RELEASE

_nx_telnet_client_connect                           PORTABLE C
6.1
AUTHOR

Yuxin Zhou, Microsoft Corporation

DESCRIPTION

This function converts the IPv4 address to a NetX Duo NXD_ADDRESS
data and forwarded to the NetX Duo Telnet connect function,
nxd_telnet_client_connect to connect a previously created TELNET
instance with the TCP port at the specified IPv4 address.

This serves primarily as a wrapper function for backward
compatibility with NetX Telnet applications.

INPUT

client_ptr                            Pointer to TELNET client
server_ip_address                     TELNET server IPv4 address
server_port                           Server TCP port (usually 23)
wait_option                           Specifies how long to wait

OUTPUT

status                                Completion status

CALLS

nxd_tcp_client_socket_connect         Connect to TELNET server

CALLED BY

Application Code

RELEASE HISTORY

DATE              NAME                      DESCRIPTION

05-19-2020     Yuxin Zhou               Initial Version 6.0
09-30-2020     Yuxin Zhou               Modified comment(s),
resulting in version 6.1
FUNCTION RELEASE _nx_telnet_client_connect PORTABLE C 6 . 1 AUTHOR Yuxin Zhou Microsoft Corporation DESCRIPTION This function converts the IPv4 address to a NetX Duo NXD_ADDRESS data and forwarded to the NetX Duo Telnet connect function nxd_telnet_client_connect to connect a previously created TELNET instance with the TCP port at the specified IPv4 address . This serves primarily as a wrapper function for backward compatibility with NetX Telnet applications . INPUT client_ptr Pointer to TELNET client server_ip_address TELNET server IPv4 address server_port Server TCP port ( usually 23 ) wait_option Specifies how long to wait OUTPUT status Completion status CALLS nxd_tcp_client_socket_connect Connect to TELNET server CALLED BY Application Code RELEASE HISTORY DATE NAME DESCRIPTION 05 - 19 - 2020 Yuxin Zhou Initial Version 6 . 0 09 - 30 - 2020 Yuxin Zhou Modified comment ( s ) resulting in version 6 . 1
UINT  _nx_telnet_client_connect(NX_TELNET_CLIENT *client_ptr, ULONG server_ip_address, 
                                UINT server_port, ULONG wait_option)
{
#ifndef NX_DISABLE_IPV4
NXD_ADDRESS server_ipduo_address;
    server_ipduo_address.nxd_ip_version = NX_IP_VERSION_V4;
    server_ipduo_address.nxd_ip_address.v4 = server_ip_address;
    return (_nxd_telnet_client_connect(client_ptr, &server_ipduo_address, server_port, wait_option));
#else
    NX_PARAMETER_NOT_USED(client_ptr);
    NX_PARAMETER_NOT_USED(server_ip_address);
    NX_PARAMETER_NOT_USED(server_port);
    NX_PARAMETER_NOT_USED(wait_option);
    return(NX_NOT_SUPPORTED);
#endif 
}
UINT _nx_telnet_client_connect ( NX_TELNET_CLIENT * client_ptr , ULONG server_ip_address , UINT server_port , ULONG wait_option ) { #ifndef NX_DISABLE_IPV4 NXD_ADDRESS server_ipduo_address ; server_ipduo_address . nxd_ip_version = NX_IP_VERSION_V4 ; server_ipduo_address . nxd_ip_address . v4 = server_ip_address ; return ( _nxd_telnet_client_connect ( client_ptr , & server_ipduo_address , server_port , wait_option ) ) ; #else NX_PARAMETER_NOT_USED ( client_ptr ) ; NX_PARAMETER_NOT_USED ( server_ip_address ) ; NX_PARAMETER_NOT_USED ( server_port ) ; NX_PARAMETER_NOT_USED ( wait_option ) ; return ( NX_NOT_SUPPORTED ) ; #endif }
FUNCTION                                               RELEASE
FUNCTION RELEASE
/* Construct an IP address structure, and fill in IPv4 address information. */ /* Invoke the real connection call. */ /* NX_DISABLE_IPV4 */