Libssh2 channel request pty ex

From Libssh2

int libssh2_channel_request_pty_ex(LIBSSH2_CHANNEL *channel, 
            char *term, int term_len,
            char *modes, int modes_len,
            int width, int height,
            int width_px, int height_px);
#define libssh2_channel_request_pty(channel, term)
        libssh2_channel_request_pty_ex((channel), 
        (term), strlen(term),NULL, 0,
        LIBSSH2_TERM_WIDTH, LIBSSH2_TERM_HEIGHT,
        LIBSSH2_TERM_WIDTH_PX, LIBSSH2_TERM_HEIGHT_PX)

About

Request a PTY on an established channel. Note that this does not make sense for all channel types and may be ignored by the server despite returning success.

Parameters

  • channel
    Previously opened channel instance such as returned by libssh2_channel_open_session().
  • term
    Terminal emulation (e.g. vt102, ansi, etc...)
  • term_len
    Length of term parameter
  • modes
    Terminal mode modifier values
  • modes_len
    Length of modes parameter.
  • width
    Width of pty in characters
  • height
    Height of pty in characters
  • width_px
    Width of pty in pixels
  • height_px
    Height of pty in pixels

Returns

  • On Success: 0
  • On Failure: -1