diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-30 01:13:33 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-30 12:18:59 +1100 |
commit | 4509b5d4a4fa645a022635bfa7e86d09b285001f (patch) | |
tree | cb94ac37e4d5c59a3a5c2cde3b6c76363e7035d3 /packet.h | |
parent | 669aee994348468af8b4b2ebd29b602cf2860b22 (diff) |
upstream commit
avoid more fatal/exit in the packet.c paths that
ssh-keyscan uses; feedback and "looks good" markus@
Diffstat (limited to 'packet.h')
-rw-r--r-- | packet.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.h,v 1.65 2015/01/28 21:15:47 djm Exp $ */ | 1 | /* $OpenBSD: packet.h,v 1.66 2015/01/30 01:13:33 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -90,7 +90,7 @@ int ssh_packet_send2_wrapped(struct ssh *); | |||
90 | int ssh_packet_send2(struct ssh *); | 90 | int ssh_packet_send2(struct ssh *); |
91 | 91 | ||
92 | int ssh_packet_read(struct ssh *); | 92 | int ssh_packet_read(struct ssh *); |
93 | void ssh_packet_read_expect(struct ssh *, int type); | 93 | int ssh_packet_read_expect(struct ssh *, u_int type); |
94 | int ssh_packet_read_poll(struct ssh *); | 94 | int ssh_packet_read_poll(struct ssh *); |
95 | int ssh_packet_read_poll1(struct ssh *, u_char *); | 95 | int ssh_packet_read_poll1(struct ssh *, u_char *); |
96 | int ssh_packet_read_poll2(struct ssh *, u_char *, u_int32_t *seqnr_p); | 96 | int ssh_packet_read_poll2(struct ssh *, u_char *, u_int32_t *seqnr_p); |
@@ -112,8 +112,8 @@ typedef void (ssh_packet_comp_free_func)(void *, void *); | |||
112 | void ssh_packet_set_compress_hooks(struct ssh *, void *, | 112 | void ssh_packet_set_compress_hooks(struct ssh *, void *, |
113 | ssh_packet_comp_alloc_func *, ssh_packet_comp_free_func *); | 113 | ssh_packet_comp_alloc_func *, ssh_packet_comp_free_func *); |
114 | 114 | ||
115 | void ssh_packet_write_poll(struct ssh *); | 115 | int ssh_packet_write_poll(struct ssh *); |
116 | void ssh_packet_write_wait(struct ssh *); | 116 | int ssh_packet_write_wait(struct ssh *); |
117 | int ssh_packet_have_data_to_write(struct ssh *); | 117 | int ssh_packet_have_data_to_write(struct ssh *); |
118 | int ssh_packet_not_very_much_data_to_write(struct ssh *); | 118 | int ssh_packet_not_very_much_data_to_write(struct ssh *); |
119 | 119 | ||
@@ -148,8 +148,10 @@ void *ssh_packet_get_output(struct ssh *); | |||
148 | /* new API */ | 148 | /* new API */ |
149 | int sshpkt_start(struct ssh *ssh, u_char type); | 149 | int sshpkt_start(struct ssh *ssh, u_char type); |
150 | int sshpkt_send(struct ssh *ssh); | 150 | int sshpkt_send(struct ssh *ssh); |
151 | int sshpkt_disconnect(struct ssh *, const char *fmt, ...) __attribute__((format(printf, 2, 3))); | 151 | int sshpkt_disconnect(struct ssh *, const char *fmt, ...) |
152 | __attribute__((format(printf, 2, 3))); | ||
152 | int sshpkt_add_padding(struct ssh *, u_char); | 153 | int sshpkt_add_padding(struct ssh *, u_char); |
154 | void sshpkt_fatal(struct ssh *ssh, const char *tag, int r); | ||
153 | 155 | ||
154 | int sshpkt_put(struct ssh *ssh, const void *v, size_t len); | 156 | int sshpkt_put(struct ssh *ssh, const void *v, size_t len); |
155 | int sshpkt_putb(struct ssh *ssh, const struct sshbuf *b); | 157 | int sshpkt_putb(struct ssh *ssh, const struct sshbuf *b); |