Lines Matching refs:id
121 send_string_request(int fd, u_int id, u_int code, char *s, in send_string_request() argument
128 buffer_put_int(&msg, id); in send_string_request()
131 debug3("Sent message fd %d T:%u I:%u", fd, code, id); in send_string_request()
136 send_string_attrs_request(int fd, u_int id, u_int code, char *s, in send_string_attrs_request() argument
143 buffer_put_int(&msg, id); in send_string_attrs_request()
147 debug3("Sent message fd %d T:%u I:%u", fd, code, id); in send_string_attrs_request()
155 u_int type, id, status; in get_status() local
160 id = buffer_get_int(&msg); in get_status()
162 if (id != expected_id) in get_status()
163 fatal("ID mismatch (%u != %u)", id, expected_id); in get_status()
180 u_int type, id; in get_handle() local
186 id = buffer_get_int(&msg); in get_handle()
188 if (id != expected_id) in get_handle()
189 fatal("ID mismatch (%u != %u)", id, expected_id); in get_handle()
210 u_int type, id; in get_decode_stat() local
217 id = buffer_get_int(&msg); in get_decode_stat()
219 debug3("Received stat reply T:%u I:%u", type, id); in get_decode_stat()
220 if (id != expected_id) in get_decode_stat()
221 fatal("ID mismatch (%u != %u)", id, expected_id); in get_decode_stat()
305 u_int id, status; in do_close() local
310 id = conn->msg_id++; in do_close()
312 buffer_put_int(&msg, id); in do_close()
315 debug3("Sent message SSH2_FXP_CLOSE I:%u", id); in do_close()
317 status = get_status(conn->fd_in, id); in do_close()
332 u_int count, type, id, handle_len, i, expected_id, ents = 0; in do_lsreaddir() local
335 id = conn->msg_id++; in do_lsreaddir()
339 buffer_put_int(&msg, id); in do_lsreaddir()
345 handle = get_handle(conn->fd_in, id, &handle_len); in do_lsreaddir()
356 id = expected_id = conn->msg_id++; in do_lsreaddir()
358 debug3("Sending SSH2_FXP_READDIR I:%u", id); in do_lsreaddir()
362 buffer_put_int(&msg, id); in do_lsreaddir()
371 id = buffer_get_int(&msg); in do_lsreaddir()
373 debug3("Received reply T:%u I:%u", type, id); in do_lsreaddir()
375 if (id != expected_id) in do_lsreaddir()
376 fatal("ID mismatch (%u != %u)", id, expected_id); in do_lsreaddir()
460 u_int status, id; in do_rm() local
464 id = conn->msg_id++; in do_rm()
465 send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path, in do_rm()
467 status = get_status(conn->fd_in, id); in do_rm()
476 u_int status, id; in do_mkdir() local
478 id = conn->msg_id++; in do_mkdir()
479 send_string_attrs_request(conn->fd_out, id, SSH2_FXP_MKDIR, path, in do_mkdir()
482 status = get_status(conn->fd_in, id); in do_mkdir()
492 u_int status, id; in do_rmdir() local
494 id = conn->msg_id++; in do_rmdir()
495 send_string_request(conn->fd_out, id, SSH2_FXP_RMDIR, path, in do_rmdir()
498 status = get_status(conn->fd_in, id); in do_rmdir()
508 u_int id; in do_stat() local
510 id = conn->msg_id++; in do_stat()
512 send_string_request(conn->fd_out, id, in do_stat()
516 return(get_decode_stat(conn->fd_in, id, quiet)); in do_stat()
522 u_int id; in do_lstat() local
532 id = conn->msg_id++; in do_lstat()
533 send_string_request(conn->fd_out, id, SSH2_FXP_LSTAT, path, in do_lstat()
536 return(get_decode_stat(conn->fd_in, id, quiet)); in do_lstat()
544 u_int id;
546 id = conn->msg_id++;
547 send_string_request(conn->fd_out, id, SSH2_FXP_FSTAT, handle,
550 return(get_decode_stat(conn->fd_in, id, quiet));
557 u_int status, id; in do_setstat() local
559 id = conn->msg_id++; in do_setstat()
560 send_string_attrs_request(conn->fd_out, id, SSH2_FXP_SETSTAT, path, in do_setstat()
563 status = get_status(conn->fd_in, id); in do_setstat()
575 u_int status, id; in do_fsetstat() local
577 id = conn->msg_id++; in do_fsetstat()
578 send_string_attrs_request(conn->fd_out, id, SSH2_FXP_FSETSTAT, handle, in do_fsetstat()
581 status = get_status(conn->fd_in, id); in do_fsetstat()
592 u_int type, expected_id, count, id; in do_realpath() local
597 expected_id = id = conn->msg_id++; in do_realpath()
598 send_string_request(conn->fd_out, id, SSH2_FXP_REALPATH, path, in do_realpath()
605 id = buffer_get_int(&msg); in do_realpath()
607 if (id != expected_id) in do_realpath()
608 fatal("ID mismatch (%u != %u)", id, expected_id); in do_realpath()
640 u_int status, id; in do_rename() local
645 id = conn->msg_id++; in do_rename()
647 buffer_put_int(&msg, id); in do_rename()
655 status = get_status(conn->fd_in, id); in do_rename()
667 u_int status, id; in do_symlink() local
677 id = conn->msg_id++; in do_symlink()
679 buffer_put_int(&msg, id); in do_symlink()
687 status = get_status(conn->fd_in, id); in do_symlink()
701 u_int type, expected_id, count, id;
705 expected_id = id = conn->msg_id++;
706 send_string_request(conn->fd_out, id, SSH2_FXP_READLINK, path,
713 id = buffer_get_int(&msg);
715 if (id != expected_id)
716 fatal("ID mismatch (%u != %u)", id, expected_id);
746 send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len, in send_read_request() argument
754 buffer_put_int(&msg, id); in send_read_request()
772 u_int handle_len, mode, type, id, buflen, num_req, max_req; in do_download() local
775 u_int id; in do_download() member
810 id = conn->msg_id++; in do_download()
812 buffer_put_int(&msg, id); in do_download()
818 debug3("Sent message SSH2_FXP_OPEN I:%u P:%s", id, remote_path); in do_download()
820 handle = get_handle(conn->fd_in, id, &handle_len); in do_download()
865 req->id = conn->msg_id++; in do_download()
871 send_read_request(conn->fd_out, req->id, req->offset, in do_download()
878 id = buffer_get_int(&msg); in do_download()
879 debug3("Received reply T:%u I:%u R:%d", type, id, max_req); in do_download()
883 req != NULL && req->id != id; in do_download()
887 fatal("Unexpected reply %u", id); in do_download()
928 req->id = conn->msg_id++; in do_download()
931 send_read_request(conn->fd_out, req->id, in do_download()
1005 u_int handle_len, id, type; in do_upload() local
1014 u_int id; in do_upload() member
1051 id = conn->msg_id++; in do_upload()
1053 buffer_put_int(&msg, id); in do_upload()
1058 debug3("Sent message SSH2_FXP_OPEN I:%u P:%s", id, remote_path); in do_upload()
1062 handle = get_handle(conn->fd_in, id, &handle_len); in do_upload()
1069 startid = ackid = id + 1; in do_upload()
1098 ack->id = ++id; in do_upload()
1105 buffer_put_int(&msg, ack->id); in do_upload()
1111 id, (unsigned long long)offset, len); in do_upload()
1116 fatal("Unexpected ACK %u", id); in do_upload()
1118 if (id == startid || len == 0 || in do_upload()
1119 id - ackid >= conn->num_requests) { in do_upload()
1136 ack != NULL && ack->id != r_id; in do_upload()
1156 ack->id, ack->len, (unsigned long long)ack->offset); in do_upload()