2 * Namespace munging inspired by an equivalent hack in NetBSD's tree: add
3 * the "ssh_" prefix to every symbol in libssh which doesn't already have
4 * it. This prevents collisions between symbols in libssh and symbols in
5 * other libraries or applications which link with libssh, either directly
6 * or indirectly (e.g. through PAM loading pam_ssh).
8 * A list of symbols which need munging is obtained as follows:
10 * nm libssh.a | awk '/[0-9a-z] [A-Z] / && $3 !~ /^ssh_/ { print "#define", $3, "ssh_" $3 }'
15 #define a2port ssh_a2port
16 #define a2tun ssh_a2tun
18 #define acss_setkey ssh_acss_setkey
19 #define acss_setsubkey ssh_acss_setsubkey
20 #define add_host_to_hostfile ssh_add_host_to_hostfile
21 #define add_recv_bytes ssh_add_recv_bytes
22 #define addargs ssh_addargs
23 #define addr_match_list ssh_addr_match_list
24 #define ask_permission ssh_ask_permission
25 #define atomicio ssh_atomicio
26 #define atomiciov ssh_atomiciov
27 #define auth_request_forwarding ssh_auth_request_forwarding
28 #define buffer_append ssh_buffer_append
29 #define buffer_append_space ssh_buffer_append_space
30 #define buffer_check_alloc ssh_buffer_check_alloc
31 #define buffer_clear ssh_buffer_clear
32 #define buffer_compress ssh_buffer_compress
33 #define buffer_compress_init_recv ssh_buffer_compress_init_recv
34 #define buffer_compress_init_send ssh_buffer_compress_init_send
35 #define buffer_compress_uninit ssh_buffer_compress_uninit
36 #define buffer_consume ssh_buffer_consume
37 #define buffer_consume_end ssh_buffer_consume_end
38 #define buffer_consume_end_ret ssh_buffer_consume_end_ret
39 #define buffer_consume_ret ssh_buffer_consume_ret
40 #define buffer_dump ssh_buffer_dump
41 #define buffer_free ssh_buffer_free
42 #define buffer_get ssh_buffer_get
43 #define buffer_get_bignum ssh_buffer_get_bignum
44 #define buffer_get_bignum2 ssh_buffer_get_bignum2
45 #define buffer_get_bignum2_ret ssh_buffer_get_bignum2_ret
46 #define buffer_get_bignum_ret ssh_buffer_get_bignum_ret
47 #define buffer_get_char ssh_buffer_get_char
48 #define buffer_get_char_ret ssh_buffer_get_char_ret
49 #define buffer_get_int ssh_buffer_get_int
50 #define buffer_get_int64 ssh_buffer_get_int64
51 #define buffer_get_int64_ret ssh_buffer_get_int64_ret
52 #define buffer_get_int_ret ssh_buffer_get_int_ret
53 #define buffer_get_ret ssh_buffer_get_ret
54 #define buffer_get_short ssh_buffer_get_short
55 #define buffer_get_short_ret ssh_buffer_get_short_ret
56 #define buffer_get_string ssh_buffer_get_string
57 #define buffer_get_string_ptr ssh_buffer_get_string_ptr
58 #define buffer_get_string_ret ssh_buffer_get_string_ret
59 #define buffer_init ssh_buffer_init
60 #define buffer_len ssh_buffer_len
61 #define buffer_ptr ssh_buffer_ptr
62 #define buffer_put_bignum ssh_buffer_put_bignum
63 #define buffer_put_bignum2 ssh_buffer_put_bignum2
64 #define buffer_put_bignum2_ret ssh_buffer_put_bignum2_ret
65 #define buffer_put_bignum_ret ssh_buffer_put_bignum_ret
66 #define buffer_put_char ssh_buffer_put_char
67 #define buffer_put_cstring ssh_buffer_put_cstring
68 #define buffer_put_int ssh_buffer_put_int
69 #define buffer_put_int64 ssh_buffer_put_int64
70 #define buffer_put_short ssh_buffer_put_short
71 #define buffer_put_string ssh_buffer_put_string
72 #define buffer_uncompress ssh_buffer_uncompress
73 #define chan_ibuf_empty ssh_chan_ibuf_empty
74 #define chan_is_dead ssh_chan_is_dead
75 #define chan_mark_dead ssh_chan_mark_dead
76 #define chan_obuf_empty ssh_chan_obuf_empty
77 #define chan_rcvd_eow ssh_chan_rcvd_eow
78 #define chan_rcvd_ieof ssh_chan_rcvd_ieof
79 #define chan_rcvd_oclose ssh_chan_rcvd_oclose
80 #define chan_read_failed ssh_chan_read_failed
81 #define chan_write_failed ssh_chan_write_failed
82 #define channel_add_adm_permitted_opens ssh_channel_add_adm_permitted_opens
83 #define channel_add_permitted_opens ssh_channel_add_permitted_opens
84 #define channel_after_select ssh_channel_after_select
85 #define channel_by_id ssh_channel_by_id
86 #define channel_cancel_cleanup ssh_channel_cancel_cleanup
87 #define channel_cancel_rport_listener ssh_channel_cancel_rport_listener
88 #define channel_clear_adm_permitted_opens ssh_channel_clear_adm_permitted_opens
89 #define channel_clear_permitted_opens ssh_channel_clear_permitted_opens
90 #define channel_close_all ssh_channel_close_all
91 #define channel_close_fd ssh_channel_close_fd
92 #define channel_connect_by_listen_address ssh_channel_connect_by_listen_address
93 #define channel_connect_to ssh_channel_connect_to
94 #define channel_find_open ssh_channel_find_open
95 #define channel_free ssh_channel_free
96 #define channel_free_all ssh_channel_free_all
97 #define channel_input_close ssh_channel_input_close
98 #define channel_input_close_confirmation ssh_channel_input_close_confirmation
99 #define channel_input_data ssh_channel_input_data
100 #define channel_input_extended_data ssh_channel_input_extended_data
101 #define channel_input_ieof ssh_channel_input_ieof
102 #define channel_input_oclose ssh_channel_input_oclose
103 #define channel_input_open_confirmation ssh_channel_input_open_confirmation
104 #define channel_input_open_failure ssh_channel_input_open_failure
105 #define channel_input_port_forward_request ssh_channel_input_port_forward_request
106 #define channel_input_port_open ssh_channel_input_port_open
107 #define channel_input_status_confirm ssh_channel_input_status_confirm
108 #define channel_input_window_adjust ssh_channel_input_window_adjust
109 #define channel_lookup ssh_channel_lookup
110 #define channel_new ssh_channel_new
111 #define channel_not_very_much_buffered_data ssh_channel_not_very_much_buffered_data
112 #define channel_open_message ssh_channel_open_message
113 #define channel_output_poll ssh_channel_output_poll
114 #define channel_permit_all_opens ssh_channel_permit_all_opens
115 #define channel_post ssh_channel_post
116 #define channel_pre ssh_channel_pre
117 #define channel_prepare_select ssh_channel_prepare_select
118 #define channel_print_adm_permitted_opens ssh_channel_print_adm_permitted_opens
119 #define channel_register_cleanup ssh_channel_register_cleanup
120 #define channel_register_confirm ssh_channel_register_confirm
121 #define channel_register_filter ssh_channel_register_filter
122 #define channel_register_open_confirm ssh_channel_register_open_confirm
123 #define channel_register_status_confirm ssh_channel_register_status_confirm
124 #define channel_request_remote_forwarding ssh_channel_request_remote_forwarding
125 #define channel_request_rforward_cancel ssh_channel_request_rforward_cancel
126 #define channel_request_start ssh_channel_request_start
127 #define channel_send_open ssh_channel_send_open
128 #define channel_send_window_changes ssh_channel_send_window_changes
129 #define channel_set_af ssh_channel_set_af
130 #define channel_set_fds ssh_channel_set_fds
131 #define channel_setup_local_fwd_listener ssh_channel_setup_local_fwd_listener
132 #define channel_setup_remote_fwd_listener ssh_channel_setup_remote_fwd_listener
133 #define channel_still_open ssh_channel_still_open
134 #define channel_stop_listening ssh_channel_stop_listening
135 #define check_host_in_hostfile ssh_check_host_in_hostfile
136 #define choose_dh ssh_choose_dh
137 #define chop ssh_chop
138 #define cipher_blocksize ssh_cipher_blocksize
139 #define cipher_by_name ssh_cipher_by_name
140 #define cipher_by_number ssh_cipher_by_number
141 #define cipher_cleanup ssh_cipher_cleanup
142 #define cipher_crypt ssh_cipher_crypt
143 #define cipher_get_keycontext ssh_cipher_get_keycontext
144 #define cipher_get_keyiv ssh_cipher_get_keyiv
145 #define cipher_get_keyiv_len ssh_cipher_get_keyiv_len
146 #define cipher_get_number ssh_cipher_get_number
147 #define cipher_init ssh_cipher_init
148 #define cipher_is_cbc ssh_cipher_is_cbc
149 #define cipher_keylen ssh_cipher_keylen
150 #define cipher_mask_ssh1 ssh_cipher_mask_ssh1
151 #define cipher_name ssh_cipher_name
152 #define cipher_number ssh_cipher_number
153 #define cipher_set_key_string ssh_cipher_set_key_string
154 #define cipher_set_keycontext ssh_cipher_set_keycontext
155 #define cipher_set_keyiv ssh_cipher_set_keyiv
156 #define ciphers ssh_ciphers
157 #define ciphers_valid ssh_ciphers_valid
158 #define cleanhostname ssh_cleanhostname
159 #define cleanup_exit ssh_cleanup_exit
160 #define clear_cached_addr ssh_clear_cached_addr
161 #define colon ssh_colon
162 #define compat13 ssh_compat13
163 #define compat20 ssh_compat20
164 #define compat_cipher_proposal ssh_compat_cipher_proposal
165 #define compat_datafellows ssh_compat_datafellows
166 #define convtime ssh_convtime
167 #define current_keys ssh_current_keys
168 #define datafellows ssh_datafellows
169 #define debug ssh_debug
170 #define debug ssh_debug
171 #define debug2 ssh_debug2
172 #define debug2 ssh_debug2
173 #define debug3 ssh_debug3
174 #define debug3 ssh_debug3
175 #define decode_reply ssh_decode_reply
176 #define deny_input_open ssh_deny_input_open
177 #define derive_ssh1_session_id ssh_derive_ssh1_session_id
178 #define detect_attack ssh_detect_attack
179 #define dh_estimate ssh_dh_estimate
180 #define dh_gen_key ssh_dh_gen_key
181 #define dh_new_group ssh_dh_new_group
182 #define dh_new_group1 ssh_dh_new_group1
183 #define dh_new_group14 ssh_dh_new_group14
184 #define dh_new_group_asc ssh_dh_new_group_asc
185 #define dh_pub_is_valid ssh_dh_pub_is_valid
186 #define dispatch ssh_dispatch
187 #define dispatch_init ssh_dispatch_init
188 #define dispatch_protocol_error ssh_dispatch_protocol_error
189 #define dispatch_protocol_ignore ssh_dispatch_protocol_ignore
190 #define dispatch_range ssh_dispatch_range
191 #define dispatch_run ssh_dispatch_run
192 #define dispatch_set ssh_dispatch_set
193 #define do_log ssh_do_log
194 #define dump_base64 ssh_dump_base64
195 #define enable_compat13 ssh_enable_compat13
196 #define enable_compat20 ssh_enable_compat20
197 #define error ssh_error
198 #define error ssh_error
199 #define evp_acss ssh_evp_acss
200 #define evp_aes_128_ctr ssh_evp_aes_128_ctr
201 #define evp_rijndael ssh_evp_rijndael
202 #define evp_ssh1_3des ssh_evp_ssh1_3des
203 #define evp_ssh1_bf ssh_evp_ssh1_bf
204 #define export_dns_rr ssh_export_dns_rr
205 #define fatal ssh_fatal
206 #define fatal ssh_fatal
207 #define fmt_scaled ssh_fmt_scaled
208 #define freeargs ssh_freeargs
209 #define freerrset ssh_freerrset
210 #define gen_candidates ssh_gen_candidates
211 #define get_canonical_hostname ssh_get_canonical_hostname
212 #define get_local_ipaddr ssh_get_local_ipaddr
213 #define get_local_name ssh_get_local_name
214 #define get_local_port ssh_get_local_port
215 #define get_peer_ipaddr ssh_get_peer_ipaddr
216 #define get_peer_port ssh_get_peer_port
217 #define get_recv_bytes ssh_get_recv_bytes
218 #define get_remote_ipaddr ssh_get_remote_ipaddr
219 #define get_remote_name_or_ip ssh_get_remote_name_or_ip
220 #define get_remote_port ssh_get_remote_port
221 #define get_sock_port ssh_get_sock_port
222 #define get_u16 ssh_get_u16
223 #define get_u32 ssh_get_u32
224 #define get_u64 ssh_get_u64
225 #define getrrsetbyname ssh_getrrsetbyname
226 #define host_hash ssh_host_hash
227 #define hostfile_read_key ssh_hostfile_read_key
228 #define hpdelim ssh_hpdelim
229 #define incoming_stream ssh_incoming_stream
230 #define init_rng ssh_init_rng
231 #define ipv64_normalise_mapped ssh_ipv64_normalise_mapped
232 #define kex_derive_keys ssh_kex_derive_keys
233 #define kex_dh_hash ssh_kex_dh_hash
234 #define kex_finish ssh_kex_finish
235 #define kex_get_newkeys ssh_kex_get_newkeys
236 #define kex_input_kexinit ssh_kex_input_kexinit
237 #define kex_send_kexinit ssh_kex_send_kexinit
238 #define kex_setup ssh_kex_setup
239 #define kexdh_client ssh_kexdh_client
240 #define kexgex_client ssh_kexgex_client
241 #define kexgex_hash ssh_kexgex_hash
242 #define key_demote ssh_key_demote
243 #define key_equal ssh_key_equal
244 #define key_fingerprint ssh_key_fingerprint
245 #define key_fingerprint_raw ssh_key_fingerprint_raw
246 #define key_free ssh_key_free
247 #define key_from_blob ssh_key_from_blob
248 #define key_from_private ssh_key_from_private
249 #define key_generate ssh_key_generate
250 #define key_load_private ssh_key_load_private
251 #define key_load_private_pem ssh_key_load_private_pem
252 #define key_load_private_type ssh_key_load_private_type
253 #define key_load_public ssh_key_load_public
254 #define key_load_public_type ssh_key_load_public_type
255 #define key_names_valid2 ssh_key_names_valid2
256 #define key_new ssh_key_new
257 #define key_new_private ssh_key_new_private
258 #define key_perm_ok ssh_key_perm_ok
259 #define key_read ssh_key_read
260 #define key_save_private ssh_key_save_private
261 #define key_sign ssh_key_sign
262 #define key_size ssh_key_size
263 #define key_ssh_name ssh_key_ssh_name
264 #define key_to_blob ssh_key_to_blob
265 #define key_type ssh_key_type
266 #define key_type_from_name ssh_key_type_from_name
267 #define key_verify ssh_key_verify
268 #define key_write ssh_key_write
269 #define log_facility_name ssh_log_facility_name
270 #define log_facility_number ssh_log_facility_number
271 #define log_init ssh_log_init
272 #define log_level_name ssh_log_level_name
273 #define log_level_number ssh_log_level_number
274 #define logit ssh_logit
275 #define logit ssh_logit
276 #define lookup_key_in_hostfile_by_type ssh_lookup_key_in_hostfile_by_type
277 #define mac_clear ssh_mac_clear
278 #define mac_compute ssh_mac_compute
279 #define mac_init ssh_mac_init
280 #define mac_setup ssh_mac_setup
281 #define mac_valid ssh_mac_valid
282 #define macs ssh_macs
283 #define match_host_and_ip ssh_match_host_and_ip
284 #define match_hostname ssh_match_hostname
285 #define match_list ssh_match_list
286 #define match_pattern ssh_match_pattern
287 #define match_pattern_list ssh_match_pattern_list
288 #define match_user ssh_match_user
289 #define mm_receive_fd ssh_mm_receive_fd
290 #define mm_send_fd ssh_mm_send_fd
291 #define ms_subtract_diff ssh_ms_subtract_diff
292 #define ms_to_timeval ssh_ms_to_timeval
293 #define mysignal ssh_mysignal
294 #define outgoing_stream ssh_outgoing_stream
295 #define packet_add_padding ssh_packet_add_padding
296 #define packet_backup_state ssh_packet_backup_state
297 #define packet_close ssh_packet_close
298 #define packet_connection_is_ipv4 ssh_packet_connection_is_ipv4
299 #define packet_connection_is_on_socket ssh_packet_connection_is_on_socket
300 #define packet_disconnect ssh_packet_disconnect
301 #define packet_get_bignum ssh_packet_get_bignum
302 #define packet_get_bignum2 ssh_packet_get_bignum2
303 #define packet_get_char ssh_packet_get_char
304 #define packet_get_connection_in ssh_packet_get_connection_in
305 #define packet_get_connection_out ssh_packet_get_connection_out
306 #define packet_get_encryption_key ssh_packet_get_encryption_key
307 #define packet_get_input ssh_packet_get_input
308 #define packet_get_int ssh_packet_get_int
309 #define packet_get_int64 ssh_packet_get_int64
310 #define packet_get_keycontext ssh_packet_get_keycontext
311 #define packet_get_keyiv ssh_packet_get_keyiv
312 #define packet_get_keyiv_len ssh_packet_get_keyiv_len
313 #define packet_get_maxsize ssh_packet_get_maxsize
314 #define packet_get_newkeys ssh_packet_get_newkeys
315 #define packet_get_output ssh_packet_get_output
316 #define packet_get_protocol_flags ssh_packet_get_protocol_flags
317 #define packet_get_raw ssh_packet_get_raw
318 #define packet_get_ssh1_cipher ssh_packet_get_ssh1_cipher
319 #define packet_get_state ssh_packet_get_state
320 #define packet_get_string ssh_packet_get_string
321 #define packet_get_string_ptr ssh_packet_get_string_ptr
322 #define packet_have_data_to_write ssh_packet_have_data_to_write
323 #define packet_inc_alive_timeouts ssh_packet_inc_alive_timeouts
324 #define packet_is_interactive ssh_packet_is_interactive
325 #define packet_need_rekeying ssh_packet_need_rekeying
326 #define packet_not_very_much_data_to_write ssh_packet_not_very_much_data_to_write
327 #define packet_process_incoming ssh_packet_process_incoming
328 #define packet_put_bignum ssh_packet_put_bignum
329 #define packet_put_bignum2 ssh_packet_put_bignum2
330 #define packet_put_char ssh_packet_put_char
331 #define packet_put_cstring ssh_packet_put_cstring
332 #define packet_put_int ssh_packet_put_int
333 #define packet_put_int64 ssh_packet_put_int64
334 #define packet_put_raw ssh_packet_put_raw
335 #define packet_put_string ssh_packet_put_string
336 #define packet_read ssh_packet_read
337 #define packet_read_expect ssh_packet_read_expect
338 #define packet_read_poll ssh_packet_read_poll
339 #define packet_read_poll_seqnr ssh_packet_read_poll_seqnr
340 #define packet_read_seqnr ssh_packet_read_seqnr
341 #define packet_remaining ssh_packet_remaining
342 #define packet_restore_state ssh_packet_restore_state
343 #define packet_send ssh_packet_send
344 #define packet_send_debug ssh_packet_send_debug
345 #define packet_send_ignore ssh_packet_send_ignore
346 #define packet_set_alive_timeouts ssh_packet_set_alive_timeouts
347 #define packet_set_authenticated ssh_packet_set_authenticated
348 #define packet_set_connection ssh_packet_set_connection
349 #define packet_set_encryption_key ssh_packet_set_encryption_key
350 #define packet_set_interactive ssh_packet_set_interactive
351 #define packet_set_iv ssh_packet_set_iv
352 #define packet_set_keycontext ssh_packet_set_keycontext
353 #define packet_set_maxsize ssh_packet_set_maxsize
354 #define packet_set_nonblocking ssh_packet_set_nonblocking
355 #define packet_set_protocol_flags ssh_packet_set_protocol_flags
356 #define packet_set_rekey_limit ssh_packet_set_rekey_limit
357 #define packet_set_server ssh_packet_set_server
358 #define packet_set_state ssh_packet_set_state
359 #define packet_set_timeout ssh_packet_set_timeout
360 #define packet_start ssh_packet_start
361 #define packet_start_compression ssh_packet_start_compression
362 #define packet_write_poll ssh_packet_write_poll
363 #define packet_write_wait ssh_packet_write_wait
364 #define percent_expand ssh_percent_expand
365 #define permanently_drop_suid ssh_permanently_drop_suid
366 #define permanently_set_uid ssh_permanently_set_uid
367 #define prime_test ssh_prime_test
368 #define proto_spec ssh_proto_spec
369 #define put_host_port ssh_put_host_port
370 #define put_u16 ssh_put_u16
371 #define put_u32 ssh_put_u32
372 #define put_u64 ssh_put_u64
373 #define pwcopy ssh_pwcopy
374 #define read_keyfile_line ssh_read_keyfile_line
375 #define read_passphrase ssh_read_passphrase
376 #define refresh_progress_meter ssh_refresh_progress_meter
377 #define replacearg ssh_replacearg
378 #define restore_uid ssh_restore_uid
379 #define resume_in_progress ssh_resume_in_progress
380 #define resume_kex ssh_resume_kex
381 #define rijndael_decrypt ssh_rijndael_decrypt
382 #define rijndael_encrypt ssh_rijndael_encrypt
383 #define rijndael_set_key ssh_rijndael_set_key
384 #define roaming_read ssh_roaming_read
385 #define roaming_write ssh_roaming_write
386 #define rsa_generate_additional_parameters ssh_rsa_generate_additional_parameters
387 #define rsa_private_decrypt ssh_rsa_private_decrypt
388 #define rsa_public_encrypt ssh_rsa_public_encrypt
389 #define sanitise_stdfd ssh_sanitise_stdfd
390 #define scan_scaled ssh_scan_scaled
391 #define schnorr_sign ssh_schnorr_sign
392 #define schnorr_verify ssh_schnorr_verify
393 #define seed_rng ssh_seed_rng
394 #define set_newkeys ssh_set_newkeys
395 #define set_nodelay ssh_set_nodelay
396 #define set_nonblock ssh_set_nonblock
397 #define shadow_pw ssh_shadow_pw
398 #define sigdie ssh_sigdie
399 #define ssh1_3des_iv ssh_ssh1_3des_iv
400 #define start_progress_meter ssh_start_progress_meter
401 #define stop_progress_meter ssh_stop_progress_meter
402 #define strdelim ssh_strdelim
403 #define strnvis ssh_strnvis
404 #define strvis ssh_strvis
405 #define strvisx ssh_strvisx
406 #define sys_tun_open ssh_sys_tun_open
407 #define temporarily_use_uid ssh_temporarily_use_uid
408 #define tilde_expand_filename ssh_tilde_expand_filename
409 #define tohex ssh_tohex
410 #define tty_make_modes ssh_tty_make_modes
411 #define tty_parse_modes ssh_tty_parse_modes
412 #define tun_open ssh_tun_open
413 #define umac_ctx ssh_umac_ctx
414 #define umac_delete ssh_umac_delete
415 #define umac_final ssh_umac_final
416 #define umac_new ssh_umac_new
417 #define umac_update ssh_umac_update
418 #define unset_nonblock ssh_unset_nonblock
419 #define uudecode ssh_uudecode
420 #define uuencode ssh_uuencode
421 #define verbose ssh_verbose
422 #define verbose ssh_verbose
423 #define verify_host_key_dns ssh_verify_host_key_dns
425 #define x11_connect_display ssh_x11_connect_display
426 #define x11_create_display_inet ssh_x11_create_display_inet
427 #define x11_input_open ssh_x11_input_open
428 #define x11_request_forwarding_with_spoofing ssh_x11_request_forwarding_with_spoofing
429 #define xasprintf ssh_xasprintf
430 #define xcalloc ssh_xcalloc
431 #define xcrypt ssh_xcrypt
432 #define xfree ssh_xfree
433 #define xmalloc ssh_xmalloc
434 #define xmmap ssh_xmmap
435 #define xrealloc ssh_xrealloc
436 #define xstrdup ssh_xstrdup