• Home
  • Raw
  • Download

Lines Matching refs:msg

163 	struct sshbuf *msg;  in send_string_request()  local
166 if ((msg = sshbuf_new()) == NULL) in send_string_request()
168 if ((r = sshbuf_put_u8(msg, code)) != 0 || in send_string_request()
169 (r = sshbuf_put_u32(msg, id)) != 0 || in send_string_request()
170 (r = sshbuf_put_string(msg, s, len)) != 0) in send_string_request()
172 send_msg(conn, msg); in send_string_request()
174 sshbuf_free(msg); in send_string_request()
181 struct sshbuf *msg; in send_string_attrs_request() local
184 if ((msg = sshbuf_new()) == NULL) in send_string_attrs_request()
186 if ((r = sshbuf_put_u8(msg, code)) != 0 || in send_string_attrs_request()
187 (r = sshbuf_put_u32(msg, id)) != 0 || in send_string_attrs_request()
188 (r = sshbuf_put_string(msg, s, len)) != 0 || in send_string_attrs_request()
189 (r = encode_attrib(msg, a)) != 0) in send_string_attrs_request()
191 send_msg(conn, msg); in send_string_attrs_request()
193 sshbuf_free(msg); in send_string_attrs_request()
199 struct sshbuf *msg; in get_status() local
204 if ((msg = sshbuf_new()) == NULL) in get_status()
206 get_msg(conn, msg); in get_status()
207 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in get_status()
208 (r = sshbuf_get_u32(msg, &id)) != 0) in get_status()
217 if ((r = sshbuf_get_u32(msg, &status)) != 0) in get_status()
219 sshbuf_free(msg); in get_status()
230 struct sshbuf *msg; in get_handle() local
243 if ((msg = sshbuf_new()) == NULL) in get_handle()
245 get_msg(conn, msg); in get_handle()
246 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in get_handle()
247 (r = sshbuf_get_u32(msg, &id)) != 0) in get_handle()
254 if ((r = sshbuf_get_u32(msg, &status)) != 0) in get_handle()
258 sshbuf_free(msg); in get_handle()
264 if ((r = sshbuf_get_string(msg, &handle, len)) != 0) in get_handle()
266 sshbuf_free(msg); in get_handle()
274 struct sshbuf *msg; in get_decode_stat() local
280 if ((msg = sshbuf_new()) == NULL) in get_decode_stat()
282 get_msg(conn, msg); in get_decode_stat()
284 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in get_decode_stat()
285 (r = sshbuf_get_u32(msg, &id)) != 0) in get_decode_stat()
294 if ((r = sshbuf_get_u32(msg, &status)) != 0) in get_decode_stat()
300 sshbuf_free(msg); in get_decode_stat()
306 if ((r = decode_attrib(msg, &a)) != 0) { in get_decode_stat()
308 sshbuf_free(msg); in get_decode_stat()
311 sshbuf_free(msg); in get_decode_stat()
320 struct sshbuf *msg; in get_decode_statvfs() local
326 if ((msg = sshbuf_new()) == NULL) in get_decode_statvfs()
328 get_msg(conn, msg); in get_decode_statvfs()
330 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in get_decode_statvfs()
331 (r = sshbuf_get_u32(msg, &id)) != 0) in get_decode_statvfs()
340 if ((r = sshbuf_get_u32(msg, &status)) != 0) in get_decode_statvfs()
346 sshbuf_free(msg); in get_decode_statvfs()
354 if ((r = sshbuf_get_u64(msg, &st->f_bsize)) != 0 || in get_decode_statvfs()
355 (r = sshbuf_get_u64(msg, &st->f_frsize)) != 0 || in get_decode_statvfs()
356 (r = sshbuf_get_u64(msg, &st->f_blocks)) != 0 || in get_decode_statvfs()
357 (r = sshbuf_get_u64(msg, &st->f_bfree)) != 0 || in get_decode_statvfs()
358 (r = sshbuf_get_u64(msg, &st->f_bavail)) != 0 || in get_decode_statvfs()
359 (r = sshbuf_get_u64(msg, &st->f_files)) != 0 || in get_decode_statvfs()
360 (r = sshbuf_get_u64(msg, &st->f_ffree)) != 0 || in get_decode_statvfs()
361 (r = sshbuf_get_u64(msg, &st->f_favail)) != 0 || in get_decode_statvfs()
362 (r = sshbuf_get_u64(msg, &st->f_fsid)) != 0 || in get_decode_statvfs()
363 (r = sshbuf_get_u64(msg, &flag)) != 0 || in get_decode_statvfs()
364 (r = sshbuf_get_u64(msg, &st->f_namemax)) != 0) in get_decode_statvfs()
370 sshbuf_free(msg); in get_decode_statvfs()
380 struct sshbuf *msg; in do_init() local
393 if ((msg = sshbuf_new()) == NULL) in do_init()
395 if ((r = sshbuf_put_u8(msg, SSH2_FXP_INIT)) != 0 || in do_init()
396 (r = sshbuf_put_u32(msg, SSH2_FILEXFER_VERSION)) != 0) in do_init()
398 send_msg(ret, msg); in do_init()
400 sshbuf_reset(msg); in do_init()
402 get_msg(ret, msg); in do_init()
405 if ((r = sshbuf_get_u8(msg, &type)) != 0) in do_init()
410 sshbuf_free(msg); in do_init()
414 if ((r = sshbuf_get_u32(msg, &ret->version)) != 0) in do_init()
420 while (sshbuf_len(msg) > 0) { in do_init()
426 if ((r = sshbuf_get_cstring(msg, &name, NULL)) != 0 || in do_init()
427 (r = sshbuf_get_string(msg, &value, &vlen)) != 0) in do_init()
460 sshbuf_free(msg); in do_init()
487 struct sshbuf *msg; in do_close() local
490 if ((msg = sshbuf_new()) == NULL) in do_close()
494 if ((r = sshbuf_put_u8(msg, SSH2_FXP_CLOSE)) != 0 || in do_close()
495 (r = sshbuf_put_u32(msg, id)) != 0 || in do_close()
496 (r = sshbuf_put_string(msg, handle, handle_len)) != 0) in do_close()
498 send_msg(conn, msg); in do_close()
505 sshbuf_free(msg); in do_close()
515 struct sshbuf *msg; in do_lsreaddir() local
528 if ((msg = sshbuf_new()) == NULL) in do_lsreaddir()
530 if ((r = sshbuf_put_u8(msg, SSH2_FXP_OPENDIR)) != 0 || in do_lsreaddir()
531 (r = sshbuf_put_u32(msg, id)) != 0 || in do_lsreaddir()
532 (r = sshbuf_put_cstring(msg, path)) != 0) in do_lsreaddir()
534 send_msg(conn, msg); in do_lsreaddir()
539 sshbuf_free(msg); in do_lsreaddir()
554 sshbuf_reset(msg); in do_lsreaddir()
555 if ((r = sshbuf_put_u8(msg, SSH2_FXP_READDIR)) != 0 || in do_lsreaddir()
556 (r = sshbuf_put_u32(msg, id)) != 0 || in do_lsreaddir()
557 (r = sshbuf_put_string(msg, handle, handle_len)) != 0) in do_lsreaddir()
559 send_msg(conn, msg); in do_lsreaddir()
561 sshbuf_reset(msg); in do_lsreaddir()
563 get_msg(conn, msg); in do_lsreaddir()
565 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in do_lsreaddir()
566 (r = sshbuf_get_u32(msg, &id)) != 0) in do_lsreaddir()
577 if ((r = sshbuf_get_u32(msg, &rstatus)) != 0) in do_lsreaddir()
589 if ((r = sshbuf_get_u32(msg, &count)) != 0) in do_lsreaddir()
598 if ((r = sshbuf_get_cstring(msg, &filename, in do_lsreaddir()
600 (r = sshbuf_get_cstring(msg, &longname, in do_lsreaddir()
604 if ((r = decode_attrib(msg, &a)) != 0) { in do_lsreaddir()
609 sshbuf_free(msg); in do_lsreaddir()
639 sshbuf_free(msg); in do_lsreaddir()
810 struct sshbuf *msg; in do_realpath() local
821 if ((msg = sshbuf_new()) == NULL) in do_realpath()
824 get_msg(conn, msg); in do_realpath()
825 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in do_realpath()
826 (r = sshbuf_get_u32(msg, &id)) != 0) in do_realpath()
835 if ((r = sshbuf_get_u32(msg, &status)) != 0) in do_realpath()
838 sshbuf_free(msg); in do_realpath()
844 if ((r = sshbuf_get_u32(msg, &count)) != 0) in do_realpath()
849 if ((r = sshbuf_get_cstring(msg, &filename, NULL)) != 0 || in do_realpath()
850 (r = sshbuf_get_cstring(msg, &longname, NULL)) != 0 || in do_realpath()
851 (r = decode_attrib(msg, &a)) != 0) in do_realpath()
859 sshbuf_free(msg); in do_realpath()
868 struct sshbuf *msg; in do_rename() local
872 if ((msg = sshbuf_new()) == NULL) in do_rename()
878 if ((r = sshbuf_put_u8(msg, SSH2_FXP_EXTENDED)) != 0 || in do_rename()
879 (r = sshbuf_put_u32(msg, id)) != 0 || in do_rename()
880 (r = sshbuf_put_cstring(msg, in do_rename()
884 if ((r = sshbuf_put_u8(msg, SSH2_FXP_RENAME)) != 0 || in do_rename()
885 (r = sshbuf_put_u32(msg, id)) != 0) in do_rename()
888 if ((r = sshbuf_put_cstring(msg, oldpath)) != 0 || in do_rename()
889 (r = sshbuf_put_cstring(msg, newpath)) != 0) in do_rename()
891 send_msg(conn, msg); in do_rename()
895 sshbuf_free(msg); in do_rename()
908 struct sshbuf *msg; in do_hardlink() local
917 if ((msg = sshbuf_new()) == NULL) in do_hardlink()
922 if ((r = sshbuf_put_u8(msg, SSH2_FXP_EXTENDED)) != 0 || in do_hardlink()
923 (r = sshbuf_put_u32(msg, id)) != 0 || in do_hardlink()
924 (r = sshbuf_put_cstring(msg, "hardlink@openssh.com")) != 0 || in do_hardlink()
925 (r = sshbuf_put_cstring(msg, oldpath)) != 0 || in do_hardlink()
926 (r = sshbuf_put_cstring(msg, newpath)) != 0) in do_hardlink()
928 send_msg(conn, msg); in do_hardlink()
931 sshbuf_free(msg); in do_hardlink()
944 struct sshbuf *msg; in do_symlink() local
953 if ((msg = sshbuf_new()) == NULL) in do_symlink()
958 if ((r = sshbuf_put_u8(msg, SSH2_FXP_SYMLINK)) != 0 || in do_symlink()
959 (r = sshbuf_put_u32(msg, id)) != 0 || in do_symlink()
960 (r = sshbuf_put_cstring(msg, oldpath)) != 0 || in do_symlink()
961 (r = sshbuf_put_cstring(msg, newpath)) != 0) in do_symlink()
963 send_msg(conn, msg); in do_symlink()
966 sshbuf_free(msg); in do_symlink()
979 struct sshbuf *msg; in do_fsync() local
988 if ((msg = sshbuf_new()) == NULL) in do_fsync()
991 if ((r = sshbuf_put_u8(msg, SSH2_FXP_EXTENDED)) != 0 || in do_fsync()
992 (r = sshbuf_put_u32(msg, id)) != 0 || in do_fsync()
993 (r = sshbuf_put_cstring(msg, "fsync@openssh.com")) != 0 || in do_fsync()
994 (r = sshbuf_put_string(msg, handle, handle_len)) != 0) in do_fsync()
996 send_msg(conn, msg); in do_fsync()
998 sshbuf_free(msg); in do_fsync()
1011 struct sshbuf *msg; in do_readlink() local
1021 if ((msg = sshbuf_new()) == NULL) in do_readlink()
1024 get_msg(conn, msg); in do_readlink()
1025 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in do_readlink()
1026 (r = sshbuf_get_u32(msg, &id)) != 0) in do_readlink()
1035 if ((r = sshbuf_get_u32(msg, &status)) != 0) in do_readlink()
1038 sshbuf_free(msg); in do_readlink()
1044 if ((r = sshbuf_get_u32(msg, &count)) != 0) in do_readlink()
1049 if ((r = sshbuf_get_cstring(msg, &filename, NULL)) != 0 || in do_readlink()
1050 (r = sshbuf_get_cstring(msg, &longname, NULL)) != 0 || in do_readlink()
1051 (r = decode_attrib(msg, &a)) != 0) in do_readlink()
1058 sshbuf_free(msg); in do_readlink()
1068 struct sshbuf *msg; in do_statvfs() local
1079 if ((msg = sshbuf_new()) == NULL) in do_statvfs()
1081 sshbuf_reset(msg); in do_statvfs()
1082 if ((r = sshbuf_put_u8(msg, SSH2_FXP_EXTENDED)) != 0 || in do_statvfs()
1083 (r = sshbuf_put_u32(msg, id)) != 0 || in do_statvfs()
1084 (r = sshbuf_put_cstring(msg, "statvfs@openssh.com")) != 0 || in do_statvfs()
1085 (r = sshbuf_put_cstring(msg, path)) != 0) in do_statvfs()
1087 send_msg(conn, msg); in do_statvfs()
1088 sshbuf_free(msg); in do_statvfs()
1098 struct sshbuf *msg; in do_fstatvfs() local
1108 if ((msg = sshbuf_new()) == NULL) in do_fstatvfs()
1110 sshbuf_reset(msg); in do_fstatvfs()
1111 if ((r = sshbuf_put_u8(msg, SSH2_FXP_EXTENDED)) != 0 || in do_fstatvfs()
1112 (r = sshbuf_put_u32(msg, id)) != 0 || in do_fstatvfs()
1113 (r = sshbuf_put_cstring(msg, "fstatvfs@openssh.com")) != 0 || in do_fstatvfs()
1114 (r = sshbuf_put_string(msg, handle, handle_len)) != 0) in do_fstatvfs()
1116 send_msg(conn, msg); in do_fstatvfs()
1117 sshbuf_free(msg); in do_fstatvfs()
1127 struct sshbuf *msg; in send_read_request() local
1130 if ((msg = sshbuf_new()) == NULL) in send_read_request()
1132 sshbuf_reset(msg); in send_read_request()
1133 if ((r = sshbuf_put_u8(msg, SSH2_FXP_READ)) != 0 || in send_read_request()
1134 (r = sshbuf_put_u32(msg, id)) != 0 || in send_read_request()
1135 (r = sshbuf_put_string(msg, handle, handle_len)) != 0 || in send_read_request()
1136 (r = sshbuf_put_u64(msg, offset)) != 0 || in send_read_request()
1137 (r = sshbuf_put_u32(msg, len)) != 0) in send_read_request()
1139 send_msg(conn, msg); in send_read_request()
1140 sshbuf_free(msg); in send_read_request()
1149 struct sshbuf *msg; in do_download() local
1191 if ((msg = sshbuf_new()) == NULL) in do_download()
1198 if ((r = sshbuf_put_u8(msg, SSH2_FXP_OPEN)) != 0 || in do_download()
1199 (r = sshbuf_put_u32(msg, id)) != 0 || in do_download()
1200 (r = sshbuf_put_cstring(msg, remote_path)) != 0 || in do_download()
1201 (r = sshbuf_put_u32(msg, SSH2_FXF_READ)) != 0 || in do_download()
1202 (r = encode_attrib(msg, &junk)) != 0) in do_download()
1204 send_msg(conn, msg); in do_download()
1210 sshbuf_free(msg); in do_download()
1237 sshbuf_free(msg); in do_download()
1285 sshbuf_reset(msg); in do_download()
1286 get_msg(conn, msg); in do_download()
1287 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in do_download()
1288 (r = sshbuf_get_u32(msg, &id)) != 0) in do_download()
1302 if ((r = sshbuf_get_u32(msg, &status)) != 0) in do_download()
1313 if ((r = sshbuf_get_string(msg, &data, &len)) != 0) in do_download()
1433 sshbuf_free(msg); in do_download()
1560 struct sshbuf *msg; in do_upload() local
1621 if ((msg = sshbuf_new()) == NULL) in do_upload()
1626 if ((r = sshbuf_put_u8(msg, SSH2_FXP_OPEN)) != 0 || in do_upload()
1627 (r = sshbuf_put_u32(msg, id)) != 0 || in do_upload()
1628 (r = sshbuf_put_cstring(msg, remote_path)) != 0 || in do_upload()
1629 (r = sshbuf_put_u32(msg, SSH2_FXF_WRITE|SSH2_FXF_CREAT| in do_upload()
1631 (r = encode_attrib(msg, &a)) != 0) in do_upload()
1633 send_msg(conn, msg); in do_upload()
1636 sshbuf_reset(msg); in do_upload()
1642 sshbuf_free(msg); in do_upload()
1682 sshbuf_reset(msg); in do_upload()
1683 if ((r = sshbuf_put_u8(msg, SSH2_FXP_WRITE)) != 0 || in do_upload()
1684 (r = sshbuf_put_u32(msg, ack->id)) != 0 || in do_upload()
1685 (r = sshbuf_put_string(msg, handle, in do_upload()
1687 (r = sshbuf_put_u64(msg, offset)) != 0 || in do_upload()
1688 (r = sshbuf_put_string(msg, data, len)) != 0) in do_upload()
1691 send_msg(conn, msg); in do_upload()
1704 sshbuf_reset(msg); in do_upload()
1705 get_msg(conn, msg); in do_upload()
1706 if ((r = sshbuf_get_u8(msg, &type)) != 0 || in do_upload()
1707 (r = sshbuf_get_u32(msg, &rid)) != 0) in do_upload()
1715 if ((r = sshbuf_get_u32(msg, &status)) != 0) in do_upload()
1738 sshbuf_free(msg); in do_upload()