void packet_read_expect(int expected_type) { int r; if ((r = ssh_packet_read_expect(active_state, expected_type)) != 0) sshpkt_fatal(active_state, __func__, r); }
void packet_write_wait(void) { int r; if ((r = ssh_packet_write_wait(active_state)) < 0) sshpkt_fatal(active_state, __func__, r); }
void packet_process_incoming(const char *buf, u_int len) { int r; if ((r = ssh_packet_process_incoming(active_state, buf, len)) != 0) sshpkt_fatal(active_state, __func__, r); }
void packet_write_poll(void) { int r; if ((r = ssh_packet_write_poll(active_state)) != 0) sshpkt_fatal(active_state, __func__, r); }
void ssh_dispatch_run_fatal(struct ssh *ssh, int mode, volatile sig_atomic_t *done) { int r; if ((r = ssh_dispatch_run(ssh, mode, done)) != 0) sshpkt_fatal(ssh, r, "%s", __func__); }
int packet_write_poll(void) { int r; if ((r = ssh_packet_write_poll(active_state)) < 0) sshpkt_fatal(active_state, __func__, r); return r; }
int packet_read_poll_seqnr(u_int32_t *seqnr) { u_char type; int r; if ((r = ssh_packet_read_poll_seqnr(active_state, &type, seqnr))) sshpkt_fatal(active_state, __func__, r); return type; }
int dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh) { int r; logit("dispatch_protocol_error: type %d seq %u", type, seq); if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || (r = sshpkt_put_u32(ssh, seq)) != 0 || (r = sshpkt_send(ssh)) != 0 || (r = ssh_packet_write_wait(ssh)) != 0) sshpkt_fatal(ssh, r, "%s", __func__); return 0; }