comparison channel.h @ 1739:13d834efc376 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Thu, 15 Oct 2020 19:55:15 +0800
parents 79eef94ccea9
children c584b5602bd8
comparison
equal deleted inserted replaced
1562:768ebf737aa0 1739:13d834efc376
67 67
68 /* whether close/eof messages have been exchanged */ 68 /* whether close/eof messages have been exchanged */
69 int sent_close, recv_close; 69 int sent_close, recv_close;
70 int recv_eof, sent_eof; 70 int recv_eof, sent_eof;
71 71
72 /* Set after running the ChanType-specific close hander
73 * to ensure we don't run it twice (nor type->checkclose()). */
74 int close_handler_done;
75
76 struct dropbear_progress_connection *conn_pending; 72 struct dropbear_progress_connection *conn_pending;
77 int initconn; /* used for TCP forwarding, whether the channel has been 73 int initconn; /* used for TCP forwarding, whether the channel has been
78 fully initialised */ 74 fully initialised */
79 75
80 int await_open; /* flag indicating whether we've sent an open request 76 int await_open; /* flag indicating whether we've sent an open request
93 89
94 struct ChanType { 90 struct ChanType {
95 91
96 int sepfds; /* Whether this channel has separate pipes for in/out or not */ 92 int sepfds; /* Whether this channel has separate pipes for in/out or not */
97 const char *name; 93 const char *name;
94 /* Sets up the channel */
98 int (*inithandler)(struct Channel*); 95 int (*inithandler)(struct Channel*);
96 /* Called to check whether a channel should close, separately from the FD being closed.
97 Used for noticing process exiting */
99 int (*check_close)(const struct Channel*); 98 int (*check_close)(const struct Channel*);
99 /* Handler for ssh_msg_channel_request */
100 void (*reqhandler)(struct Channel*); 100 void (*reqhandler)(struct Channel*);
101 /* Called prior to sending ssh_msg_channel_close, used for sending exit status */
101 void (*closehandler)(const struct Channel*); 102 void (*closehandler)(const struct Channel*);
103 /* Frees resources, called just prior to channel being removed */
104 void (*cleanup)(const struct Channel*);
102 }; 105 };
103 106
104 /* Callback for connect_remote */ 107 /* Callback for connect_remote */
105 void channel_connect_done(int result, int sock, void* user_data, const char* errstring); 108 void channel_connect_done(int result, int sock, void* user_data, const char* errstring);
106 109