Lines Matching defs:reply
254 Channel *c, struct sshbuf *m, struct sshbuf *reply)
295 /* Enqueue a "ok" response to the reply buffer */
297 reply_ok(struct sshbuf *reply, u_int rid)
301 if ((r = sshbuf_put_u32(reply, MUX_S_OK)) != 0 ||
302 (r = sshbuf_put_u32(reply, rid)) != 0)
303 fatal_fr(r, "reply");
306 /* Enqueue an error response to the reply buffer */
308 reply_error(struct sshbuf *reply, u_int type, u_int rid, const char *msg)
312 if ((r = sshbuf_put_u32(reply, type)) != 0 ||
313 (r = sshbuf_put_u32(reply, rid)) != 0 ||
314 (r = sshbuf_put_cstring(reply, msg)) != 0)
315 fatal_fr(r, "reply");
320 Channel *c, struct sshbuf *m, struct sshbuf *reply)
397 reply_error(reply, MUX_S_FAILURE, rid,
409 reply_error(reply, MUX_S_FAILURE, rid,
430 reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
471 /* reply is deferred, sent by mux_session_confirm */
477 Channel *c, struct sshbuf *m, struct sshbuf *reply)
483 /* prepare reply */
484 if ((r = sshbuf_put_u32(reply, MUX_S_ALIVE)) != 0 ||
485 (r = sshbuf_put_u32(reply, rid)) != 0 ||
486 (r = sshbuf_put_u32(reply, (u_int)getpid())) != 0)
487 fatal_fr(r, "reply");
494 Channel *c, struct sshbuf *m, struct sshbuf *reply)
503 reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
510 reply_ok(reply, rid);
592 /* no channel for reply */
627 fatal_fr(r, "reply");
670 Channel *c, struct sshbuf *m, struct sshbuf *reply)
723 reply_error(reply, MUX_S_FAILURE, rid,
759 reply_ok(reply, rid);
771 if ((r = sshbuf_put_u32(reply,
773 (r = sshbuf_put_u32(reply, rid)) != 0 ||
774 (r = sshbuf_put_u32(reply,
776 fatal_fr(r, "reply FWD_REMOTE");
786 reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
797 reply_error(reply, MUX_S_FAILURE, rid,
818 /* delayed reply in mux_confirm_remote_forward */
821 reply_ok(reply, rid);
835 Channel *c, struct sshbuf *m, struct sshbuf *reply)
926 reply_error(reply, MUX_S_FAILURE, rid, error_reason);
928 reply_ok(reply, rid);
947 Channel *c, struct sshbuf *m, struct sshbuf *reply)
982 /* prepare reply */
983 reply_error(reply, MUX_S_FAILURE, rid,
994 reply_error(reply, MUX_S_FAILURE, rid,
1013 reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
1037 /* reply is deferred, sent by mux_session_confirm */
1047 struct sshbuf *reply;
1057 if ((reply = sshbuf_new()) == NULL)
1061 debug3_f("sending failure reply");
1062 reply_error(reply, MUX_S_FAILURE, cctx->rid,
1064 /* prepare reply */
1068 debug3_f("sending success reply");
1069 /* prepare reply */
1070 if ((r = sshbuf_put_u32(reply, MUX_S_SESSION_OPENED)) != 0 ||
1071 (r = sshbuf_put_u32(reply, cctx->rid)) != 0 ||
1072 (r = sshbuf_put_u32(reply, c->self)) != 0)
1073 fatal_fr(r, "reply");
1076 /* Send reply */
1077 if ((r = sshbuf_put_stringb(cc->output, reply)) != 0)
1079 sshbuf_free(reply);
1090 Channel *c, struct sshbuf *m, struct sshbuf *reply)
1099 reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
1114 reply_ok(reply, rid);
1120 Channel *c, struct sshbuf *m, struct sshbuf *reply)
1127 if ((r = sshbuf_put_u32(reply, MUX_S_PROXY)) != 0 ||
1128 (r = sshbuf_put_u32(reply, rid)) != 0)
1129 fatal_fr(r, "reply");
1156 fatal_fr(r, "reply");
1201 /* Enqueue reply packet */
1230 fatal_fr(r, "reply");
1252 fatal_fr(r, "reply");
1348 struct sshbuf *reply;
1357 if ((reply = sshbuf_new()) == NULL)
1361 debug3_f("sending failure reply");
1362 reply_error(reply, MUX_S_FAILURE, cctx->rid,
1396 debug3_f("sending success reply");
1397 /* prepare reply */
1398 if ((r = sshbuf_put_u32(reply, MUX_S_SESSION_OPENED)) != 0 ||
1399 (r = sshbuf_put_u32(reply, cctx->rid)) != 0 ||
1400 (r = sshbuf_put_u32(reply, c->self)) != 0)
1401 fatal_fr(r, "reply");
1404 /* Send reply */
1405 if ((r = sshbuf_put_stringb(cc->output, reply)) != 0)
1407 sshbuf_free(reply);
1657 /* Read their reply */
1674 fatal_f("out of sequence reply: my id %u theirs %u",
1708 /* Read their reply */
1722 fatal_f("out of sequence reply: my id %u theirs %u",
1789 /* Read their reply */
1799 fatal_f("out of sequence reply: my id %u theirs %u",
1932 /* Read their reply */
1944 fatal_f("out of sequence reply: my id %u theirs %u",
2070 /* Read their reply */
2079 fatal_f("out of sequence reply: my id %u theirs %u",
2135 /* Read their reply */
2148 fatal_f("out of sequence reply: my id %u theirs %u",
2212 /* Read their reply */
2220 fatal_f("out of sequence reply: my id %u theirs %u",