1 /* 2 * Copyright (c) 1995-2009, 2013-2020 Paul Mattes. 3 * Copyright (c) 2004, Don Russell. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * * Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * * Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * * Neither the names of Paul Mattes, Don Russell, Jeff Sparkes, GTRC nor 14 * the names of their contributors may be used to endorse or promote 15 * products derived from this software without specific prior written 16 * permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY PAUL MATTES AND DON RUSSELL "AS IS" AND ANY 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 * DISCLAIMED. IN NO EVENT SHALL PAUL MATTES OR DON RUSSELL BE LIABLE FOR ANY 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30 /* 31 * telnet.h 32 * Global declarations for telnet.c, beyond what is declared in 33 * telnet_core.h. 34 */ 35 36 #if defined(PR3287) /*[*/ 37 # error "Do not include this file for pr3287" 38 #endif /*]*/ 39 40 extern int ns_brcvd; 41 extern int ns_bsent; 42 extern int ns_rrcvd; 43 extern int ns_rsent; 44 extern time_t ns_time; 45 extern const char *state_name[]; 46 extern struct timeval net_last_recv_ts; 47 48 void net_abort(void); 49 void net_break(char c); 50 void net_charmode(void); 51 net_connect_t net_connect(const char *, char *, char *, bool, iosrc_t *); 52 void net_exception(iosrc_t fd, ioid_t id); 53 int net_getsockname(void *buf, int *len); 54 void net_hexnvt_out(unsigned char *buf, int len); 55 void net_input(iosrc_t fd, ioid_t id); 56 void net_interrupt(char c); 57 void net_linemode(void); 58 void net_nop_seconds(void); 59 void net_nvt_break(void); 60 const char *net_query_bind_plu_name(void); 61 const char *net_query_connection_state(void); 62 const char *net_query_host(void); 63 const char *net_query_lu_name(void); 64 const char *net_query_tls(void); 65 void net_sendc(char c); 66 void net_sends(const char *s); 67 bool net_snap_options(void); 68 const char *tn3270e_current_opts(void); 69 const char *net_proxy_type(void); 70 const char *net_proxy_user(void); 71 const char *net_proxy_host(void); 72 const char *net_proxy_port(void); 73 bool net_bound(void); 74 extern bool linemode; 75 bool net_secure_connection(); 76 void net_set_default_termtype(void); 77 bool net_secure_unverified(void); 78 const char *net_server_cert_info(void); 79 const char *net_session_info(void); 80 void net_password_continue(const char *password); 81 unsigned net_sio_supported(void); 82 const char *net_sio_provider(void); 83 const char *net_myopts(void); 84 const char *net_hisopts(void); 85 void net_register(void); 86 87 /* These are for linemode.c to call, not external users. */ 88 void net_cookedout(const char *buf, size_t len); 89 void net_cookout(const char *buf, size_t len); 90