comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.sandberg@sandat.dyndns.org>
Subject: Re: library/binding for sftp?
Date: Thu, 22 Aug 2013 07:53:21 +0200
Date: 2013-08-22T07:53:21+02:00	[thread overview]
Message-ID: <20130822075321.4314ecf4@lufsen.sandat.dyndns.org> (raw)
In-Reply-To: fa5a2986-7569-4060-8d02-063f9d229ccb@googlegroups.com

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]


gcc -fdump-ada-spec =>

It requires a wrapper to be Ada not C written in Ada but anyway.

/Per

On Wed, 21 Aug 2013 09:46:55 -0700 (PDT)
Alan Jump <alan.jump@gmail.com> wrote:

> On Wednesday, August 21, 2013 12:27:30 AM UTC-7,
> Stefan...@uni-weimar.de wrote:
> > On Tue, 20 Aug 2013, Randy Brukardt wrote:
> > 
> [snip] 
> > 
> > ------  I  love  the  taste  of  Cryptanalysis  in  the morning!
> > ------
> 
> One final thought which goes directly back to the OP's questions.
> 
> I'd love to see an Ada binding for SFTP or a similar
> relatively-secure transfer protocol released to an open-source
> repository. It would certainly relieve in-house developers from
> having to come up with their own implementations, and by placing such
> in an open-source repository, it would invite inspection from outside
> which may reveal dangerous flaws prior to widespread deployment.
> 
> Even though data transfers may be monitored, and with sufficient
> effort the contents of the packets extracted, there's absolutely
> nothing that says one can't implement one or more additional
> encryption layers prior to transmission. Think "belt and suspenders".
> Or, in a more relevant comparison, encrypting an email using GPG,
> Enigma, one-time pad, or whatever, then sending it via an encrypted
> VPN tunnel.
> 
> Just my 2p worth. Save up the change for a pint.
> 
> - -
> 73 de N5ILN
> Alan


[-- Attachment #2: libssh2_h.ads --]
[-- Type: text/x-adasrc, Size: 47013 bytes --]

pragma Ada_2005;
pragma Style_Checks (Off);

with Interfaces.C; use Interfaces.C;
with Interfaces.C.Extensions;
with Interfaces.C.Strings;
with System;

package libssh2_h is
   package time_h is

      subtype clock_t is long;  -- time.h:60

      subtype time_t is long;  -- time.h:76

      subtype clockid_t is int;  -- time.h:92

      subtype timer_t is System.Address;  -- time.h:104

      type timespec is record
         tv_sec : aliased long;  -- time.h:122
         tv_nsec : aliased long;  -- time.h:123
      end record;
      pragma Convention (C_Pass_By_Copy, timespec);  -- time.h:120

   end time_h;


   package bits_stat_h is

      --  unsupported macro: st_atime st_atim.tv_sec
      --  unsupported macro: st_mtime st_mtim.tv_sec
      --  unsupported macro: st_ctime st_ctim.tv_sec

      UTIME_NOW : constant := ((2 ** 30) - 1);  --  bits/stat.h:209
      UTIME_OMIT : constant := ((2 ** 30) - 2);  --  bits/stat.h:210

      type stat_uu_unused_array is array (0 .. 2) of aliased long;
      type stat is record
         st_dev : aliased unsigned_long;  -- bits/stat.h:48
         st_ino : aliased unsigned_long;  -- bits/stat.h:53
         st_nlink : aliased unsigned_long;  -- bits/stat.h:61
         st_mode : aliased unsigned;  -- bits/stat.h:62
         st_uid : aliased unsigned;  -- bits/stat.h:64
         st_gid : aliased unsigned;  -- bits/stat.h:65
         uu_pad0 : aliased int;  -- bits/stat.h:67
         st_rdev : aliased unsigned_long;  -- bits/stat.h:69
         st_size : aliased long;  -- bits/stat.h:74
         st_blksize : aliased long;  -- bits/stat.h:78
         st_blocks : aliased long;  -- bits/stat.h:80
         st_atim : aliased time_h.timespec;  -- bits/stat.h:91
         st_mtim : aliased time_h.timespec;  -- bits/stat.h:92
         st_ctim : aliased time_h.timespec;  -- bits/stat.h:93
         uu_unused : aliased stat_uu_unused_array;  -- bits/stat.h:106
      end record;
      pragma Convention (C_Pass_By_Copy, stat);  -- bits/stat.h:46

      type stat64_uu_unused_array is array (0 .. 2) of aliased long;
      type stat64 is record
         st_dev : aliased unsigned_long;  -- bits/stat.h:121
         st_ino : aliased unsigned_long;  -- bits/stat.h:123
         st_nlink : aliased unsigned_long;  -- bits/stat.h:124
         st_mode : aliased unsigned;  -- bits/stat.h:125
         st_uid : aliased unsigned;  -- bits/stat.h:132
         st_gid : aliased unsigned;  -- bits/stat.h:133
         uu_pad0 : aliased int;  -- bits/stat.h:135
         st_rdev : aliased unsigned_long;  -- bits/stat.h:136
         st_size : aliased long;  -- bits/stat.h:137
         st_blksize : aliased long;  -- bits/stat.h:143
         st_blocks : aliased long;  -- bits/stat.h:144
         st_atim : aliased time_h.timespec;  -- bits/stat.h:152
         st_mtim : aliased time_h.timespec;  -- bits/stat.h:153
         st_ctim : aliased time_h.timespec;  -- bits/stat.h:154
         uu_unused : aliased stat64_uu_unused_array;  -- bits/stat.h:167
      end record;
      pragma Convention (C_Pass_By_Copy, stat64);  -- bits/stat.h:119

   end bits_stat_h;

   LIBSSH2_H : constant := 1;  --  libssh2.h:41

   LIBSSH2_COPYRIGHT : aliased constant String := "2004-2010 The libssh2 project and its contributors." & ASCII.NUL;  --  libssh2.h:43

   LIBSSH2_VERSION : aliased constant String := "1.2.7" & ASCII.NUL;  --  libssh2.h:49

   LIBSSH2_VERSION_MAJOR : constant := 1;  --  libssh2.h:53
   LIBSSH2_VERSION_MINOR : constant := 2;  --  libssh2.h:54
   LIBSSH2_VERSION_PATCH : constant := 7;  --  libssh2.h:55

   LIBSSH2_VERSION_NUM : constant := 16#010207#;  --  libssh2.h:72

   LIBSSH2_TIMESTAMP : aliased constant String := "Tue Aug 17 21:11:33 UTC 2010" & ASCII.NUL;  --  libssh2.h:83
   --  unsupported macro: LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_" LIBSSH2_VERSION
   --  unsupported macro: LIBSSH2_SSH_DEFAULT_BANNER LIBSSH2_SSH_BANNER
   --  unsupported macro: LIBSSH2_SSH_DEFAULT_BANNER_WITH_CRLF LIBSSH2_SSH_DEFAULT_BANNER "\r\n"

   LIBSSH2_DH_GEX_MINGROUP : constant := 1024;  --  libssh2.h:142
   LIBSSH2_DH_GEX_OPTGROUP : constant := 1536;  --  libssh2.h:143
   LIBSSH2_DH_GEX_MAXGROUP : constant := 2048;  --  libssh2.h:144

   LIBSSH2_TERM_WIDTH : constant := 80;  --  libssh2.h:147
   LIBSSH2_TERM_HEIGHT : constant := 24;  --  libssh2.h:148
   LIBSSH2_TERM_WIDTH_PX : constant := 0;  --  libssh2.h:149
   LIBSSH2_TERM_HEIGHT_PX : constant := 0;  --  libssh2.h:150

   LIBSSH2_SOCKET_POLL_UDELAY : constant := 250000;  --  libssh2.h:153

   LIBSSH2_SOCKET_POLL_MAXLOOPS : constant := 120;  --  libssh2.h:155

   LIBSSH2_PACKET_MAXCOMP : constant := 32000;  --  libssh2.h:159

   LIBSSH2_PACKET_MAXDECOMP : constant := 40000;  --  libssh2.h:163

   LIBSSH2_PACKET_MAXPAYLOAD : constant := 40000;  --  libssh2.h:167
   --  arg-macro: procedure LIBSSH2_ALLOC_FUNC (name)
   --    void *name(size_t count, void **abstract)
   --  arg-macro: procedure LIBSSH2_REALLOC_FUNC (name)
   --    void *name(void *ptr, size_t count, void **abstract)
   --  arg-macro: procedure LIBSSH2_FREE_FUNC (name)
   --    void name(void *ptr, void **abstract)
   --  arg-macro: procedure LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC (name)
   --    int name(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC (name_)
   --    void name_(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract)
   --  arg-macro: procedure LIBSSH2_IGNORE_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, const char *message, int message_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_DEBUG_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, int always_display, const char *message, int message_len, const char *language, int language_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_DISCONNECT_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, int reason, const char *message, int message_len, const char *language, int language_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_PASSWD_CHANGEREQ_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, char **newpw, int *newpw_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_MACERROR_FUNC (name)
   --    int name(LIBSSH2_SESSION *session, const char *packet, int packet_len, void **abstract)
   --  arg-macro: procedure LIBSSH2_X11_OPEN_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, LIBSSH2_CHANNEL *channel, const char *shost, int sport, void **abstract)
   --  arg-macro: procedure LIBSSH2_CHANNEL_CLOSE_FUNC (name)
   --    void name(LIBSSH2_SESSION *session, void **session_abstract, LIBSSH2_CHANNEL *channel, void **channel_abstract)

   LIBSSH2_CALLBACK_IGNORE : constant := 0;  --  libssh2.h:232
   LIBSSH2_CALLBACK_DEBUG : constant := 1;  --  libssh2.h:233
   LIBSSH2_CALLBACK_DISCONNECT : constant := 2;  --  libssh2.h:234
   LIBSSH2_CALLBACK_MACERROR : constant := 3;  --  libssh2.h:235
   LIBSSH2_CALLBACK_X11 : constant := 4;  --  libssh2.h:236

   LIBSSH2_METHOD_KEX : constant := 0;  --  libssh2.h:239
   LIBSSH2_METHOD_HOSTKEY : constant := 1;  --  libssh2.h:240
   LIBSSH2_METHOD_CRYPT_CS : constant := 2;  --  libssh2.h:241
   LIBSSH2_METHOD_CRYPT_SC : constant := 3;  --  libssh2.h:242
   LIBSSH2_METHOD_MAC_CS : constant := 4;  --  libssh2.h:243
   LIBSSH2_METHOD_MAC_SC : constant := 5;  --  libssh2.h:244
   LIBSSH2_METHOD_COMP_CS : constant := 6;  --  libssh2.h:245
   LIBSSH2_METHOD_COMP_SC : constant := 7;  --  libssh2.h:246
   LIBSSH2_METHOD_LANG_CS : constant := 8;  --  libssh2.h:247
   LIBSSH2_METHOD_LANG_SC : constant := 9;  --  libssh2.h:248

   LIBSSH2_FLAG_SIGPIPE : constant := 16#00000001#;  --  libssh2.h:251

   LIBSSH2_POLLFD_SOCKET : constant := 1;  --  libssh2.h:274
   LIBSSH2_POLLFD_CHANNEL : constant := 2;  --  libssh2.h:275
   LIBSSH2_POLLFD_LISTENER : constant := 3;  --  libssh2.h:276

   LIBSSH2_POLLFD_POLLIN : constant := 16#0001#;  --  libssh2.h:281

   LIBSSH2_POLLFD_POLLPRI : constant := 16#0002#;  --  libssh2.h:284

   LIBSSH2_POLLFD_POLLEXT : constant := 16#0002#;  --  libssh2.h:286

   LIBSSH2_POLLFD_POLLOUT : constant := 16#0004#;  --  libssh2.h:288

   LIBSSH2_POLLFD_POLLERR : constant := 16#0008#;  --  libssh2.h:291
   LIBSSH2_POLLFD_POLLHUP : constant := 16#0010#;  --  libssh2.h:292
   LIBSSH2_POLLFD_SESSION_CLOSED : constant := 16#0010#;  --  libssh2.h:293
   LIBSSH2_POLLFD_POLLNVAL : constant := 16#0020#;  --  libssh2.h:294

   LIBSSH2_POLLFD_POLLEX : constant := 16#0040#;  --  libssh2.h:296

   LIBSSH2_POLLFD_CHANNEL_CLOSED : constant := 16#0080#;  --  libssh2.h:298
   LIBSSH2_POLLFD_LISTENER_CLOSED : constant := 16#0080#;  --  libssh2.h:299

   LIBSSH2_SESSION_BLOCK_INBOUND : constant := 16#0001#;  --  libssh2.h:303
   LIBSSH2_SESSION_BLOCK_OUTBOUND : constant := 16#0002#;  --  libssh2.h:304

   LIBSSH2_HOSTKEY_HASH_MD5 : constant := 1;  --  libssh2.h:307
   LIBSSH2_HOSTKEY_HASH_SHA1 : constant := 2;  --  libssh2.h:308

   LIBSSH2_HOSTKEY_TYPE_UNKNOWN : constant := 0;  --  libssh2.h:311
   LIBSSH2_HOSTKEY_TYPE_RSA : constant := 1;  --  libssh2.h:312
   LIBSSH2_HOSTKEY_TYPE_DSS : constant := 2;  --  libssh2.h:313

   SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT : constant := 1;  --  libssh2.h:316
   SSH_DISCONNECT_PROTOCOL_ERROR : constant := 2;  --  libssh2.h:317
   SSH_DISCONNECT_KEY_EXCHANGE_FAILED : constant := 3;  --  libssh2.h:318
   SSH_DISCONNECT_RESERVED : constant := 4;  --  libssh2.h:319
   SSH_DISCONNECT_MAC_ERROR : constant := 5;  --  libssh2.h:320
   SSH_DISCONNECT_COMPRESSION_ERROR : constant := 6;  --  libssh2.h:321
   SSH_DISCONNECT_SERVICE_NOT_AVAILABLE : constant := 7;  --  libssh2.h:322
   SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED : constant := 8;  --  libssh2.h:323
   SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE : constant := 9;  --  libssh2.h:324
   SSH_DISCONNECT_CONNECTION_LOST : constant := 10;  --  libssh2.h:325
   SSH_DISCONNECT_BY_APPLICATION : constant := 11;  --  libssh2.h:326
   SSH_DISCONNECT_TOO_MANY_CONNECTIONS : constant := 12;  --  libssh2.h:327
   SSH_DISCONNECT_AUTH_CANCELLED_BY_USER : constant := 13;  --  libssh2.h:328
   SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE : constant := 14;  --  libssh2.h:329
   SSH_DISCONNECT_ILLEGAL_USER_NAME : constant := 15;  --  libssh2.h:330

   LIBSSH2_ERROR_NONE : constant := 0;  --  libssh2.h:333
   LIBSSH2_ERROR_SOCKET_NONE : constant := -1;  --  libssh2.h:334
   LIBSSH2_ERROR_BANNER_NONE : constant := -2;  --  libssh2.h:335
   LIBSSH2_ERROR_BANNER_SEND : constant := -3;  --  libssh2.h:336
   LIBSSH2_ERROR_INVALID_MAC : constant := -4;  --  libssh2.h:337
   LIBSSH2_ERROR_KEX_FAILURE : constant := -5;  --  libssh2.h:338
   LIBSSH2_ERROR_ALLOC : constant := -6;  --  libssh2.h:339
   LIBSSH2_ERROR_SOCKET_SEND : constant := -7;  --  libssh2.h:340
   LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE : constant := -8;  --  libssh2.h:341
   LIBSSH2_ERROR_TIMEOUT : constant := -9;  --  libssh2.h:342
   LIBSSH2_ERROR_HOSTKEY_INIT : constant := -10;  --  libssh2.h:343
   LIBSSH2_ERROR_HOSTKEY_SIGN : constant := -11;  --  libssh2.h:344
   LIBSSH2_ERROR_DECRYPT : constant := -12;  --  libssh2.h:345
   LIBSSH2_ERROR_SOCKET_DISCONNECT : constant := -13;  --  libssh2.h:346
   LIBSSH2_ERROR_PROTO : constant := -14;  --  libssh2.h:347
   LIBSSH2_ERROR_PASSWORD_EXPIRED : constant := -15;  --  libssh2.h:348
   LIBSSH2_ERROR_FILE : constant := -16;  --  libssh2.h:349
   LIBSSH2_ERROR_METHOD_NONE : constant := -17;  --  libssh2.h:350
   LIBSSH2_ERROR_AUTHENTICATION_FAILED : constant := -18;  --  libssh2.h:351
   --  unsupported macro: LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED LIBSSH2_ERROR_AUTHENTICATION_FAILED

   LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED : constant := -19;  --  libssh2.h:353
   LIBSSH2_ERROR_CHANNEL_OUTOFORDER : constant := -20;  --  libssh2.h:354
   LIBSSH2_ERROR_CHANNEL_FAILURE : constant := -21;  --  libssh2.h:355
   LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED : constant := -22;  --  libssh2.h:356
   LIBSSH2_ERROR_CHANNEL_UNKNOWN : constant := -23;  --  libssh2.h:357
   LIBSSH2_ERROR_CHANNEL_WINDOW_EXCEEDED : constant := -24;  --  libssh2.h:358
   LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED : constant := -25;  --  libssh2.h:359
   LIBSSH2_ERROR_CHANNEL_CLOSED : constant := -26;  --  libssh2.h:360
   LIBSSH2_ERROR_CHANNEL_EOF_SENT : constant := -27;  --  libssh2.h:361
   LIBSSH2_ERROR_SCP_PROTOCOL : constant := -28;  --  libssh2.h:362
   LIBSSH2_ERROR_ZLIB : constant := -29;  --  libssh2.h:363
   LIBSSH2_ERROR_SOCKET_TIMEOUT : constant := -30;  --  libssh2.h:364
   LIBSSH2_ERROR_SFTP_PROTOCOL : constant := -31;  --  libssh2.h:365
   LIBSSH2_ERROR_REQUEST_DENIED : constant := -32;  --  libssh2.h:366
   LIBSSH2_ERROR_METHOD_NOT_SUPPORTED : constant := -33;  --  libssh2.h:367
   LIBSSH2_ERROR_INVAL : constant := -34;  --  libssh2.h:368
   LIBSSH2_ERROR_INVALID_POLL_TYPE : constant := -35;  --  libssh2.h:369
   LIBSSH2_ERROR_PUBLICKEY_PROTOCOL : constant := -36;  --  libssh2.h:370
   LIBSSH2_ERROR_EAGAIN : constant := -37;  --  libssh2.h:371
   LIBSSH2_ERROR_BUFFER_TOO_SMALL : constant := -38;  --  libssh2.h:372
   LIBSSH2_ERROR_BAD_USE : constant := -39;  --  libssh2.h:373
   LIBSSH2_ERROR_COMPRESS : constant := -40;  --  libssh2.h:374
   LIBSSH2_ERROR_OUT_OF_BOUNDARY : constant := -41;  --  libssh2.h:375
   LIBSSH2_ERROR_AGENT_PROTOCOL : constant := -42;  --  libssh2.h:376

   LIBSSH2_INIT_NO_CRYPTO : constant := 16#0001#;  --  libssh2.h:379
   --  arg-macro: procedure libssh2_session_init ()
   --    libssh2_session_init_ex(NULL, NULL, NULL, NULL)
   --  arg-macro: procedure libssh2_session_disconnect (session, descrilibssh2_session_disconnect_ex((session), SSH_DISCONNECT_BY_APPLICATION, (description), "")
   --    libssh2_session_disconnect_ex((session), SSH_DISCONNECT_BY_APPLICATION, (description), "")
   --  arg-macro: procedure libssh2_userauth_password (session, usernalibssh2_userauth_password_ex((session), (username), strlen(username), (password), strlen(password), NULL)
   --    libssh2_userauth_password_ex((session), (username), strlen(username), (password), strlen(password), NULL)
   --  arg-macro: procedure libssh2_userauth_publickey_fromfile (session, usernalibssh2_userauth_publickey_fromfile_ex((session), (username), strlen(username), (publickey), (privatekey), (passphrase))
   --    libssh2_userauth_publickey_fromfile_ex((session), (username), strlen(username), (publickey), (privatekey), (passphrase))
   --  arg-macro: procedure libssh2_userauth_hostbased_fromfile (session, usernalibssh2_userauth_hostbased_fromfile_ex((session), (username), strlen(username), (publickey), (privatekey), (passphrase), (hostname), strlen(hostname), (username), strlen(username))
   --    libssh2_userauth_hostbased_fromfile_ex((session), (username), strlen(username), (publickey), (privatekey), (passphrase), (hostname), strlen(hostname), (username), strlen(username))
   --  arg-macro: procedure libssh2_userauth_keyboard_interactive (session, usernalibssh2_userauth_keyboard_interactive_ex((session), (username), strlen(username), (response_callback))
   --    libssh2_userauth_keyboard_interactive_ex((session), (username), strlen(username), (response_callback))

   LIBSSH2_CHANNEL_WINDOW_DEFAULT : constant := 65536;  --  libssh2.h:529
   LIBSSH2_CHANNEL_PACKET_DEFAULT : constant := 32768;  --  libssh2.h:530
   LIBSSH2_CHANNEL_MINADJUST : constant := 1024;  --  libssh2.h:531

   LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL : constant := 0;  --  libssh2.h:534
   LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE : constant := 1;  --  libssh2.h:535
   LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE : constant := 2;  --  libssh2.h:536

   SSH_EXTENDED_DATA_STDERR : constant := 1;  --  libssh2.h:538
   --  unsupported macro: LIBSSH2CHANNEL_EAGAIN LIBSSH2_ERROR_EAGAIN
   --  arg-macro: procedure libssh2_channel_open_session (session)
   --    libssh2_channel_open_ex((session), "session", sizeof("session") - 1, LIBSSH2_CHANNEL_WINDOW_DEFAULT, LIBSSH2_CHANNEL_PACKET_DEFAULT, NULL, 0)
   --  arg-macro: procedure libssh2_channel_direct_tcpip (session, host, libssh2_channel_direct_tcpip_ex((session), (host), (port), "127.0.0.1", 22)
   --    libssh2_channel_direct_tcpip_ex((session), (host), (port), "127.0.0.1", 22)
   --  arg-macro: procedure libssh2_channel_forward_listen (session, port)
   --    libssh2_channel_forward_listen_ex((session), NULL, (port), NULL, 16)
   --  arg-macro: procedure libssh2_channel_setenv (channel, varnamlibssh2_channel_setenv_ex((channel), (varname), strlen(varname), (value), strlen(value))
   --    libssh2_channel_setenv_ex((channel), (varname), strlen(varname), (value), strlen(value))
   --  arg-macro: procedure 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)
   --  arg-macro: procedure libssh2_channel_request_pty_size (channel, width,libssh2_channel_request_pty_size_ex( (channel), (width), (height), 0, 0)
   --    libssh2_channel_request_pty_size_ex( (channel), (width), (height), 0, 0)
   --  arg-macro: procedure libssh2_channel_x11_req (channel, screenlibssh2_channel_x11_req_ex((channel), 0, NULL, NULL, (screen_number))
   --    libssh2_channel_x11_req_ex((channel), 0, NULL, NULL, (screen_number))
   --  arg-macro: procedure libssh2_channel_shell (channel)
   --    libssh2_channel_process_startup((channel), "shell", sizeof("shell") - 1, NULL, 0)
   --  arg-macro: procedure libssh2_channel_exec (channel, commanlibssh2_channel_process_startup((channel), "exec", sizeof("exec") - 1, (command), strlen(command))
   --    libssh2_channel_process_startup((channel), "exec", sizeof("exec") - 1, (command), strlen(command))
   --  arg-macro: procedure libssh2_channel_subsystem (channel, subsyslibssh2_channel_process_startup((channel), "subsystem", sizeof("subsystem") - 1, (subsystem), strlen(subsystem))
   --    libssh2_channel_process_startup((channel), "subsystem", sizeof("subsystem") - 1, (subsystem), strlen(subsystem))
   --  arg-macro: procedure libssh2_channel_read (channel, buf, blibssh2_channel_read_ex((channel), 0, (buf), (buflen))
   --    libssh2_channel_read_ex((channel), 0, (buf), (buflen))
   --  arg-macro: procedure libssh2_channel_read_stderr (channel, buf, blibssh2_channel_read_ex((channel), SSH_EXTENDED_DATA_STDERR, (buf), (buflen))
   --    libssh2_channel_read_ex((channel), SSH_EXTENDED_DATA_STDERR, (buf), (buflen))
   --  arg-macro: procedure libssh2_channel_window_read (channel)
   --    libssh2_channel_window_read_ex((channel), NULL, NULL)
   --  arg-macro: procedure libssh2_channel_write (channel, buf, blibssh2_channel_write_ex((channel), 0, (buf), (buflen))
   --    libssh2_channel_write_ex((channel), 0, (buf), (buflen))
   --  arg-macro: procedure libssh2_channel_write_stderr (channel, buf, blibssh2_channel_write_ex((channel), SSH_EXTENDED_DATA_STDERR, (buf), (buflen))
   --    libssh2_channel_write_ex((channel), SSH_EXTENDED_DATA_STDERR, (buf), (buflen))
   --  arg-macro: procedure libssh2_channel_window_write (channel)
   --    libssh2_channel_window_write_ex((channel), NULL)
   --  arg-macro: procedure libssh2_channel_ignore_extended_data (channel, ignorelibssh2_channel_handle_extended_data((channel), (ignore) ? LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE : LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL )
   --    libssh2_channel_handle_extended_data((channel), (ignore) ? LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE : LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL )

   LIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA : constant := -1;  --  libssh2.h:696
   LIBSSH2_CHANNEL_FLUSH_ALL : constant := -2;  --  libssh2.h:697
   --  arg-macro: procedure libssh2_channel_flush (channel)
   --    libssh2_channel_flush_ex((channel), 0)
   --  arg-macro: procedure libssh2_channel_flush_stderr (channel)
   --    libssh2_channel_flush_ex((channel), SSH_EXTENDED_DATA_STDERR)
   --  arg-macro: procedure libssh2_scp_send (session, path, libssh2_scp_send_ex((session), (path), (mode), (size), 0, 0)
   --    libssh2_scp_send_ex((session), (path), (mode), (size), 0, 0)

   HAVE_LIBSSH2_KNOWNHOST_API : constant := 16#010101#;  --  libssh2.h:733
   HAVE_LIBSSH2_VERSION_API : constant := 16#010100#;  --  libssh2.h:734

   LIBSSH2_KNOWNHOST_TYPE_MASK : constant := 16#ffff#;  --  libssh2.h:776
   LIBSSH2_KNOWNHOST_TYPE_PLAIN : constant := 1;  --  libssh2.h:777
   LIBSSH2_KNOWNHOST_TYPE_SHA1 : constant := 2;  --  libssh2.h:778
   LIBSSH2_KNOWNHOST_TYPE_CUSTOM : constant := 3;  --  libssh2.h:779
   --  unsupported macro: LIBSSH2_KNOWNHOST_KEYENC_MASK (3<<16)

   LIBSSH2_KNOWNHOST_KEYENC_RAW : constant := (2**16);  --  libssh2.h:783
   --  unsupported macro: LIBSSH2_KNOWNHOST_KEYENC_BASE64 (2<<16)
   --  unsupported macro: LIBSSH2_KNOWNHOST_KEY_MASK (3<<18)

   LIBSSH2_KNOWNHOST_KEY_SHIFT : constant := 18;  --  libssh2.h:788
   LIBSSH2_KNOWNHOST_KEY_RSA1 : constant := (2**18);  --  libssh2.h:789
   --  unsupported macro: LIBSSH2_KNOWNHOST_KEY_SSHRSA (2<<18)
   --  unsupported macro: LIBSSH2_KNOWNHOST_KEY_SSHDSS (3<<18)

   LIBSSH2_KNOWNHOST_CHECK_MATCH : constant := 0;  --  libssh2.h:854
   LIBSSH2_KNOWNHOST_CHECK_MISMATCH : constant := 1;  --  libssh2.h:855
   LIBSSH2_KNOWNHOST_CHECK_NOTFOUND : constant := 2;  --  libssh2.h:856
   LIBSSH2_KNOWNHOST_CHECK_FAILURE : constant := 3;  --  libssh2.h:857

   LIBSSH2_KNOWNHOST_FILE_OPENSSH : constant := 1;  --  libssh2.h:917

   HAVE_LIBSSH2_AGENT_API : constant := 16#010202#;  --  libssh2.h:972

   LIBSSH2_TRACE_TRANS : constant := (2**1);  --  libssh2.h:1093
   LIBSSH2_TRACE_KEX : constant := (2**2);  --  libssh2.h:1094
   LIBSSH2_TRACE_AUTH : constant := (2**3);  --  libssh2.h:1095
   LIBSSH2_TRACE_CONN : constant := (2**4);  --  libssh2.h:1096
   LIBSSH2_TRACE_SCP : constant := (2**5);  --  libssh2.h:1097
   LIBSSH2_TRACE_SFTP : constant := (2**6);  --  libssh2.h:1098
   LIBSSH2_TRACE_ERROR : constant := (2**7);  --  libssh2.h:1099
   LIBSSH2_TRACE_PUBLICKEY : constant := (2**8);  --  libssh2.h:1100
   LIBSSH2_TRACE_SOCKET : constant := (2**9);  --  libssh2.h:1101

   subtype libssh2_uint64_t is Extensions.unsigned_long_long;  -- libssh2.h:130

   subtype libssh2_int64_t is Long_Long_Integer;  -- libssh2.h:131

   type u_LIBSSH2_USERAUTH_KBDINT_PROMPT is record
      text : Interfaces.C.Strings.chars_ptr;  -- libssh2.h:177
      length : aliased unsigned;  -- libssh2.h:178
      echo : aliased unsigned_char;  -- libssh2.h:179
   end record;
   pragma Convention (C_Pass_By_Copy, u_LIBSSH2_USERAUTH_KBDINT_PROMPT);  -- libssh2.h:175

   subtype LIBSSH2_USERAUTH_KBDINT_PROMPT is u_LIBSSH2_USERAUTH_KBDINT_PROMPT;

   type u_LIBSSH2_USERAUTH_KBDINT_RESPONSE is record
      text : Interfaces.C.Strings.chars_ptr;  -- libssh2.h:184
      length : aliased unsigned;  -- libssh2.h:185
   end record;
   pragma Convention (C_Pass_By_Copy, u_LIBSSH2_USERAUTH_KBDINT_RESPONSE);  -- libssh2.h:182

   subtype LIBSSH2_USERAUTH_KBDINT_RESPONSE is u_LIBSSH2_USERAUTH_KBDINT_RESPONSE;

   --  skipped empty struct u_LIBSSH2_SESSION

   --  skipped empty struct LIBSSH2_SESSION

   --  skipped empty struct u_LIBSSH2_CHANNEL

   --  skipped empty struct LIBSSH2_CHANNEL

   --  skipped empty struct u_LIBSSH2_LISTENER

   --  skipped empty struct LIBSSH2_LISTENER

   --  skipped empty struct u_LIBSSH2_KNOWNHOSTS

   --  skipped empty struct LIBSSH2_KNOWNHOSTS

   --  skipped empty struct u_LIBSSH2_AGENT

   --  skipped empty struct LIBSSH2_AGENT

   type anon_14 (discr : unsigned := 0) is record
      case discr is
         when 0 =>
            socket : aliased int;  -- libssh2.h:263
         when 1 =>
            channel : System.Address;  -- libssh2.h:264
         when others =>
            listener : System.Address;  -- libssh2.h:265
      end case;
   end record;
   pragma Convention (C_Pass_By_Copy, anon_14);
   pragma Unchecked_Union (anon_14);
   type u_LIBSSH2_POLLFD is record
      c_type : aliased unsigned_char;  -- libssh2.h:260
      fd : anon_14;  -- libssh2.h:267
      events : aliased unsigned_long;  -- libssh2.h:269
      revents : aliased unsigned_long;  -- libssh2.h:270
   end record;
   pragma Convention (C_Pass_By_Copy, u_LIBSSH2_POLLFD);  -- libssh2.h:259

   subtype LIBSSH2_POLLFD is u_LIBSSH2_POLLFD;

   function libssh2_init (flags : int) return int;  -- libssh2.h:395
   pragma Import (C, libssh2_init, "libssh2_init");

   procedure libssh2_exit;  -- libssh2.h:402
   pragma Import (C, libssh2_exit, "libssh2_exit");

   function libssh2_session_init_ex
     (my_alloc : access function (arg1 : size_t; arg2 : System.Address) return System.Address;
      my_free : access procedure (arg1 : System.Address; arg2 : System.Address);
      my_realloc : access function
        (arg1 : System.Address;
         arg2 : size_t;
         arg3 : System.Address) return System.Address;
      c_abstract : System.Address) return System.Address;  -- libssh2.h:406
   pragma Import (C, libssh2_session_init_ex, "libssh2_session_init_ex");

   function libssh2_session_abstract (session : System.Address) return System.Address;  -- libssh2.h:411
   pragma Import (C, libssh2_session_abstract, "libssh2_session_abstract");

   function libssh2_session_callback_set
     (session : System.Address;
      cbtype : int;
      callback : System.Address) return System.Address;  -- libssh2.h:413
   pragma Import (C, libssh2_session_callback_set, "libssh2_session_callback_set");

   function libssh2_banner_set (session : System.Address; banner : Interfaces.C.Strings.chars_ptr) return int;  -- libssh2.h:415
   pragma Import (C, libssh2_banner_set, "libssh2_banner_set");

   function libssh2_session_startup (session : System.Address; sock : int) return int;  -- libssh2.h:418
   pragma Import (C, libssh2_session_startup, "libssh2_session_startup");

   function libssh2_session_disconnect_ex
     (session : System.Address;
      reason : int;
      description : Interfaces.C.Strings.chars_ptr;
      lang : Interfaces.C.Strings.chars_ptr) return int;  -- libssh2.h:419
   pragma Import (C, libssh2_session_disconnect_ex, "libssh2_session_disconnect_ex");

   function libssh2_session_free (session : System.Address) return int;  -- libssh2.h:427
   pragma Import (C, libssh2_session_free, "libssh2_session_free");

   function libssh2_hostkey_hash (session : System.Address; hash_type : int) return Interfaces.C.Strings.chars_ptr;  -- libssh2.h:429
   pragma Import (C, libssh2_hostkey_hash, "libssh2_hostkey_hash");

   function libssh2_session_hostkey
     (session : System.Address;
      len : access size_t;
      c_type : access int) return Interfaces.C.Strings.chars_ptr;  -- libssh2.h:432
   pragma Import (C, libssh2_session_hostkey, "libssh2_session_hostkey");

   function libssh2_session_method_pref
     (session : System.Address;
      method_type : int;
      prefs : Interfaces.C.Strings.chars_ptr) return int;  -- libssh2.h:435
   pragma Import (C, libssh2_session_method_pref, "libssh2_session_method_pref");

   function libssh2_session_methods (session : System.Address; method_type : int) return Interfaces.C.Strings.chars_ptr;  -- libssh2.h:438
   pragma Import (C, libssh2_session_methods, "libssh2_session_methods");

   function libssh2_session_last_error
     (session : System.Address;
      errmsg : System.Address;
      errmsg_len : access int;
      want_buf : int) return int;  -- libssh2.h:440
   pragma Import (C, libssh2_session_last_error, "libssh2_session_last_error");

   function libssh2_session_last_errno (session : System.Address) return int;  -- libssh2.h:443
   pragma Import (C, libssh2_session_last_errno, "libssh2_session_last_errno");

   function libssh2_session_block_directions (session : System.Address) return int;  -- libssh2.h:444
   pragma Import (C, libssh2_session_block_directions, "libssh2_session_block_directions");

   function libssh2_session_flag
     (session : System.Address;
      flag : int;
      value : int) return int;  -- libssh2.h:446
   pragma Import (C, libssh2_session_flag, "libssh2_session_flag");

   function libssh2_userauth_list
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      username_len : unsigned) return Interfaces.C.Strings.chars_ptr;  -- libssh2.h:450
   pragma Import (C, libssh2_userauth_list, "libssh2_userauth_list");

   function libssh2_userauth_authenticated (session : System.Address) return int;  -- libssh2.h:453
   pragma Import (C, libssh2_userauth_authenticated, "libssh2_userauth_authenticated");

   function libssh2_userauth_password_ex
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      username_len : unsigned;
      password : Interfaces.C.Strings.chars_ptr;
      password_len : unsigned;
      passwd_change_cb : access procedure
        (arg1 : System.Address;
         arg2 : System.Address;
         arg3 : access int;
         arg4 : System.Address)) return int;  -- libssh2.h:455
   pragma Import (C, libssh2_userauth_password_ex, "libssh2_userauth_password_ex");

   function libssh2_userauth_publickey_fromfile_ex
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      username_len : unsigned;
      publickey : Interfaces.C.Strings.chars_ptr;
      privatekey : Interfaces.C.Strings.chars_ptr;
      passphrase : Interfaces.C.Strings.chars_ptr) return int;  -- libssh2.h:467
   pragma Import (C, libssh2_userauth_publickey_fromfile_ex, "libssh2_userauth_publickey_fromfile_ex");

   function libssh2_userauth_publickey
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      pubkeydata : access unsigned_char;
      pubkeydata_len : size_t;
      sign_callback : access function
        (arg1 : System.Address;
         arg2 : System.Address;
         arg3 : access size_t;
         arg4 : access unsigned_char;
         arg5 : size_t;
         arg6 : System.Address) return int;
      c_abstract : System.Address) return int;  -- libssh2.h:481
   pragma Import (C, libssh2_userauth_publickey, "libssh2_userauth_publickey");

   function libssh2_userauth_hostbased_fromfile_ex
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      username_len : unsigned;
      publickey : Interfaces.C.Strings.chars_ptr;
      privatekey : Interfaces.C.Strings.chars_ptr;
      passphrase : Interfaces.C.Strings.chars_ptr;
      hostname : Interfaces.C.Strings.chars_ptr;
      hostname_len : unsigned;
      local_username : Interfaces.C.Strings.chars_ptr;
      local_username_len : unsigned) return int;  -- libssh2.h:489
   pragma Import (C, libssh2_userauth_hostbased_fromfile_ex, "libssh2_userauth_hostbased_fromfile_ex");

   function libssh2_userauth_keyboard_interactive_ex
     (session : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      username_len : unsigned;
      response_callback : access procedure
        (arg1 : Interfaces.C.Strings.chars_ptr;
         arg2 : int;
         arg3 : Interfaces.C.Strings.chars_ptr;
         arg4 : int;
         arg5 : int;
         arg6 : System.Address;
         arg7 : access LIBSSH2_USERAUTH_KBDINT_RESPONSE;
         arg8 : System.Address)) return int;  -- libssh2.h:515
   pragma Import (C, libssh2_userauth_keyboard_interactive_ex, "libssh2_userauth_keyboard_interactive_ex");

   function libssh2_poll
     (fds : access LIBSSH2_POLLFD;
      nfds : unsigned;
      timeout : long) return int;  -- libssh2.h:525
   pragma Import (C, libssh2_poll, "libssh2_poll");

   function libssh2_channel_open_ex
     (session : System.Address;
      channel_type : Interfaces.C.Strings.chars_ptr;
      channel_type_len : unsigned;
      window_size : unsigned;
      packet_size : unsigned;
      message : Interfaces.C.Strings.chars_ptr;
      message_len : unsigned) return System.Address;  -- libssh2.h:544
   pragma Import (C, libssh2_channel_open_ex, "libssh2_channel_open_ex");

   function libssh2_channel_direct_tcpip_ex
     (session : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      port : int;
      shost : Interfaces.C.Strings.chars_ptr;
      sport : int) return System.Address;  -- libssh2.h:555
   pragma Import (C, libssh2_channel_direct_tcpip_ex, "libssh2_channel_direct_tcpip_ex");

   function libssh2_channel_forward_listen_ex
     (session : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      port : int;
      bound_port : access int;
      queue_maxsize : int) return System.Address;  -- libssh2.h:561
   pragma Import (C, libssh2_channel_forward_listen_ex, "libssh2_channel_forward_listen_ex");

   function libssh2_channel_forward_cancel (listener : System.Address) return int;  -- libssh2.h:566
   pragma Import (C, libssh2_channel_forward_cancel, "libssh2_channel_forward_cancel");

   function libssh2_channel_forward_accept (listener : System.Address) return System.Address;  -- libssh2.h:569
   pragma Import (C, libssh2_channel_forward_accept, "libssh2_channel_forward_accept");

   function libssh2_channel_setenv_ex
     (channel : System.Address;
      varname : Interfaces.C.Strings.chars_ptr;
      varname_len : unsigned;
      value : Interfaces.C.Strings.chars_ptr;
      value_len : unsigned) return int;  -- libssh2.h:571
   pragma Import (C, libssh2_channel_setenv_ex, "libssh2_channel_setenv_ex");

   function libssh2_channel_request_pty_ex
     (channel : System.Address;
      term : Interfaces.C.Strings.chars_ptr;
      term_len : unsigned;
      modes : Interfaces.C.Strings.chars_ptr;
      modes_len : unsigned;
      width : int;
      height : int;
      width_px : int;
      height_px : int) return int;  -- libssh2.h:581
   pragma Import (C, libssh2_channel_request_pty_ex, "libssh2_channel_request_pty_ex");

   function libssh2_channel_request_pty_size_ex
     (channel : System.Address;
      width : int;
      height : int;
      width_px : int;
      height_px : int) return int;  -- libssh2.h:593
   pragma Import (C, libssh2_channel_request_pty_size_ex, "libssh2_channel_request_pty_size_ex");

   function libssh2_channel_x11_req_ex
     (channel : System.Address;
      single_connection : int;
      auth_proto : Interfaces.C.Strings.chars_ptr;
      auth_cookie : Interfaces.C.Strings.chars_ptr;
      screen_number : int) return int;  -- libssh2.h:600
   pragma Import (C, libssh2_channel_x11_req_ex, "libssh2_channel_x11_req_ex");

   function libssh2_channel_process_startup
     (channel : System.Address;
      request : Interfaces.C.Strings.chars_ptr;
      request_len : unsigned;
      message : Interfaces.C.Strings.chars_ptr;
      message_len : unsigned) return int;  -- libssh2.h:608
   pragma Import (C, libssh2_channel_process_startup, "libssh2_channel_process_startup");

   function libssh2_channel_read_ex
     (channel : System.Address;
      stream_id : int;
      buf : Interfaces.C.Strings.chars_ptr;
      buflen : size_t) return long;  -- libssh2.h:624
   pragma Import (C, libssh2_channel_read_ex, "libssh2_channel_read_ex");

   function libssh2_poll_channel_read (channel : System.Address; extended : int) return int;  -- libssh2.h:632
   pragma Import (C, libssh2_poll_channel_read, "libssh2_poll_channel_read");

   function libssh2_channel_window_read_ex
     (channel : System.Address;
      read_avail : access unsigned_long;
      window_size_initial : access unsigned_long) return unsigned_long;  -- libssh2.h:636
   pragma Import (C, libssh2_channel_window_read_ex, "libssh2_channel_window_read_ex");

   function libssh2_channel_receive_window_adjust
     (channel : System.Address;
      adjustment : unsigned_long;
      force : unsigned_char) return unsigned_long;  -- libssh2.h:644
   pragma Import (C, libssh2_channel_receive_window_adjust, "libssh2_channel_receive_window_adjust");

   function libssh2_channel_receive_window_adjust2
     (channel : System.Address;
      adjustment : unsigned_long;
      force : unsigned_char;
      storewindow : access unsigned) return int;  -- libssh2.h:649
   pragma Import (C, libssh2_channel_receive_window_adjust2, "libssh2_channel_receive_window_adjust2");

   function libssh2_channel_write_ex
     (channel : System.Address;
      stream_id : int;
      buf : Interfaces.C.Strings.chars_ptr;
      buflen : size_t) return long;  -- libssh2.h:654
   pragma Import (C, libssh2_channel_write_ex, "libssh2_channel_write_ex");

   function libssh2_channel_window_write_ex (channel : System.Address; window_size_initial : access unsigned_long) return unsigned_long;  -- libssh2.h:664
   pragma Import (C, libssh2_channel_window_write_ex, "libssh2_channel_window_write_ex");

   procedure libssh2_session_set_blocking (session : System.Address; blocking : int);  -- libssh2.h:669
   pragma Import (C, libssh2_session_set_blocking, "libssh2_session_set_blocking");

   function libssh2_session_get_blocking (session : System.Address) return int;  -- libssh2.h:671
   pragma Import (C, libssh2_session_get_blocking, "libssh2_session_get_blocking");

   procedure libssh2_channel_set_blocking (channel : System.Address; blocking : int);  -- libssh2.h:673
   pragma Import (C, libssh2_channel_set_blocking, "libssh2_channel_set_blocking");

   procedure libssh2_channel_handle_extended_data (channel : System.Address; ignore_mode : int);  -- libssh2.h:677
   pragma Import (C, libssh2_channel_handle_extended_data, "libssh2_channel_handle_extended_data");

   function libssh2_channel_handle_extended_data2 (channel : System.Address; ignore_mode : int) return int;  -- libssh2.h:679
   pragma Import (C, libssh2_channel_handle_extended_data2, "libssh2_channel_handle_extended_data2");

   function libssh2_channel_flush_ex (channel : System.Address; streamid : int) return int;  -- libssh2.h:698
   pragma Import (C, libssh2_channel_flush_ex, "libssh2_channel_flush_ex");

   function libssh2_channel_get_exit_status (channel : System.Address) return int;  -- libssh2.h:704
   pragma Import (C, libssh2_channel_get_exit_status, "libssh2_channel_get_exit_status");

   function libssh2_channel_send_eof (channel : System.Address) return int;  -- libssh2.h:705
   pragma Import (C, libssh2_channel_send_eof, "libssh2_channel_send_eof");

   function libssh2_channel_eof (channel : System.Address) return int;  -- libssh2.h:706
   pragma Import (C, libssh2_channel_eof, "libssh2_channel_eof");

   function libssh2_channel_wait_eof (channel : System.Address) return int;  -- libssh2.h:707
   pragma Import (C, libssh2_channel_wait_eof, "libssh2_channel_wait_eof");

   function libssh2_channel_close (channel : System.Address) return int;  -- libssh2.h:708
   pragma Import (C, libssh2_channel_close, "libssh2_channel_close");

   function libssh2_channel_wait_closed (channel : System.Address) return int;  -- libssh2.h:709
   pragma Import (C, libssh2_channel_wait_closed, "libssh2_channel_wait_closed");

   function libssh2_channel_free (channel : System.Address) return int;  -- libssh2.h:710
   pragma Import (C, libssh2_channel_free, "libssh2_channel_free");

   function libssh2_scp_recv
     (session : System.Address;
      path : Interfaces.C.Strings.chars_ptr;
      sb : access bits_stat_h.stat) return System.Address;  -- libssh2.h:712
   pragma Import (C, libssh2_scp_recv, "libssh2_scp_recv");

   function libssh2_scp_send_ex
     (session : System.Address;
      path : Interfaces.C.Strings.chars_ptr;
      mode : int;
      size : size_t;
      mtime : long;
      atime : long) return System.Address;  -- libssh2.h:715
   pragma Import (C, libssh2_scp_send_ex, "libssh2_scp_send_ex");

   function libssh2_scp_send64
     (session : System.Address;
      path : Interfaces.C.Strings.chars_ptr;
      mode : int;
      size : libssh2_int64_t;
      mtime : time_h.time_t;
      atime : time_h.time_t) return System.Address;  -- libssh2.h:720
   pragma Import (C, libssh2_scp_send64, "libssh2_scp_send64");

   function libssh2_base64_decode
     (session : System.Address;
      dest : System.Address;
      dest_len : access unsigned;
      src : Interfaces.C.Strings.chars_ptr;
      src_len : unsigned) return int;  -- libssh2.h:726
   pragma Import (C, libssh2_base64_decode, "libssh2_base64_decode");

   function get_libssh2_version (req_version_num : int) return Interfaces.C.Strings.chars_ptr;  -- libssh2.h:731
   pragma Import (C, get_libssh2_version, "libssh2_version");

   type libssh2_knownhost is record
      magic : aliased unsigned;  -- libssh2.h:737
      node : System.Address;  -- libssh2.h:738
      name : Interfaces.C.Strings.chars_ptr;  -- libssh2.h:739
      key : Interfaces.C.Strings.chars_ptr;  -- libssh2.h:740
      typemask : aliased int;  -- libssh2.h:741
   end record;
   pragma Convention (C_Pass_By_Copy, libssh2_knownhost);  -- libssh2.h:736

   function libssh2_knownhost_init (session : System.Address) return System.Address;  -- libssh2.h:751
   pragma Import (C, libssh2_knownhost_init, "libssh2_knownhost_init");

   function libssh2_knownhost_add
     (hosts : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      salt : Interfaces.C.Strings.chars_ptr;
      key : Interfaces.C.Strings.chars_ptr;
      keylen : size_t;
      typemask : int;
      store : System.Address) return int;  -- libssh2.h:794
   pragma Import (C, libssh2_knownhost_add, "libssh2_knownhost_add");

   function libssh2_knownhost_addc
     (hosts : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      salt : Interfaces.C.Strings.chars_ptr;
      key : Interfaces.C.Strings.chars_ptr;
      keylen : size_t;
      comment : Interfaces.C.Strings.chars_ptr;
      commentlen : size_t;
      typemask : int;
      store : System.Address) return int;  -- libssh2.h:828
   pragma Import (C, libssh2_knownhost_addc, "libssh2_knownhost_addc");

   function libssh2_knownhost_check
     (hosts : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      key : Interfaces.C.Strings.chars_ptr;
      keylen : size_t;
      typemask : int;
      knownhost : System.Address) return int;  -- libssh2.h:860
   pragma Import (C, libssh2_knownhost_check, "libssh2_knownhost_check");

   function libssh2_knownhost_checkp
     (hosts : System.Address;
      host : Interfaces.C.Strings.chars_ptr;
      port : int;
      key : Interfaces.C.Strings.chars_ptr;
      keylen : size_t;
      typemask : int;
      knownhost : System.Address) return int;  -- libssh2.h:868
   pragma Import (C, libssh2_knownhost_checkp, "libssh2_knownhost_checkp");

   function libssh2_knownhost_del (hosts : System.Address; c_entry : access libssh2_knownhost) return int;  -- libssh2.h:882
   pragma Import (C, libssh2_knownhost_del, "libssh2_knownhost_del");

   procedure libssh2_knownhost_free (hosts : System.Address);  -- libssh2.h:892
   pragma Import (C, libssh2_knownhost_free, "libssh2_knownhost_free");

   function libssh2_knownhost_readline
     (hosts : System.Address;
      line : Interfaces.C.Strings.chars_ptr;
      len : size_t;
      c_type : int) return int;  -- libssh2.h:903
   pragma Import (C, libssh2_knownhost_readline, "libssh2_knownhost_readline");

   function libssh2_knownhost_readfile
     (hosts : System.Address;
      filename : Interfaces.C.Strings.chars_ptr;
      c_type : int) return int;  -- libssh2.h:920
   pragma Import (C, libssh2_knownhost_readfile, "libssh2_knownhost_readfile");

   function libssh2_knownhost_writeline
     (hosts : System.Address;
      known : access libssh2_knownhost;
      buffer : Interfaces.C.Strings.chars_ptr;
      buflen : size_t;
      outlen : access size_t;
      c_type : int) return int;  -- libssh2.h:936
   pragma Import (C, libssh2_knownhost_writeline, "libssh2_knownhost_writeline");

   function libssh2_knownhost_writefile
     (hosts : System.Address;
      filename : Interfaces.C.Strings.chars_ptr;
      c_type : int) return int;  -- libssh2.h:952
   pragma Import (C, libssh2_knownhost_writefile, "libssh2_knownhost_writefile");

   function libssh2_knownhost_get
     (hosts : System.Address;
      store : System.Address;
      prev : access libssh2_knownhost) return int;  -- libssh2.h:968
   pragma Import (C, libssh2_knownhost_get, "libssh2_knownhost_get");

   type libssh2_agent_publickey is record
      magic : aliased unsigned;  -- libssh2.h:975
      node : System.Address;  -- libssh2.h:976
      blob : access unsigned_char;  -- libssh2.h:977
      blob_len : aliased size_t;  -- libssh2.h:978
      comment : Interfaces.C.Strings.chars_ptr;  -- libssh2.h:979
   end record;
   pragma Convention (C_Pass_By_Copy, libssh2_agent_publickey);  -- libssh2.h:974

   function libssh2_agent_init (session : System.Address) return System.Address;  -- libssh2.h:989
   pragma Import (C, libssh2_agent_init, "libssh2_agent_init");

   function libssh2_agent_connect (agent : System.Address) return int;  -- libssh2.h:999
   pragma Import (C, libssh2_agent_connect, "libssh2_agent_connect");

   function libssh2_agent_list_identities (agent : System.Address) return int;  -- libssh2.h:1009
   pragma Import (C, libssh2_agent_list_identities, "libssh2_agent_list_identities");

   function libssh2_agent_get_identity
     (agent : System.Address;
      store : System.Address;
      prev : access libssh2_agent_publickey) return int;  -- libssh2.h:1024
   pragma Import (C, libssh2_agent_get_identity, "libssh2_agent_get_identity");

   function libssh2_agent_userauth
     (agent : System.Address;
      username : Interfaces.C.Strings.chars_ptr;
      identity : access libssh2_agent_publickey) return int;  -- libssh2.h:1036
   pragma Import (C, libssh2_agent_userauth, "libssh2_agent_userauth");

   function libssh2_agent_disconnect (agent : System.Address) return int;  -- libssh2.h:1048
   pragma Import (C, libssh2_agent_disconnect, "libssh2_agent_disconnect");

   procedure libssh2_agent_free (agent : System.Address);  -- libssh2.h:1057
   pragma Import (C, libssh2_agent_free, "libssh2_agent_free");

   procedure libssh2_keepalive_config
     (session : System.Address;
      want_reply : int;
      interval : unsigned);  -- libssh2.h:1073
   pragma Import (C, libssh2_keepalive_config, "libssh2_keepalive_config");

   function libssh2_keepalive_send (session : System.Address; seconds_to_next : access int) return int;  -- libssh2.h:1085
   pragma Import (C, libssh2_keepalive_send, "libssh2_keepalive_send");

   function libssh2_trace (session : System.Address; bitmask : int) return int;  -- libssh2.h:1092
   pragma Import (C, libssh2_trace, "libssh2_trace");

   type libssh2_trace_handler_func is access procedure
     (arg1 : System.Address;
      arg2 : System.Address;
      arg3 : Interfaces.C.Strings.chars_ptr;
      arg4 : size_t);
   pragma Convention (C, libssh2_trace_handler_func);  -- libssh2.h:1103

   function libssh2_trace_sethandler
     (session : System.Address;
      context : System.Address;
      callback : libssh2_trace_handler_func) return int;  -- libssh2.h:1107
   pragma Import (C, libssh2_trace_sethandler, "libssh2_trace_sethandler");

end libssh2_h;

  reply	other threads:[~2013-08-22  5:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 12:41 library/binding for sftp? Stephen Leake
2013-08-05 15:18 ` Dmitry A. Kazakov
2013-08-06  6:24   ` Stephen Leake
2013-08-06  6:54     ` Dmitry A. Kazakov
2013-08-07 10:06       ` Stephen Leake
2013-08-07 13:04         ` Dmitry A. Kazakov
2013-08-07 17:15           ` Simon Clubley
2013-08-07 19:57             ` Dmitry A. Kazakov
2013-08-07 20:09               ` Alan Jump
2013-08-07 20:26                 ` Dmitry A. Kazakov
2013-08-07 20:32                   ` Alan Jump
2013-08-08  9:14                     ` Björn Persson
2013-08-08  9:49                       ` Dmitry A. Kazakov
2013-08-08 11:37                         ` Björn Persson
2013-08-08 19:18                           ` Randy Brukardt
2013-08-08 20:03                             ` Alan Jump
2013-08-09  9:19                               ` Björn Persson
2013-08-09 20:21                               ` Randy Brukardt
2013-08-09  8:49                             ` Björn Persson
2013-08-09 20:12                               ` Randy Brukardt
2013-08-19 17:26                                 ` Stefan.Lucks
2013-08-19 18:15                                   ` AdaMagica
2013-08-19 22:45                                   ` Randy Brukardt
2013-08-19 23:15                                   ` Randy Brukardt
2013-08-20  6:43                                     ` Georg Bauhaus
2013-09-13  9:58                                       ` Oliver Kleinke
2013-09-13 21:12                                         ` Georg Bauhaus
2013-08-20  8:14                                     ` Stefan.Lucks
2013-08-20 20:59                                       ` Randy Brukardt
2013-08-21  7:27                                         ` Stefan.Lucks
2013-08-21 16:46                                           ` Alan Jump
2013-08-22  5:53                                             ` Per Sandberg [this message]
2013-08-26 21:21                                           ` Randy Brukardt
2013-08-24  8:06                                       ` David Thompson
2013-08-24 11:26                                         ` Stefan.Lucks
2013-08-07 21:46               ` Dennis Lee Bieber
2013-08-07 17:44           ` Björn Persson
2013-08-05 18:40 ` Jeffrey Carter
2013-08-06  6:26   ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox