geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1705 lines
87 KiB

  1. * Copyright (c) 2015 Patrick Monnerat, D+H <patrick.monnerat@dh.com>
  2. * All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms,
  5. * with or without modification, are permitted provided
  6. * that the following conditions are met:
  7. *
  8. * Redistributions of source code must retain the above
  9. * copyright notice, this list of conditions and the
  10. * following disclaimer.
  11. *
  12. * Redistributions in binary form must reproduce the above
  13. * copyright notice, this list of conditions and the following
  14. * disclaimer in the documentation and/or other materials
  15. * provided with the distribution.
  16. *
  17. * Neither the name of the copyright holder nor the names
  18. * of any other contributors may be used to endorse or
  19. * promote products derived from this software without
  20. * specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  23. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  24. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  25. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  27. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  28. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  29. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  31. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  32. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  33. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  34. * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  35. * OF SUCH DAMAGE.
  36. /if not defined(LIBSSH2_H_)
  37. /define LIBSSH2_H_
  38. d LIBSSH2_COPYRIGHT...
  39. d c '2004-2015 The libssh2 project and +
  40. d its contributors.'
  41. * We use underscore instead of dash when appending DEV in dev versions
  42. * just to make the BANNER define (used by src/session.c) be a valid SSH
  43. * banner. Release versions have no appended strings and may of course not
  44. * have dashes either.
  45. d LIBSSH2_VERSION...
  46. d c '@LIBSSH2_VERSION@'
  47. * The numeric version number is also available "in parts" by using these
  48. * defines:
  49. d LIBSSH2_VERSION_MAJOR...
  50. d c @LIBSSH2_VERSION_MAJOR@
  51. d LIBSSH2_VERSION_MINOR...
  52. d c @LIBSSH2_VERSION_MINOR@
  53. d LIBSSH2_VERSION_PATCH...
  54. d c @LIBSSH2_VERSION_PATCH@
  55. * This is the numeric version of the libssh2 version number, meant for
  56. * easier parsing and comparions by programs. The LIBSSH2_VERSION_NUM
  57. * define will always follow this syntax:
  58. *
  59. * X'XXYYZZ'
  60. *
  61. * Where XX, YY and ZZ are the main version, release and patch numbers in
  62. * hexadecimal (using 8 bits each). All three numbers are always
  63. * represented using two digits. 1.2 would appear as "0x010200" while
  64. * version 9.11.7 appears as X'090b07'.
  65. *
  66. * This 6-digit (24 bits) hexadecimal number does not show pre-release
  67. * number, and it is always a greater number in a more recent release. It
  68. * makes comparisons with greater than and less than work.
  69. d LIBSSH2_VERSION_NUM...
  70. d c X'@LIBSSH2_VERSION_NUM@'
  71. * This is the date and time when the full source package was created. The
  72. * timestamp is not stored in the source code repo, as the timestamp is
  73. * properly set in the tarballs by the maketgz script.
  74. *
  75. * The format of the date should follow this template:
  76. *
  77. * "Mon Feb 12 11:35:33 UTC 2007"
  78. d LIBSSH2_TIMESTAMP...
  79. d c '@LIBSSH2_TIMESTAMP@'
  80. d libssh2_Cchar s 3i 0 based(######typedef######)
  81. d libssh2_Cuchar s 3u 0 based(######typedef######)
  82. d libssh2_Cshort s 5i 0 based(######typedef######)
  83. d libssh2_Cushort...
  84. d s 5u 0 based(######typedef######)
  85. d libssh2_Cint s 10i 0 based(######typedef######)
  86. d libssh2_CuInt s 10u 0 based(######typedef######)
  87. d libssh2_Clong s 10i 0 based(######typedef######)
  88. d libssh2_Culong s 10u 0 based(######typedef######)
  89. d libssh2_Clonglong...
  90. d s 20i 0 based(######typedef######)
  91. d libssh2_Culonglong...
  92. d s 20u 0 based(######typedef######)
  93. d libssh2_Cenum s 10i 0 based(######typedef######)
  94. d libssh2_Cssize_t...
  95. d s 10i 0 based(######typedef######)
  96. d libssh2_Csize_t...
  97. d s 10u 0 based(######typedef######)
  98. d libssh2_Cfloat s 4f based(######typedef######)
  99. d libssh2_Cdouble...
  100. d s 8f based(######typedef######)
  101. d libssh2_uint8_t...
  102. d s 3u 0 based(######typedef######)
  103. d libssh2_uint32_t...
  104. d s 10u 0 based(######typedef######)
  105. d libssh2_uint64_t...
  106. d s 20u 0 based(######typedef######)
  107. d libssh2_int64_t...
  108. d s 20i 0 based(######typedef######)
  109. d libssh2_socket_t...
  110. d s 10i 0 based(######typedef######)
  111. d LIBSSH2_INVALID_SOCKET...
  112. d c -1
  113. d libssh2_mode_t s 10u 0 based(######typedef######)
  114. d libssh2_ino_t s 10u 0 based(######typedef######)
  115. d libssh2_uid_t s 10u 0 based(######typedef######)
  116. d libssh2_gid_t s 10u 0 based(######typedef######)
  117. d libssh2_dev_t s 10u 0 based(######typedef######)
  118. d libssh2_off_t s 20i 0 based(######typedef######) Use *IFS64IO
  119. d libssh2_time_t s 10i 0 based(######typedef######)
  120. d libssh2_nlink_t...
  121. d s 5u 0 based(######typedef######)
  122. d libssh2_qp0l_objtype_t... AS400 object type
  123. d s 11
  124. d libssh2_struct_stat_size...
  125. d s based(######typedef######)
  126. d like(libssh2_off_t)
  127. d libssh2_struct_stat...
  128. d ds based(######typedef######)
  129. d align qualified
  130. d st_mode like(libssh2_mode_t) Mode flags
  131. d st_ino like(libssh2_ino_t) File serial number
  132. d st_nlink like(libssh2_nlink_t) Number of links
  133. d st_uid like(libssh2_uid_t) Owner ID
  134. d st_gid like(libssh2_gid_t) Group ID
  135. d st_size like(libssh2_off_t) File size
  136. d st_atime like(libssh2_time_t) Last access time
  137. d st_mtime like(libssh2_time_t) Last update time
  138. d st_ctime like(libssh2_time_t) Creation time
  139. d st_dev like(libssh2_dev_t) File root device
  140. d st_blksize like(libssh2_Csize_t) Block size
  141. d st_allocsize like(libssh2_Culong) Allocation size
  142. d st_objtype like(libssh2_qp0l_objtype_t) AS400 object type
  143. d st_codepage like(libssh2_Cushort) Object data codepage
  144. d 62 Reserved
  145. d st_ino_gen_id like(libssh2_Cuint) File SN gen. ID
  146. d LIBSSH2_STRUCT_STAT_SIZE_FORMAT...
  147. d c '%lld'
  148. * Part of every banner, user specified or not.
  149. d LIBSSH2_SSH_BANNER...
  150. d c 'SSH-2.0-libssh2_1.6.1_DEV'
  151. d LIBSSH2_SSH_DEFAULT_BANNER...
  152. d c 'SSH-2.0-libssh2_1.6.1_DEV'
  153. * Default generate and safe prime sizes for
  154. * diffie-hellman-group-exchange-sha1.
  155. d LIBSSH2_DH_GEX_MINGROUP...
  156. d c 1024
  157. d LIBSSH2_DH_GEX_OPTGROUP...
  158. d c 1536
  159. d LIBSSH2_DH_GEX_MAXGROUP...
  160. d c 2048
  161. * Defaults for pty requests.
  162. d LIBSSH2_TERM_WIDTH...
  163. d c 80
  164. d LIBSSH2_TERM_HEIGHT...
  165. d c 24
  166. d LIBSSH2_TERM_WIDTH_PX...
  167. d c 0
  168. d LIBSSH2_TERM_HEIGHT_PX...
  169. d c 0
  170. * 1/4 second.
  171. d LIBSSH2_SOCKET_POLL_UDELAY...
  172. d c 250000
  173. * 0.25 * 120 == 30 seconds.
  174. d LIBSSH2_SOCKET_POLL_MAXLOOPS...
  175. d c 120
  176. * Maximum size to allow a payload to compress to, plays it safe by
  177. * falling short of spec limits.
  178. d LIBSSH2_PACKET_MAXCOMP...
  179. d c 32000
  180. * Maximum size to allow a payload to deccompress to, plays it safe by
  181. * allowing more than spec requires.
  182. d LIBSSH2_PACKET_MAXDECOMP...
  183. d c 40000
  184. * Maximum size for an inbound compressed payload, plays it safe by
  185. * overshooting spec limits.
  186. d LIBSSH2_PACKET_MAXPAYLOAD...
  187. d c 40000
  188. d LIBSSH2_USERAUTH_KBDINT_PROMPT...
  189. d ds based(######typedef######)
  190. d align qualified
  191. d text * char *
  192. d length like(libssh2_Cuint)
  193. d echo like(libssh2_Cuchar)
  194. d LIBSSH2_USERAUTH_KBDINT_RESPONSE...
  195. d ds based(######typedef######)
  196. d align qualified
  197. d text * char *
  198. d length like(libssh2_Cuint)
  199. * libssh2_session_callback_set() constants.
  200. d LIBSSH2_CALLBACK_IGNORE...
  201. d c 0
  202. d LIBSSH2_CALLBACK_DEBUG...
  203. d c 1
  204. d LIBSSH2_CALLBACK_DISCONNECT...
  205. d c 2
  206. d LIBSSH2_CALLBACK_MACERROR...
  207. d c 3
  208. d LIBSSH2_CALLBACK_X11...
  209. d c 4
  210. d LIBSSH2_CALLBACK_SEND...
  211. d c 5
  212. d LIBSSH2_CALLBACK_RECV...
  213. d c 6
  214. * libssh2_session_method_pref() constants.
  215. d LIBSSH2_METHOD_KEX...
  216. d c 0
  217. d LIBSSH2_METHOD_HOSTKEY...
  218. d c 1
  219. d LIBSSH2_METHOD_CRYPT_CS...
  220. d c 2
  221. d LIBSSH2_METHOD_CRYPT_SC...
  222. d c 3
  223. d LIBSSH2_METHOD_MAC_CS...
  224. d c 4
  225. d LIBSSH2_METHOD_MAC_SC...
  226. d c 5
  227. d LIBSSH2_METHOD_COMP_CS...
  228. d c 6
  229. d LIBSSH2_METHOD_COMP_SC...
  230. d c 7
  231. d LIBSSH2_METHOD_LANG_CS...
  232. d c 8
  233. d LIBSSH2_METHOD_LANG_SC...
  234. d c 9
  235. * flags.
  236. d LIBSSH2_FLAG_SIGPIPE...
  237. d c X'0001'
  238. d LIBSSH2_FLAG_COMPRESS...
  239. d c X'0002'
  240. d LIBSSH2_POLLFD ds based(######typedef######)
  241. d align qualified
  242. d type like(libssh2_Cuchar)
  243. d fd * Union
  244. d socket overlay(fd) like(libssh2_socket_t)
  245. d channel * overlay(fd) LIBSSH2_CHANNEL *
  246. d listener * overlay(fd) LIBSSH2_LISTENER *
  247. d events like(libssh2_Culong)
  248. d revents like(libssh2_Culong)
  249. * Poll FD Descriptor Types.
  250. d LIBSSH2_POLLFD_SOCKET...
  251. d c 1
  252. d LIBSSH2_POLLFD_CHANNEL...
  253. d c 2
  254. d LIBSSH2_POLLFD_LISTENER...
  255. d c 3
  256. * Poll FD events/revents -- Match sys/poll.h where possible.
  257. d LIBSSH2_POLLFD_POLLIN... Input data ready or
  258. d c X'0001' connection available
  259. d LIBSSH2_POLLFD_POLLPRI... Prio data ready to
  260. d c X'0002' be read. Socket only
  261. d LIBSSH2_POLLFD_POLLEXT... Ext data ready to be
  262. d c X'0002' read. Channel only
  263. d LIBSSH2_POLLFD_POLLOUT... Can may be written:
  264. d c X'0004' Socket/Channel
  265. * revents only.
  266. d LIBSSH2_POLLFD_POLLERR... Error Condition:
  267. d c X'0008' Socket
  268. d LIBSSH2_POLLFD_POLLHUP... HangUp/EOF
  269. d c X'0010' Socket
  270. d LIBSSH2_POLLFD_SESSION_CLOSED... Session Disconnect
  271. d c X'0010'
  272. d LIBSSH2_POLLFD_POLLNVAL... Invalid request
  273. d c X'0020' Socket
  274. d LIBSSH2_POLLFD_POLLEX... Exception Condition
  275. d c X'0040' Socket/Win32
  276. d LIBSSH2_POLLFD_CHANNEL_CLOSED... Channel Disconnect
  277. d c X'0080'
  278. d LIBSSH2_POLLFD_LISTENER_CLOSED... Listener Disconnect
  279. d c X'0080'
  280. /define HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
  281. * Block Direction Types.
  282. d LIBSSH2_SESSION_BLOCK_INBOUND...
  283. d c X'0001'
  284. d LIBSSH2_SESSION_BLOCK_OUTBOUND...
  285. d c X'0002'
  286. * Hash Types.
  287. d LIBSSH2_HOSTKEY_HASH_MD5...
  288. d c 1
  289. d LIBSSH2_HOSTKEY_HASH_SHA1...
  290. d c 2
  291. * Hostkey Types.
  292. d LIBSSH2_HOSTKEY_TYPE_UNKNOWN...
  293. d c 0
  294. d LIBSSH2_HOSTKEY_TYPE_RSA...
  295. d c 1
  296. d LIBSSH2_HOSTKEY_TYPE_DSS...
  297. d c 2
  298. * Disconnect Codes (defined by SSH protocol).
  299. d SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT...
  300. d c 1
  301. d SSH_DISCONNECT_PROTOCOL_ERROR...
  302. d c 2
  303. d SSH_DISCONNECT_KEY_EXCHANGE_FAILED...
  304. d c 3
  305. d SSH_DISCONNECT_RESERVED...
  306. d c 4
  307. d SSH_DISCONNECT_MAC_ERROR...
  308. d c 5
  309. d SSH_DISCONNECT_COMPRESSION_ERROR...
  310. d c 6
  311. d SSH_DISCONNECT_SERVICE_NOT_AVAILABLE...
  312. d c 7
  313. d SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED...
  314. d c 8
  315. d SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE...
  316. d c 9
  317. d SSH_DISCONNECT_CONNECTION_LOST...
  318. d c 10
  319. d SSH_DISCONNECT_BY_APPLICATION...
  320. d c 11
  321. d SSH_DISCONNECT_TOO_MANY_CONNECTIONS...
  322. d c 12
  323. d SSH_DISCONNECT_AUTH_CANCELLED_BY_USER...
  324. d c 13
  325. d SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE...
  326. d c 14
  327. d SSH_DISCONNECT_ILLEGAL_USER_NAME...
  328. d c 15
  329. * Error Codes (defined by libssh2).
  330. d LIBSSH2_ERROR_NONE...
  331. d c 0
  332. * The library once used -1 as a generic error return value on numerous
  333. * places through the code, which subsequently was converted to
  334. * LIBSSH2_ERROR_SOCKET_NONE uses over time. As this is a generic error
  335. * code, the goal is to never ever return this code but instead make sure
  336. * that a more accurate and descriptive error code is used.
  337. d LIBSSH2_ERROR_SOCKET_NONE...
  338. d c -1
  339. d LIBSSH2_ERROR_BANNER_RECV...
  340. d c -2
  341. d LIBSSH2_ERROR_BANNER_SEND...
  342. d c -3
  343. d LIBSSH2_ERROR_INVALID_MAC...
  344. d c -4
  345. d LIBSSH2_ERROR_KEX_FAILURE...
  346. d c -5
  347. d LIBSSH2_ERROR_ALLOC...
  348. d c -6
  349. d LIBSSH2_ERROR_SOCKET_SEND...
  350. d c -7
  351. d LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE...
  352. d c -8
  353. d LIBSSH2_ERROR_TIMEOUT...
  354. d c -9
  355. d LIBSSH2_ERROR_HOSTKEY_INIT...
  356. d c -10
  357. d LIBSSH2_ERROR_HOSTKEY_SIGN...
  358. d c -11
  359. d LIBSSH2_ERROR_DECRYPT...
  360. d c -12
  361. d LIBSSH2_ERROR_SOCKET_DISCONNECT...
  362. d c -13
  363. d LIBSSH2_ERROR_PROTO...
  364. d c -14
  365. d LIBSSH2_ERROR_PASSWORD_EXPIRED...
  366. d c -15
  367. d LIBSSH2_ERROR_FILE...
  368. d c -16
  369. d LIBSSH2_ERROR_METHOD_NONE...
  370. d c -17
  371. d LIBSSH2_ERROR_AUTHENTICATION_FAILED...
  372. d c -18
  373. d LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED...
  374. d c -18
  375. d LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED...
  376. d c -19
  377. d LIBSSH2_ERROR_CHANNEL_OUTOFORDER...
  378. d c -20
  379. d LIBSSH2_ERROR_CHANNEL_FAILURE...
  380. d c -21
  381. d LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED...
  382. d c -22
  383. d LIBSSH2_ERROR_CHANNEL_UNKNOWN...
  384. d c -23
  385. d LIBSSH2_ERROR_CHANNEL_WINDOW_EXCEEDED...
  386. d c -24
  387. d LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED...
  388. d c -25
  389. d LIBSSH2_ERROR_CHANNEL_CLOSED...
  390. d c -26
  391. d LIBSSH2_ERROR_CHANNEL_EOF_SENT...
  392. d c -27
  393. d LIBSSH2_ERROR_SCP_PROTOCOL...
  394. d c -28
  395. d LIBSSH2_ERROR_ZLIB...
  396. d c -29
  397. d LIBSSH2_ERROR_SOCKET_TIMEOUT...
  398. d c -30
  399. d LIBSSH2_ERROR_SFTP_PROTOCOL...
  400. d c -31
  401. d LIBSSH2_ERROR_REQUEST_DENIED...
  402. d c -32
  403. d LIBSSH2_ERROR_METHOD_NOT_SUPPORTED...
  404. d c -33
  405. d LIBSSH2_ERROR_INVAL...
  406. d c -34
  407. d LIBSSH2_ERROR_INVALID_POLL_TYPE...
  408. d c -35
  409. d LIBSSH2_ERROR_PUBLICKEY_PROTOCOL...
  410. d c -36
  411. d LIBSSH2_ERROR_EAGAIN...
  412. d c -37
  413. d LIBSSH2_ERROR_BUFFER_TOO_SMALL...
  414. d c -38
  415. d LIBSSH2_ERROR_BAD_USE...
  416. d c -39
  417. d LIBSSH2_ERROR_COMPRESS...
  418. d c -40
  419. d LIBSSH2_ERROR_OUT_OF_BOUNDARY...
  420. d c -41
  421. d LIBSSH2_ERROR_AGENT_PROTOCOL...
  422. d c -42
  423. d LIBSSH2_ERROR_SOCKET_RECV...
  424. d c -43
  425. d LIBSSH2_ERROR_ENCRYPT...
  426. d c -44
  427. d LIBSSH2_ERROR_BAD_SOCKET...
  428. d c -45
  429. d LIBSSH2_ERROR_KNOWN_HOSTS...
  430. d c -46
  431. * this is a define to provide the old (<= 1.2.7) name.
  432. d LIBSSH2_ERROR_BANNER_NONE...
  433. d c -2
  434. * Global API.
  435. d LIBSSH2_INIT_NO_CRYPTO...
  436. d c X'0001'
  437. * libssh2_init()
  438. *
  439. * Initialize the libssh2 functions. This typically initialize the
  440. * crypto library. It uses a global state, and is not thread safe --
  441. * you must make sure this function is not called concurrently.
  442. *
  443. * Flags can be:
  444. * 0: Normal initialize
  445. * LIBSSH2_INIT_NO_CRYPTO: Do not initialize the crypto library
  446. * (ie. OPENSSL_add_cipher_algorithms() for
  447. * OpenSSL)
  448. *
  449. * Returns 0 if succeeded, or a negative value for error.
  450. d libssh2_init pr extproc('libssh2_init')
  451. d like(libssh2_Cint)
  452. d flags value like(libssh2_Cint)
  453. * libssh2_exit()
  454. *
  455. * Exit the libssh2 functions and free's all memory used internal.
  456. d libssh2_exit pr extproc('libssh2_exit')
  457. * libssh2_free()
  458. *
  459. * Deallocate memory allocated by earlier call to libssh2 functions.
  460. d libssh2_free pr extproc('libssh2_free')
  461. d session * value LIBSSH2_SESSION *
  462. d ptr * value void *
  463. * libssh2_session_supported_algs()
  464. *
  465. * Fills algs with a list of supported cryptographic algorithms. Returns a
  466. * non-negative number (number of supported algorithms) on success or a
  467. * negative number (an eror code) on failure.
  468. *
  469. * NOTE: on success, algs must be deallocated (by calling libssh2_free)
  470. * when not needed anymore
  471. d libssh2_session_supported_algs...
  472. d pr extproc(
  473. d 'libssh2_session_supported_algs')
  474. d like(libssh2_Cint)
  475. d session * value LIBSSH2_SESSION *
  476. d method_type value like(libssh2_Cint)
  477. d algs * const char **(*)
  478. * Session API.
  479. d libssh2_session_init_ex...
  480. d pr * extproc('libssh2_session_init_ex') LIBSSH2_SESSION *
  481. d my_alloc * value procptr
  482. d my_free * value procptr
  483. d my_realloc * value procptr
  484. d abstract * value void *
  485. * Implementation of C macro.
  486. d libssh2_session_init...
  487. d pr * extproc('libssh2_session_init') LIBSSH2_SESSION *
  488. d libssh2_session_abstract...
  489. d pr * extproc('libssh2_session_abstract') void * *
  490. d session * value LIBSSH2_SESSION *
  491. d libssh2_session_callback_set...
  492. d pr * extproc( void *
  493. d 'libssh2_session_callback_set')
  494. d session * value LIBSSH2_SESSION *
  495. d cbtype value like(libssh2_Cint)
  496. d callback * value void *
  497. d libssh2_session_banner_set...
  498. d pr extproc('libssh2_session_banner_set')
  499. d like(libssh2_Cint)
  500. d session * value LIBSSH2_SESSION *
  501. d banner * value options(*string) const char *
  502. d libssh2_banner_set...
  503. d pr extproc('libssh2_banner_set')
  504. d like(libssh2_Cint)
  505. d session * value LIBSSH2_SESSION *
  506. d banner * value options(*string) const char *
  507. d libssh2_session_startup...
  508. d pr extproc('libssh2_session_startup')
  509. d like(libssh2_Cint)
  510. d session * value LIBSSH2_SESSION *
  511. d sock value like(libssh2_Cint)
  512. d libssh2_session_handshake...
  513. d pr extproc('libssh2_session_handshake')
  514. d like(libssh2_Cint)
  515. d session * value LIBSSH2_SESSION *
  516. d sock value like(libssh2_socket_t)
  517. d libssh2_session_disconnect_ex...
  518. d pr extproc(
  519. d 'libssh2_session_disconnect_ex')
  520. d like(libssh2_Cint)
  521. d session * value LIBSSH2_SESSION *
  522. d reason value like(libssh2_Cint)
  523. d description * value options(*string) const char *
  524. d lang * value options(*string) const char *
  525. * Implementation of C macro.
  526. d libssh2_session_disconnect...
  527. d pr extproc('libssh2_session_disconnect')
  528. d like(libssh2_Cint)
  529. d session * value LIBSSH2_SESSION *
  530. d description * value options(*string) const char *
  531. d libssh2_session_free...
  532. d pr extproc('libssh2_session_free')
  533. d like(libssh2_Cint)
  534. d session * value LIBSSH2_SESSION *
  535. d libssh2_hostkey_hash...
  536. d pr * extproc('libssh2_hostkey_hash') const char *
  537. d session * value LIBSSH2_SESSION *
  538. d hash_type value like(libssh2_Cint)
  539. d libssh2_session_hostkey...
  540. d pr * extproc('libssh2_session_hostkey') const char *
  541. d session * value LIBSSH2_SESSION *
  542. d len like(libssh2_Csize_t)
  543. d type like(libssh2_Cint)
  544. d libssh2_session_method_pref...
  545. d pr extproc(
  546. d 'libssh2_session_method_pref')
  547. d like(libssh2_Cint)
  548. d session * value LIBSSH2_SESSION *
  549. d method_type value like(libssh2_Cint)
  550. d prefs * value options(*string) const char *
  551. d libssh2_session_methods...
  552. d pr * extproc('libssh2_session_methods') const char *
  553. d session * value LIBSSH2_SESSION *
  554. d method_type value like(libssh2_Cint)
  555. d libssh2_session_last_error...
  556. d pr extproc('libssh2_session_last_error')
  557. d like(libssh2_Cint)
  558. d session * value LIBSSH2_SESSION *
  559. d errmsg * char *(*)
  560. d errmsg_len like(libssh2_Cint)
  561. d want_buf value like(libssh2_Cint)
  562. d libssh2_session_last_errno...
  563. d pr extproc('libssh2_session_last_errno')
  564. d like(libssh2_Cint)
  565. d session * value LIBSSH2_SESSION *
  566. d libssh2_session_set_last_error...
  567. d pr extproc(
  568. d 'libssh2_session_set_last_error')
  569. d like(libssh2_Cint)
  570. d session * value LIBSSH2_SESSION *
  571. d errcode value like(libssh2_Cint)
  572. d errmsg * value options(*string) const char *
  573. d libssh2_session_block_directions...
  574. d pr extproc(
  575. d 'libssh2_session_block_directions')
  576. d like(libssh2_Cint)
  577. d session * value LIBSSH2_SESSION *
  578. d libssh2_session_flag...
  579. d pr extproc('libssh2_session_flag')
  580. d like(libssh2_Cint)
  581. d session * value LIBSSH2_SESSION *
  582. d flag value like(libssh2_Cint)
  583. d value value like(libssh2_Cint)
  584. d libssh2_session_banner_get...
  585. d pr * extproc('libssh2_session_banner_get') const char *
  586. d session * value LIBSSH2_SESSION *
  587. * Userauth API.
  588. d libssh2_userauth_list...
  589. d pr * extproc('libssh2_userauth_list') char *
  590. d session * value LIBSSH2_SESSION *
  591. d username * value options(*string) const char *
  592. d username_len value like(libssh2_Cuint)
  593. d libssh2_userauth_authenticated...
  594. d pr extproc(
  595. d 'libssh2_userauth_authenticated')
  596. d like(libssh2_Cint)
  597. d session * value LIBSSH2_SESSION *
  598. d libssh2_userauth_password_ex...
  599. d pr extproc(
  600. d 'libssh2_userauth_password_ex')
  601. d like(libssh2_Cint)
  602. d session * value LIBSSH2_SESSION *
  603. d username * value options(*string) const char *
  604. d username_len value like(libssh2_Cuint)
  605. d password * value options(*string) const char *
  606. d password_len value like(libssh2_Cuint)
  607. d passwd_change_cb...
  608. d * value procptr
  609. * Implementation of C macro.
  610. d libssh2_userauth_password...
  611. d pr extproc('libssh2_userauth_password')
  612. d like(libssh2_Cint)
  613. d session * value LIBSSH2_SESSION *
  614. d username * value options(*string) const char *
  615. d password * value options(*string) const char *
  616. d libssh2_userauth_publickey_fromfile_ex...
  617. d pr extproc('libssh2_userauth_publickey_-
  618. d fromfile_ex')
  619. d like(libssh2_Cint)
  620. d session * value LIBSSH2_SESSION *
  621. d username * value options(*string) const char *
  622. d username_len value like(libssh2_Cuint)
  623. d publickey * value options(*string) const char *
  624. d privatekey * value options(*string) const char *
  625. d passphrase * value options(*string) const char *
  626. * Implementation of C macro.
  627. d libssh2_userauth_publickey_fromfile...
  628. d pr extproc(
  629. d 'libssh2_userauth_publickey_fromfile'
  630. d )
  631. d like(libssh2_Cint)
  632. d session * value LIBSSH2_SESSION *
  633. d username * value options(*string) const char *
  634. d publickey * value options(*string) const char *
  635. d privatekey * value options(*string) const char *
  636. d passphrase * value options(*string) const char *
  637. d libssh2_userauth_publickey...
  638. d pr extproc('libssh2_userauth_publickey')
  639. d like(libssh2_Cint)
  640. d session * value LIBSSH2_SESSION *
  641. d username * value options(*string) const char *
  642. d pubkeydata * value options(*string) const unsigned char*
  643. d pubkeydata_len...
  644. d value like(libssh2_Csize_t)
  645. d sign_callback * value procptr
  646. d abstract * void *(*)
  647. d libssh2_userauth_hostbased_fromfile_ex...
  648. d pr extproc('libssh2_userauth_hostbased_-
  649. d fromfile_ex')
  650. d like(libssh2_Cint)
  651. d session * value LIBSSH2_SESSION *
  652. d username * value options(*string) const char *
  653. d username_len value like(libssh2_Cuint)
  654. d publickey * value options(*string) const char *
  655. d privatekey * value options(*string) const char *
  656. d passphrase * value options(*string) const char *
  657. d hostname * value options(*string) const char *
  658. d hostname_len value like(libssh2_Cuint)
  659. d local_username...
  660. d * value options(*string) const char *
  661. d local_username_len...
  662. d value like(libssh2_Cuint)
  663. * C macro implementation.
  664. d libssh2_userauth_hostbased_fromfile...
  665. d pr extproc(
  666. d 'libssh2_userauth_hostbased_fromfile'
  667. d )
  668. d like(libssh2_Cint)
  669. d session * value LIBSSH2_SESSION *
  670. d username * value options(*string) const char *
  671. d publickey * value options(*string) const char *
  672. d privatekey * value options(*string) const char *
  673. d passphrase * value options(*string) const char *
  674. d hostname * value options(*string) const char *
  675. d libssh2_userauth_publickey_frommemory...
  676. d pr extproc('libssh2_userauth_publickey_-
  677. d frommemory')
  678. d like(libssh2_Cint)
  679. d session * value LIBSSH2_SESSION *
  680. d username * value options(*string) const char *
  681. d username_len value like(libssh2_Csize_t)
  682. d publickeyfiledata...
  683. d * value options(*string) const char *
  684. d publickeyfiledata_len...
  685. d value like(libssh2_Csize_t)
  686. d privatekeyfiledata...
  687. d * value options(*string) const char *
  688. d privatekeyfiledata_len...
  689. d value like(libssh2_Csize_t)
  690. d passphrase * value options(*string) const char *
  691. * response_callback is provided with filled by library prompts array,
  692. * but client must allocate and fill individual responses. Responses
  693. * array is already allocated. Responses data will be freed by libssh2
  694. * after callback return, but before subsequent callback invokation.
  695. d libssh2_userauth_keyboard_interactive_ex...
  696. d pr extproc('libssh2_userauth_keyboard_i-
  697. d nteractive_ex')
  698. d like(libssh2_Cint)
  699. d session * value LIBSSH2_SESSION *
  700. d username * value options(*string) const char *
  701. d username_len value like(libssh2_Cuint)
  702. d response_callback...
  703. d * value procptr
  704. * C macro implementation.
  705. d libssh2_userauth_keyboard_interactive...
  706. d pr extproc('libssh2_userauth_keyboard_i-
  707. d nteractive')
  708. d like(libssh2_Cint)
  709. d session * value LIBSSH2_SESSION *
  710. d username * value options(*string) const char *
  711. d response_callback...
  712. d * value procptr
  713. d libssh2_poll pr extproc('libssh2_poll')
  714. d like(libssh2_Cint)
  715. d fds * value LIBSSH2_POLLFD *
  716. d nfds value like(libssh2_Cuint)
  717. d timeout value like(libssh2_Clong)
  718. * Channel API.
  719. d LIBSSH2_CHANNEL_WINDOW_DEFAULT...
  720. d c X'00200000'
  721. d LIBSSH2_CHANNEL_PACKET_DEFAULT...
  722. d c 32768
  723. d LIBSSH2_CHANNEL_MINADJUST...
  724. d c 1024
  725. * Extended Data Handling.
  726. d LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL...
  727. d c 0
  728. d LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE...
  729. d c 1
  730. d LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE...
  731. d c 2
  732. d SSH_EXTENDED_DATA_STDERR...
  733. d c 1
  734. * Returned by any function that would block during a read/write
  735. * operation.
  736. d LIBSSH2CHANNEL_EAGAIN... LIBSSH2_ERROR_EAGAIN
  737. d c -37
  738. d libssh2_channel_open_ex...
  739. d pr * extproc('libssh2_channel_open_ex') LIBSSH2_CHANNEL *
  740. d session * value LIBSSH2_SESSION *
  741. d channel_type * value options(*string) const char *
  742. d channel_type_len...
  743. d value like(libssh2_Cuint)
  744. d window_size value like(libssh2_Cuint)
  745. d packet_size value like(libssh2_Cuint)
  746. d message * value options(*string) const char *
  747. d message_len value like(libssh2_Cuint)
  748. * C macro implementation.
  749. d libssh2_channel_open_session...
  750. d pr * extproc( LIBSSH2_CHANNEL *
  751. d 'libssh2_channel_open_session')
  752. d session * value LIBSSH2_SESSION *
  753. d libssh2_channel_direct_tcpip_ex...
  754. d pr * extproc( LIBSSH2_CHANNEL *
  755. d 'libssh2_channel_direct_tcpip_ex')
  756. d session * value LIBSSH2_SESSION *
  757. d host * value options(*string) const char *
  758. d port value like(libssh2_Cint)
  759. d shost * value options(*string) const char *
  760. d sport value like(libssh2_Cint)
  761. * C macro implementation.
  762. d libssh2_channel_direct_tcpip...
  763. d pr * extproc( LIBSSH2_CHANNEL *
  764. d 'libssh2_channel_direct_tcpip')
  765. d session * value LIBSSH2_SESSION *
  766. d host * value options(*string) const char *
  767. d port value like(libssh2_Cint)
  768. d libssh2_channel_forward_listen_ex...
  769. d pr * extproc( LIBSSH2_LISTENER *
  770. d 'libssh2_channel_forward_listen_ex')
  771. d session * value LIBSSH2_SESSION *
  772. d host * value options(*string) const char *
  773. d port value like(libssh2_Cint)
  774. d bound_port like(libssh2_Cint)
  775. d queue_maxsize value like(libssh2_Cint)
  776. * C macro implementation.
  777. d libssh2_channel_forward_listen...
  778. d pr * extproc( LIBSSH2_LISTENER *
  779. d 'libssh2_channel_forward_listen')
  780. d session * value LIBSSH2_SESSION *
  781. d port value like(libssh2_Cint)
  782. d libssh2_channel_forward_cancel...
  783. d pr extproc(
  784. d 'libssh2_channel_forward_cancel')
  785. d like(libssh2_Cint)
  786. d listener * value LIBSSH2_LISTENER *
  787. d libssh2_channel_forward_accept...
  788. d pr * extproc( LIBSSH2_CHANNEL *
  789. d 'libssh2_channel_forward_accept')
  790. d listener * value LIBSSH2_LISTENER *
  791. d libssh2_channel_setenv_ex...
  792. d pr extproc('libssh2_channel_setenv_ex')
  793. d like(libssh2_Cint)
  794. d channel * value LIBSSH2_CHANNEL *
  795. d varname * value options(*string) const char *
  796. d varname_len value like(libssh2_Cuint)
  797. d value * value options(*string) const char *
  798. d value_len value like(libssh2_Cuint)
  799. * C macro implementation.
  800. d libssh2_channel_setenv...
  801. d pr extproc('libssh2_channel_setenv')
  802. d like(libssh2_Cint)
  803. d channel * value LIBSSH2_CHANNEL *
  804. d varname * value options(*string) const char *
  805. d value * value options(*string) const char *
  806. d libssh2_channel_request_pty_ex...
  807. d pr extproc(
  808. d 'libssh2_channel_request_pty_ex')
  809. d like(libssh2_Cint)
  810. d channel * value LIBSSH2_CHANNEL *
  811. d term * value options(*string) const char *
  812. d term_len value like(libssh2_Cuint)
  813. d modes * value options(*string) const char *
  814. d modes_len value like(libssh2_Cuint)
  815. d width value like(libssh2_Cint)
  816. d height value like(libssh2_Cint)
  817. d width_px value like(libssh2_Cint)
  818. d height_px value like(libssh2_Cint)
  819. * C macro implementation.
  820. d libssh2_channel_request_pty...
  821. d pr extproc(
  822. d 'libssh2_channel_request_pty')
  823. d like(libssh2_Cint)
  824. d channel * value LIBSSH2_CHANNEL *
  825. d term * value options(*string) const char *
  826. d libssh2_channel_request_pty_size_ex...
  827. d pr extproc(
  828. d 'libssh2_channel_request_pty_size_ex'
  829. d )
  830. d like(libssh2_Cint)
  831. d channel * value LIBSSH2_CHANNEL *
  832. d width value like(libssh2_Cint)
  833. d height value like(libssh2_Cint)
  834. d width_px value like(libssh2_Cint)
  835. d height_px value like(libssh2_Cint)
  836. * C macro implementation.
  837. d libssh2_channel_request_pty_size...
  838. d pr extproc(
  839. d 'libssh2_channel_request_pty_size')
  840. d like(libssh2_Cint)
  841. d channel * value LIBSSH2_CHANNEL *
  842. d width value like(libssh2_Cint)
  843. d height value like(libssh2_Cint)
  844. d libssh2_channel_x11_req_ex...
  845. d pr extproc('libssh2_channel_x11_req_ex')
  846. d like(libssh2_Cint)
  847. d channel * value LIBSSH2_CHANNEL *
  848. d single_connection...
  849. d value like(libssh2_Cint)
  850. d auth_proto * value options(*string) const char *
  851. d auth_cookie * value options(*string) const char *
  852. d screen_number value like(libssh2_Cint)
  853. * C macro implementation.
  854. d libssh2_channel_x11_req...
  855. d pr extproc('libssh2_channel_x11_req')
  856. d like(libssh2_Cint)
  857. d channel * value LIBSSH2_CHANNEL *
  858. d screen_number value like(libssh2_Cint)
  859. d libssh2_channel_process_startup...
  860. d pr extproc(
  861. d 'libssh2_channel_process_startup')
  862. d like(libssh2_Cint)
  863. d channel * value LIBSSH2_CHANNEL *
  864. d request * value options(*string) const char *
  865. d request_len value like(libssh2_Cuint)
  866. d message * value options(*string) const char *
  867. d message_len value like(libssh2_Cuint)
  868. * C macro implementation.
  869. d libssh2_channel_shell...
  870. d pr extproc('libssh2_channel_shell')
  871. d like(libssh2_Cint)
  872. d channel * value LIBSSH2_CHANNEL *
  873. * C macro implementation.
  874. d libssh2_channel_exec...
  875. d pr extproc('libssh2_channel_exec')
  876. d like(libssh2_Cint)
  877. d channel * value LIBSSH2_CHANNEL *
  878. d command * value options(*string) const char *
  879. * C macro implementation.
  880. d libssh2_channel_subsystem...
  881. d pr extproc('libssh2_channel_subsystem')
  882. d like(libssh2_Cint)
  883. d channel * value LIBSSH2_CHANNEL *
  884. d subsystem * value options(*string) const char *
  885. d libssh2_channel_read_ex...
  886. d pr extproc('libssh2_channel_read_ex')
  887. d like(libssh2_Cssize_t)
  888. d channel * value LIBSSH2_CHANNEL *
  889. d stream_id value like(libssh2_Cint)
  890. d buf * value char *
  891. d buflen value like(libssh2_Csize_t)
  892. * C macro implementation.
  893. d libssh2_channel_read...
  894. d pr extproc('libssh2_channel_read')
  895. d like(libssh2_Cssize_t)
  896. d channel * value LIBSSH2_CHANNEL *
  897. d buf * value char *
  898. d buflen value like(libssh2_Csize_t)
  899. * C macro implementation.
  900. d libssh2_channel_read_stderr...
  901. d pr extproc(
  902. d 'libssh2_channel_read_stderr')
  903. d like(libssh2_Cssize_t)
  904. d channel * value LIBSSH2_CHANNEL *
  905. d buf * value char *
  906. d buflen value like(libssh2_Csize_t)
  907. d libssh2_poll_channel_read...
  908. d pr extproc('libssh2_poll_channel_read')
  909. d like(libssh2_Cint)
  910. d channel * value LIBSSH2_CHANNEL *
  911. d extended value like(libssh2_Cint)
  912. d libssh2_channel_window_read_ex...
  913. d pr extproc(
  914. d 'libssh2_channel_window_read_ex')
  915. d like(libssh2_Culong)
  916. d channel * value LIBSSH2_CHANNEL *
  917. d read_avail like(libssh2_Culong)
  918. d window_size_initial...
  919. d like(libssh2_Culong)
  920. * C macro implementation.
  921. d libssh2_channel_window_read...
  922. d pr extproc(
  923. d 'libssh2_channel_window_read')
  924. d like(libssh2_Culong)
  925. d channel * value LIBSSH2_CHANNEL *
  926. d libssh2_channel_receive_window_adjust2...
  927. d pr extproc('libssh2_channel_receive_win-
  928. d dow_adjust2')
  929. d like(libssh2_Cint)
  930. d channel * value LIBSSH2_CHANNEL *
  931. d adjustment value like(libssh2_Culong)
  932. d force value like(libssh2_Cuchar)
  933. d storewindow like(libssh2_Cuint)
  934. d libssh2_channel_write_ex...
  935. d pr extproc('libssh2_channel_write_ex')
  936. d like(libssh2_Cssize_t)
  937. d channel * value LIBSSH2_CHANNEL *
  938. d stream_id value like(libssh2_Cint)
  939. d buf * value options(*string) const char *
  940. d buflen value like(libssh2_Csize_t)
  941. * C macro implementation.
  942. d libssh2_channel_write...
  943. d pr extproc('libssh2_channel_write')
  944. d like(libssh2_Cssize_t)
  945. d channel * value LIBSSH2_CHANNEL *
  946. d buf * value options(*string) const char *
  947. d buflen value like(libssh2_Csize_t)
  948. * C macro implementation.
  949. d libssh2_channel_write_stderr...
  950. d pr extproc(
  951. d 'libssh2_channel_write_stderr')
  952. d like(libssh2_Cssize_t)
  953. d channel * value LIBSSH2_CHANNEL *
  954. d buf * value options(*string) const char *
  955. d buflen value like(libssh2_Csize_t)
  956. d libssh2_channel_window_write_ex...
  957. d pr extproc(
  958. d 'libssh2_channel_window_write_ex')
  959. d like(libssh2_Culong)
  960. d channel * value LIBSSH2_CHANNEL *
  961. d window_size_initial...
  962. d like(libssh2_Culong)
  963. * C macro implementation.
  964. d libssh2_channel_window_write...
  965. d pr extproc(
  966. d 'libssh2_channel_window_write')
  967. d like(libssh2_Culong)
  968. d channel * value LIBSSH2_CHANNEL *
  969. d libssh2_session_set_blocking...
  970. d pr extproc(
  971. d 'libssh2_session_set_blocking')
  972. d session * value LIBSSH2_SESSION *
  973. d blocking value like(libssh2_Cint)
  974. d libssh2_session_get_blocking...
  975. d pr extproc(
  976. d 'libssh2_session_get_blocking')
  977. d like(libssh2_Cint)
  978. d session * value LIBSSH2_SESSION *
  979. d libssh2_channel_set_blocking...
  980. d pr extproc(
  981. d 'libssh2_channel_set_blocking')
  982. d channel * value LIBSSH2_CHANNEL *
  983. d blocking value like(libssh2_Cint)
  984. d libssh2_session_set_timeout...
  985. d pr extproc(
  986. d 'libssh2_session_set_timeout')
  987. d session * value LIBSSH2_SESSION *
  988. d timeout value like(libssh2_Clong)
  989. d libssh2_session_get_timeout...
  990. d pr extproc(
  991. d 'libssh2_session_get_timeout')
  992. d like(libssh2_Clong)
  993. d session * value LIBSSH2_SESSION *
  994. d libssh2_channel_handle_extended_data2...
  995. d pr extproc('libssh2_channel_handle_exte-
  996. d nded_data2')
  997. d like(libssh2_Cint)
  998. d channel * value LIBSSH2_CHANNEL *
  999. d ignore_mode value like(libssh2_Cint)
  1000. * libssh2_channel_ignore_extended_data() is defined below for BC with
  1001. * version 0.1.
  1002. d LIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA...
  1003. d c -1
  1004. d LIBSSH2_CHANNEL_FLUSH_ALL...
  1005. d c -2
  1006. d libssh2_channel_flush_ex...
  1007. d pr extproc('libssh2_channel_flush_ex')
  1008. d like(libssh2_Cint)
  1009. d channel * value LIBSSH2_CHANNEL *
  1010. d streamid value like(libssh2_Cint)
  1011. * C macro implementation.
  1012. d libssh2_channel_flush...
  1013. d pr extproc('libssh2_channel_flush')
  1014. d like(libssh2_Cint)
  1015. d channel * value LIBSSH2_CHANNEL *
  1016. * C macro implementation.
  1017. d libssh2_channel_flush_stderr...
  1018. d pr extproc(
  1019. d 'libssh2_channel_flush_stderr')
  1020. d like(libssh2_Cint)
  1021. d channel * value LIBSSH2_CHANNEL *
  1022. d libssh2_channel_get_exit_status...
  1023. d pr extproc(
  1024. d 'libssh2_channel_get_exit_status')
  1025. d like(libssh2_Cint)
  1026. d channel * value LIBSSH2_CHANNEL *
  1027. d libssh2_channel_get_exit_signal...
  1028. d pr extproc(
  1029. d 'libssh2_channel_get_exit_signal')
  1030. d like(libssh2_Cint)
  1031. d channel * value LIBSSH2_CHANNEL *
  1032. d exitsignal * char *(*)
  1033. d exitsignal_len...
  1034. d like(libssh2_Csize_t)
  1035. d errmsg * char *(*)
  1036. d errmsg_len like(libssh2_Csize_t)
  1037. d langtag * char *(*)
  1038. d langtag_len like(libssh2_Csize_t)
  1039. d libssh2_channel_send_eof...
  1040. d pr extproc('libssh2_channel_send_eof')
  1041. d like(libssh2_Cint)
  1042. d channel * value LIBSSH2_CHANNEL *
  1043. d libssh2_channel_eof...
  1044. d pr extproc('libssh2_channel_eof')
  1045. d like(libssh2_Cint)
  1046. d channel * value LIBSSH2_CHANNEL *
  1047. d libssh2_channel_wait_eof...
  1048. d pr extproc('libssh2_channel_wait_eof')
  1049. d like(libssh2_Cint)
  1050. d channel * value LIBSSH2_CHANNEL *
  1051. d libssh2_channel_close...
  1052. d pr extproc('libssh2_channel_close')
  1053. d like(libssh2_Cint)
  1054. d channel * value LIBSSH2_CHANNEL *
  1055. d libssh2_channel_wait_closed...
  1056. d pr extproc(
  1057. d 'libssh2_channel_wait_closed')
  1058. d like(libssh2_Cint)
  1059. d channel * value LIBSSH2_CHANNEL *
  1060. d libssh2_channel_free...
  1061. d pr extproc('libssh2_channel_free')
  1062. d like(libssh2_Cint)
  1063. d channel * value LIBSSH2_CHANNEL *
  1064. * Use libssh2_scp_recv2 for large (> 2GB) file support.
  1065. d libssh2_scp_recv2...
  1066. d pr * extproc('libssh2_scp_recv2') LIBSSH2_CHANNEL *
  1067. d session * value LIBSSH2_SESSION *
  1068. d path * value options(*string) const char *
  1069. d sb likeds(libssh2_struct_stat)
  1070. d libssh2_scp_send_ex...
  1071. d pr * extproc('libssh2_scp_send_ex') LIBSSH2_CHANNEL *
  1072. d session * value LIBSSH2_SESSION *
  1073. d path * value options(*string) const char *
  1074. d mode value like(libssh2_Cint)
  1075. d size value like(libssh2_Csize_t)
  1076. d mtime value like(libssh2_Clong)
  1077. d atime value like(libssh2_Clong)
  1078. d libssh2_scp_send64...
  1079. d pr * extproc('libssh2_scp_send64') LIBSSH2_CHANNEL *
  1080. d session * value LIBSSH2_SESSION *
  1081. d path * value options(*string) const char *
  1082. d mode value like(libssh2_Cint)
  1083. d size value like(libssh2_int64_t)
  1084. d mtime value like(libssh2_time_t)
  1085. d atime value like(libssh2_time_t)
  1086. * C macro implementation.
  1087. d libssh2_scp_send...
  1088. d pr * extproc('libssh2_scp_send') LIBSSH2_CHANNEL *
  1089. d session * value LIBSSH2_SESSION *
  1090. d path * value options(*string) const char *
  1091. d mode value like(libssh2_Cint)
  1092. d size value like(libssh2_int64_t)
  1093. d libssh2_base64_decode...
  1094. d pr extproc('libssh2_base64_decode')
  1095. d like(libssh2_Cint)
  1096. d session * value LIBSSH2_SESSION *
  1097. d dest * value char * *
  1098. d dest_len * value unsigned int *
  1099. d src * value options(*string) const char *
  1100. d src_len value like(libssh2_Cuint)
  1101. * Procedure libssh2_version renamed to avoid upper/lower case name clash.
  1102. d libssh2_get_version...
  1103. d pr * extproc('libssh2_version') const char *
  1104. d req_version_num...
  1105. d value like(libssh2_Cint)
  1106. d HAVE_LIBSSH2_KNOWNHOST_API... since 1.1.1
  1107. d c X'010101'
  1108. d HAVE_LIBSSH2_VERSION_API... since 1.1
  1109. d c X'010100'
  1110. d libssh2_knownhost...
  1111. d ds based(######typedef######)
  1112. d align qualified
  1113. d magic like(libssh2_Cuint)
  1114. d node * void *
  1115. d name * char *
  1116. d key * char *
  1117. d typemask like(libssh2_Cint)
  1118. * libssh2_knownhost_init
  1119. *
  1120. * Init a collection of known hosts. Returns the pointer to a collection.
  1121. d libssh2_knownhost_init...
  1122. d pr * extproc('libssh2_knownhost_init') LIBSSH2_KNOWNHOSTS *
  1123. d session * value LIBSSH2_SESSION *
  1124. * libssh2_knownhost_add
  1125. *
  1126. * Add a host and its associated key to the collection of known hosts.
  1127. *
  1128. * The 'type' argument specifies on what format the given host and
  1129. * keys are:
  1130. *
  1131. * plain - ascii "hostname.domain.tld"
  1132. * sha1 - SHA1(<salt> <host>) base64-encoded!
  1133. * custom - another hash
  1134. *
  1135. * If 'sha1' is selected as type, the salt must be provided to the salt
  1136. * argument. This too base64 encoded.
  1137. *
  1138. * The SHA-1 hash is what OpenSSH can be told to use in known_hosts files.
  1139. * If a custom type is used, salt is ignored and you must provide the host
  1140. * pre-hashed when checking for it in the libssh2_knownhost_check()
  1141. * function.
  1142. *
  1143. * The keylen parameter may be omitted (zero) if the key is provided as a
  1144. * NULL-terminated base64-encoded string.
  1145. * host format (2 bits).
  1146. d LIBSSH2_KNOWNHOST_TYPE_MASK...
  1147. d c X'FFFF'
  1148. d LIBSSH2_KNOWNHOST_TYPE_PLAIN...
  1149. d c 1
  1150. d LIBSSH2_KNOWNHOST_TYPE_SHA1... always base64 ncoded
  1151. d c 2
  1152. d LIBSSH2_KNOWNHOST_TYPE_CUSTOM...
  1153. d c 3
  1154. * key format (2 bits).
  1155. d LIBSSH2_KNOWNHOST_KEYENC_MASK...
  1156. d c X'00030000'
  1157. d LIBSSH2_KNOWNHOST_KEYENC_RAW...
  1158. d c X'00010000'
  1159. d LIBSSH2_KNOWNHOST_KEYENC_BASE64...
  1160. d c X'00020000'
  1161. * type of key (3 bits).
  1162. d LIBSSH2_KNOWNHOST_KEY_MASK...
  1163. d c X'001C0000'
  1164. d LIBSSH2_KNOWNHOST_KEY_SHIFT...
  1165. d c 18
  1166. d LIBSSH2_KNOWNHOST_KEY_RSA1...
  1167. d c X'00040000'
  1168. d LIBSSH2_KNOWNHOST_KEY_SSHRSA...
  1169. d c X'00080000'
  1170. d LIBSSH2_KNOWNHOST_KEY_SSHDSS...
  1171. d c X'000C0000'
  1172. d LIBSSH2_KNOWNHOST_KEY_UNKNOWN...
  1173. d c X'001C0000'
  1174. d libssh2_knownhost_add...
  1175. d pr extproc('libssh2_knownhost_add')
  1176. d like(libssh2_Cint)
  1177. d hosts * value LIBSSH2_KNOWNHOSTS *
  1178. d host * value options(*string) const char *
  1179. d salt * value options(*string) const char *
  1180. d key * value options(*string) const char *
  1181. d keylen value like(libssh2_Csize_t)
  1182. d typemask value like(libssh2_Cint)
  1183. d store * libssh2_knownhost *
  1184. * libssh2_knownhost_addc
  1185. *
  1186. * Add a host and its associated key to the collection of known hosts.
  1187. *
  1188. * Takes a comment argument that may be NULL. A NULL comment indicates
  1189. * there is no comment and the entry will end directly after the key
  1190. * when written out to a file. An empty string "" comment will indicate an
  1191. * empty comment which will cause a single space to be written after the
  1192. * key.
  1193. *
  1194. * The 'type' argument specifies on what format the given host and keys
  1195. * are:
  1196. *
  1197. * plain - ascii "hostname.domain.tld"
  1198. * sha1 - SHA1(<salt> <host>) base64-encoded!
  1199. * custom - another hash
  1200. *
  1201. * If 'sha1' is selected as type, the salt must be provided to the salt
  1202. * argument. This too base64 encoded.
  1203. *
  1204. * The SHA-1 hash is what OpenSSH can be told to use in known_hosts files.
  1205. * If a custom type is used, salt is ignored and you must provide the host
  1206. * pre-hashed when checking for it in the libssh2_knownhost_check()
  1207. * function.
  1208. *
  1209. * The keylen parameter may be omitted (zero) if the key is provided as a
  1210. * NULL-terminated base64-encoded string.
  1211. d libssh2_knownhost_addc...
  1212. d pr extproc('libssh2_knownhost_addc')
  1213. d like(libssh2_Cint)
  1214. d hosts * value LIBSSH2_KNOWNHOSTS *
  1215. d host * value options(*string) const char *
  1216. d salt * value options(*string) const char *
  1217. d key * value options(*string) const char *
  1218. d keylen value like(libssh2_Csize_t)
  1219. d comment * value options(*string) const char *
  1220. d commentlen value like(libssh2_Csize_t)
  1221. d typemask value like(libssh2_Cint)
  1222. d store * libssh2_knownhost *
  1223. * libssh2_knownhost_check
  1224. *
  1225. * Check a host and its associated key against the collection of known
  1226. * hosts.
  1227. *
  1228. * The type is the type/format of the given host name.
  1229. *
  1230. * plain - ascii "hostname.domain.tld"
  1231. * custom - prehashed base64 encoded. Note that this cannot use any salts.
  1232. *
  1233. *
  1234. * 'knownhost' may be set to NULL if you don't care about that info.
  1235. *
  1236. * Returns:
  1237. *
  1238. * LIBSSH2_KNOWNHOST_CHECK_* values, see below.
  1239. d LIBSSH2_KNOWNHOST_CHECK_MATCH...
  1240. d c 0
  1241. d LIBSSH2_KNOWNHOST_CHECK_MISMATCH...
  1242. d c 1
  1243. d LIBSSH2_KNOWNHOST_CHECK_NOTFOUND...
  1244. d c 2
  1245. d LIBSSH2_KNOWNHOST_CHECK_FAILURE...
  1246. d c 3
  1247. d libssh2_knownhost_check...
  1248. d pr extproc('libssh2_knownhost_check')
  1249. d like(libssh2_Cint)
  1250. d hosts * value LIBSSH2_KNOWNHOSTS *
  1251. d host * value options(*string) const char *
  1252. d key * value options(*string) const char *
  1253. d keylen value like(libssh2_Csize_t)
  1254. d typemask value like(libssh2_Cint)
  1255. d knownhost * libssh2_knownhost *
  1256. * this function is identital to the above one, but also takes a port
  1257. * argument that allows libssh2 to do a better check.
  1258. d libssh2_knownhost_checkp...
  1259. d pr extproc('libssh2_knownhost_checkp')
  1260. d like(libssh2_Cint)
  1261. d hosts * value LIBSSH2_KNOWNHOSTS *
  1262. d host * value options(*string) const char *
  1263. d port value like(libssh2_Cint)
  1264. d key * value options(*string) const char *
  1265. d keylen value like(libssh2_Csize_t)
  1266. d typemask value like(libssh2_Cint)
  1267. d knownhost * libssh2_knownhost *
  1268. * libssh2_knownhost_del
  1269. *
  1270. * Remove a host from the collection of known hosts. The 'entry' struct is
  1271. * retrieved by a call to libssh2_knownhost_check().
  1272. d libssh2_knownhost_del...
  1273. d pr extproc('libssh2_knownhost_del')
  1274. d like(libssh2_Cint)
  1275. d hosts * value LIBSSH2_KNOWNHOSTS *
  1276. d entry likeds(libssh2_knownhost)
  1277. * libssh2_knownhost_free
  1278. *
  1279. * Free an entire collection of known hosts.
  1280. d libssh2_knownhost_free...
  1281. d pr extproc('libssh2_knownhost_free')
  1282. d hosts * value LIBSSH2_KNOWNHOSTS *
  1283. * libssh2_knownhost_readline()
  1284. *
  1285. * Pass in a line of a file of 'type'. It makes libssh2 read this line.
  1286. *
  1287. * LIBSSH2_KNOWNHOST_FILE_OPENSSH is the only supported type.
  1288. d libssh2_knownhost_readline...
  1289. d pr extproc('libssh2_knownhost_readline')
  1290. d like(libssh2_Cint)
  1291. d hosts * value LIBSSH2_KNOWNHOSTS *
  1292. d line * value options(*string) const char *
  1293. d len value like(libssh2_Csize_t)
  1294. d type value like(libssh2_Cint)
  1295. * libssh2_knownhost_readfile
  1296. *
  1297. * Add hosts+key pairs from a given file.
  1298. *
  1299. * Returns a negative value for error or number of successfully added
  1300. * hosts.
  1301. *
  1302. * This implementation currently only knows one 'type' (openssh), all
  1303. * others are reserved for future use.
  1304. d LIBSSH2_KNOWNHOST_FILE_OPENSSH...
  1305. d c 1
  1306. d libssh2_knownhost_readfile...
  1307. d pr extproc('libssh2_knownhost_readfile')
  1308. d like(libssh2_Cint)
  1309. d hosts * value LIBSSH2_KNOWNHOSTS *
  1310. d filename * value options(*string) const char *
  1311. d type value like(libssh2_Cint)
  1312. * libssh2_knownhost_writeline()
  1313. *
  1314. * Ask libssh2 to convert a known host to an output line for storage.
  1315. *
  1316. * Note that this function returns LIBSSH2_ERROR_BUFFER_TOO_SMALL if the
  1317. * given output buffer is too small to hold the desired output.
  1318. *
  1319. * This implementation currently only knows one 'type' (openssh), all
  1320. * others are reserved for future use.
  1321. d libssh2_knownhost_writeline...
  1322. d pr extproc(
  1323. d 'libssh2_knownhost_writeline')
  1324. d like(libssh2_Cint)
  1325. d hosts * value LIBSSH2_KNOWNHOSTS *
  1326. d known likeds(libssh2_knownhost)
  1327. d buffer * value options(*string) char *
  1328. d buflen value like(libssh2_Csize_t)
  1329. d outlen like(libssh2_Csize_t) Written data amount
  1330. d type value like(libssh2_Cint)
  1331. * libssh2_knownhost_writefile
  1332. *
  1333. * Write hosts+key pairs to a given file.
  1334. *
  1335. * This implementation currently only knows one 'type' (openssh), all
  1336. * others are reserved for future use.
  1337. d libssh2_knownhost_writefile...
  1338. d pr extproc(
  1339. d 'libssh2_knownhost_writefile')
  1340. d like(libssh2_Cint)
  1341. d hosts * value LIBSSH2_KNOWNHOSTS *
  1342. d filename * value options(*string) const char *
  1343. d type value like(libssh2_Cint)
  1344. * libssh2_knownhost_get()
  1345. *
  1346. * Traverse the internal list of known hosts. Pass NULL to 'prev' to get
  1347. * the first one. Or pass a poiner to the previously returned one to
  1348. * get the next.
  1349. *
  1350. * Returns:
  1351. * 0 if a fine host was stored in 'store'
  1352. * 1 if end of hosts
  1353. * [negative] on errors
  1354. d libssh2_knownhost_get...
  1355. d pr extproc('libssh2_knownhost_get')
  1356. d like(libssh2_Cint)
  1357. d hosts * value LIBSSH2_KNOWNHOSTS *
  1358. d store * libssh2_knownhost *
  1359. d prev likeds(libssh2_knownhost)
  1360. d HAVE_LIBSSH2_AGENT_API... since 1.2.2
  1361. d c X'010202'
  1362. d libssh2_agent_publickey...
  1363. d ds based(######typedef######)
  1364. d align qualified
  1365. d magic like(libssh2_Cuint)
  1366. d node * void *
  1367. d blob * unsigned char *
  1368. d blob_len like(libssh2_Csize_t)
  1369. d comment * char *
  1370. * libssh2_agent_init
  1371. *
  1372. * Init an ssh-agent handle. Returns the pointer to the handle.
  1373. d libssh2_agent_init...
  1374. d pr * extproc('libssh2_agent_init') LIBSSH2_AGENT *
  1375. d session * value LIBSSH2_SESSION *
  1376. * libssh2_agent_connect()
  1377. *
  1378. * Connect to an ssh-agent.
  1379. *
  1380. * Returns 0 if succeeded, or a negative value for error.
  1381. d libssh2_agent_connect...
  1382. d pr extproc('libssh2_agent_connect')
  1383. d like(libssh2_Cint)
  1384. d agent * value LIBSSH2_AGENT *
  1385. * libssh2_agent_list_identities()
  1386. *
  1387. * Request an ssh-agent to list identities.
  1388. *
  1389. * Returns 0 if succeeded, or a negative value for error.
  1390. d libssh2_agent_list_identities...
  1391. d pr extproc(
  1392. d 'libssh2_agent_list_identities')
  1393. d like(libssh2_Cint)
  1394. d agent * value LIBSSH2_AGENT *
  1395. * libssh2_agent_get_identity()
  1396. *
  1397. * Traverse the internal list of public keys. Pass NULL to 'prev' to get
  1398. * the first one. Or pass a poiner to the previously returned one to
  1399. * get the next.
  1400. *
  1401. * Returns:
  1402. * 0 if a fine public key was stored in 'store'
  1403. * 1 if end of public keys
  1404. * [negative] on errors
  1405. d libssh2_agent_get_identity...
  1406. d pr extproc('libssh2_agent_get_identity')
  1407. d like(libssh2_Cint)
  1408. d agent * value LIBSSH2_AGENT *
  1409. d store * libssh2_agent_...
  1410. d publickey *(*)
  1411. d prev likeds(libssh2_agent_publickey)
  1412. * libssh2_agent_userauth()
  1413. *
  1414. * Do publickey user authentication with the help of ssh-agent.
  1415. *
  1416. * Returns 0 if succeeded, or a negative value for error.
  1417. d libssh2_agent_userauth...
  1418. d pr extproc('libssh2_agent_userauth')
  1419. d like(libssh2_Cint)
  1420. d agent * value LIBSSH2_AGENT *
  1421. d username * value options(*string) const char *
  1422. d identity likeds(libssh2_agent_publickey)
  1423. * libssh2_agent_disconnect()
  1424. *
  1425. * Close a connection to an ssh-agent.
  1426. *
  1427. * Returns 0 if succeeded, or a negative value for error.
  1428. d libssh2_agent_disconnect...
  1429. d pr extproc('libssh2_agent_disconnect')
  1430. d like(libssh2_Cint)
  1431. d agent * value LIBSSH2_AGENT *
  1432. * libssh2_agent_free()
  1433. *
  1434. * Free an ssh-agent handle. This function also frees the internal
  1435. * collection of public keys.
  1436. d libssh2_agent_free...
  1437. d pr extproc('libssh2_agent_free')
  1438. d agent * value LIBSSH2_AGENT *
  1439. * libssh2_keepalive_config()
  1440. *
  1441. * Set how often keepalive messages should be sent. WANT_REPLY
  1442. * indicates whether the keepalive messages should request a response
  1443. * from the server. INTERVAL is number of seconds that can pass
  1444. * without any I/O, use 0 (the default) to disable keepalives. To
  1445. * avoid some busy-loop corner-cases, if you specify an interval of 1
  1446. * it will be treated as 2.
  1447. *
  1448. * Note that non-blocking applications are responsible for sending the
  1449. * keepalive messages using libssh2_keepalive_send().
  1450. d libssh2_keepalive_config...
  1451. d pr extproc('libssh2_keepalive_config')
  1452. d session * value LIBSSH2_SESSION *
  1453. d want_reply value like(libssh2_Cint)
  1454. d interval value like(libssh2_Cuint)
  1455. * libssh2_keepalive_send()
  1456. *
  1457. * Send a keepalive message if needed. SECONDS_TO_NEXT indicates how
  1458. * many seconds you can sleep after this call before you need to call
  1459. * it again. Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on
  1460. * I/O errors.
  1461. d libssh2_keepalive_send...
  1462. d pr extproc('libssh2_keepalive_send')
  1463. d like(libssh2_Cint)
  1464. d session * value LIBSSH2_SESSION *
  1465. d seconds_to_next...
  1466. d like(libssh2_Cint)
  1467. * NOTE NOTE NOTE
  1468. * libssh2_trace() has no function in builds that aren't built with debug
  1469. * enabled.
  1470. d libssh2_trace pr extproc('libssh2_trace')
  1471. d like(libssh2_Cint)
  1472. d session * value LIBSSH2_SESSION *
  1473. d bitmask value like(libssh2_Cint)
  1474. d LIBSSH2_TRACE_TRANS...
  1475. d c X'0002'
  1476. d LIBSSH2_TRACE_KEX...
  1477. d c X'0004'
  1478. d LIBSSH2_TRACE_AUTH...
  1479. d c X'0008'
  1480. d LIBSSH2_TRACE_CONN...
  1481. d c X'0010'
  1482. d LIBSSH2_TRACE_SCP...
  1483. d c X'0020'
  1484. d LIBSSH2_TRACE_SFTP...
  1485. d c X'0040'
  1486. d LIBSSH2_TRACE_ERROR...
  1487. d c X'0080'
  1488. d LIBSSH2_TRACE_PUBLICKEY...
  1489. d c X'0100'
  1490. d LIBSSH2_TRACE_SOCKET...
  1491. d c X'0200'
  1492. d libssh2_trace_handler_func...
  1493. d s * based(######typedef######) procptr
  1494. d libssh2_trace_sethandler...
  1495. d pr extproc('libssh2_trace_sethandler')
  1496. d like(libssh2_Cint)
  1497. d session * value LIBSSH2_SESSION *
  1498. d context * value void *
  1499. d callback value
  1500. d like(libssh2_trace_handler_func)
  1501. /endif LIBSSH2_H_