diff options
Diffstat (limited to 'packet.h')
-rw-r--r-- | packet.h | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.h,v 1.71 2016/03/07 19:02:43 djm Exp $ */ | 1 | /* $OpenBSD: packet.h,v 1.74 2016/10/11 21:47:45 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -78,6 +78,9 @@ struct ssh { | |||
78 | void *app_data; | 78 | void *app_data; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | typedef int (ssh_packet_hook_fn)(struct ssh *, struct sshbuf *, | ||
82 | u_char *, void *); | ||
83 | |||
81 | struct ssh *ssh_alloc_session_state(void); | 84 | struct ssh *ssh_alloc_session_state(void); |
82 | struct ssh *ssh_packet_set_connection(struct ssh *, int, int); | 85 | struct ssh *ssh_packet_set_connection(struct ssh *, int, int); |
83 | void ssh_packet_set_timeout(struct ssh *, int, int); | 86 | void ssh_packet_set_timeout(struct ssh *, int, int); |
@@ -88,6 +91,8 @@ int ssh_packet_get_connection_in(struct ssh *); | |||
88 | int ssh_packet_get_connection_out(struct ssh *); | 91 | int ssh_packet_get_connection_out(struct ssh *); |
89 | void ssh_packet_close(struct ssh *); | 92 | void ssh_packet_close(struct ssh *); |
90 | void ssh_packet_set_encryption_key(struct ssh *, const u_char *, u_int, int); | 93 | void ssh_packet_set_encryption_key(struct ssh *, const u_char *, u_int, int); |
94 | void ssh_packet_set_input_hook(struct ssh *, ssh_packet_hook_fn *, void *); | ||
95 | |||
91 | int ssh_packet_is_rekeying(struct ssh *); | 96 | int ssh_packet_is_rekeying(struct ssh *); |
92 | void ssh_packet_set_protocol_flags(struct ssh *, u_int); | 97 | void ssh_packet_set_protocol_flags(struct ssh *, u_int); |
93 | u_int ssh_packet_get_protocol_flags(struct ssh *); | 98 | u_int ssh_packet_get_protocol_flags(struct ssh *); |
@@ -97,6 +102,10 @@ void ssh_packet_set_interactive(struct ssh *, int, int, int); | |||
97 | int ssh_packet_is_interactive(struct ssh *); | 102 | int ssh_packet_is_interactive(struct ssh *); |
98 | void ssh_packet_set_server(struct ssh *); | 103 | void ssh_packet_set_server(struct ssh *); |
99 | void ssh_packet_set_authenticated(struct ssh *); | 104 | void ssh_packet_set_authenticated(struct ssh *); |
105 | void ssh_packet_set_mux(struct ssh *); | ||
106 | int ssh_packet_get_mux(struct ssh *); | ||
107 | |||
108 | int ssh_packet_log_type(u_char); | ||
100 | 109 | ||
101 | int ssh_packet_send1(struct ssh *); | 110 | int ssh_packet_send1(struct ssh *); |
102 | int ssh_packet_send2_wrapped(struct ssh *); | 111 | int ssh_packet_send2_wrapped(struct ssh *); |
@@ -120,11 +129,6 @@ void ssh_packet_send_debug(struct ssh *, const char *fmt, ...) __attribute__ | |||
120 | int ssh_set_newkeys(struct ssh *, int mode); | 129 | int ssh_set_newkeys(struct ssh *, int mode); |
121 | void ssh_packet_get_bytes(struct ssh *, u_int64_t *, u_int64_t *); | 130 | void ssh_packet_get_bytes(struct ssh *, u_int64_t *, u_int64_t *); |
122 | 131 | ||
123 | typedef void *(ssh_packet_comp_alloc_func)(void *, u_int, u_int); | ||
124 | typedef void (ssh_packet_comp_free_func)(void *, void *); | ||
125 | void ssh_packet_set_compress_hooks(struct ssh *, void *, | ||
126 | ssh_packet_comp_alloc_func *, ssh_packet_comp_free_func *); | ||
127 | |||
128 | int ssh_packet_write_poll(struct ssh *); | 132 | int ssh_packet_write_poll(struct ssh *); |
129 | int ssh_packet_write_wait(struct ssh *); | 133 | int ssh_packet_write_wait(struct ssh *); |
130 | int ssh_packet_have_data_to_write(struct ssh *); | 134 | int ssh_packet_have_data_to_write(struct ssh *); |