Lines Matching refs:reply

100 	ndmp_data_get_state_reply_v2 reply;
103 reply.error = NDMP_NO_ERR;
104 reply.operation = session->ns_data.dd_operation;
105 reply.state = session->ns_data.dd_state;
106 reply.halt_reason = session->ns_data.dd_halt_reason;
108 reply.est_time_remain =
110 reply.est_bytes_remain =
114 reply.bytes_processed =
117 reply.mover = session->ns_data.dd_mover;
118 reply.read_offset = long_long_to_quad(session->ns_data.dd_read_offset);
119 reply.read_length = long_long_to_quad(session->ns_data.dd_read_length);
121 ndmp_send_reply(connection, &reply,
122 "sending data_get_state reply");
142 ndmp_data_start_backup_reply_v2 reply;
148 reply.error = NDMP_NO_ERR;
155 * start_backup sends the reply if the backup is successfully started.
156 * Otherwise, send the reply containing the error here.
160 reply.error = err;
161 ndmp_send_reply(connection, &reply,
162 "sending data_start_backup reply");
183 ndmp_data_start_recover_reply_v2 reply;
195 * start_recover sends the reply if the recover is successfully started.
196 * Otherwise, send the reply containing the error here.
199 reply.error = err;
200 ndmp_send_reply(connection, &reply,
201 "sending ndmp_data_start_recover_request_v2 reply");
224 ndmp_data_get_env_reply reply;
227 (void) memset((void*)&reply, 0, sizeof (reply));
230 reply.error = NDMP_ILLEGAL_STATE_ERR;
231 reply.env.env_len = 0;
233 reply.error = NDMP_NO_ERR;
234 reply.env.env_len = session->ns_data.dd_env_len;
235 reply.env.env_val = session->ns_data.dd_env;
238 ndmp_send_reply(connection, &reply, "sending data_get_env reply");
258 ndmp_data_stop_reply reply;
263 reply.error = NDMP_ILLEGAL_STATE_ERR;
264 ndmp_send_reply(connection, &reply,
265 "sending data_stop reply");
278 reply.error = NDMP_NO_ERR;
279 ndmp_send_reply(connection, &reply, "sending data_stop reply");
301 ndmp_data_abort_reply reply;
307 reply.error = NDMP_ILLEGAL_STATE_ERR;
308 ndmp_send_reply(connection, &reply,
309 "sending data_abort reply");
321 reply.error = NDMP_NO_ERR;
322 ndmp_send_reply(connection, &reply, "sending data_abort reply");
347 ndmp_data_get_state_reply_v3 reply;
350 (void) memset((void*)&reply, 0, sizeof (reply));
352 reply.error = NDMP_NO_ERR;
353 reply.invalid = NDMP_DATA_STATE_EST_BYTES_REMAIN_INVALID
355 reply.operation = session->ns_data.dd_operation;
356 reply.state = session->ns_data.dd_state;
357 reply.halt_reason = session->ns_data.dd_halt_reason;
359 if (reply.operation == NDMP_DATA_OP_BACKUP)
360 reply.bytes_processed =
364 reply.bytes_processed =
367 reply.est_bytes_remain = long_long_to_quad(0LL);
368 reply.est_time_remain = 0;
370 ndmp_copy_addr_v3(&reply.data_connection_addr,
372 reply.read_offset = long_long_to_quad(session->ns_data.dd_read_offset);
373 reply.read_length = long_long_to_quad(session->ns_data.dd_read_length);
375 ndmp_send_reply(connection, &reply,
376 "sending ndmp_data_get_state_v3 reply");
396 ndmp_data_start_backup_reply_v3 reply;
401 (void) memset((void*)&reply, 0, sizeof (reply));
408 reply.error = NDMP_ILLEGAL_STATE_ERR;
415 reply.error = NDMP_WRITE_PROTECT_ERR;
442 reply.error = NDMP_ILLEGAL_ARGS_ERR;
447 reply.error = ndmpd_zfs_start_op(session, request->env.env_val,
450 reply.error = ndmpd_tar_start_backup_v3(session,
456 * *_start_backup* sends the reply if the backup is
457 * successfully started. Otherwise, send the reply
463 if (reply.error != NDMP_NO_ERR) {
464 ndmp_send_reply(connection, &reply,
465 "sending data_start_backup_v3 reply");
486 ndmp_data_start_recover_reply_v3 reply;
491 (void) memset((void*)&reply, 0, sizeof (reply));
495 reply.error = NDMP_ILLEGAL_STATE_ERR;
521 reply.error = NDMP_ILLEGAL_ARGS_ERR;
526 reply.error = ndmpd_zfs_start_op(session, request->env.env_val,
530 reply.error = ndmpd_tar_start_recover_v3(session,
536 * *_start_recover* sends the reply if the recover is
537 * successfully started. Otherwise, send the reply
543 if (reply.error != NDMP_NO_ERR) {
544 ndmp_send_reply(connection, &reply,
545 "sending data_start_recover_v3 reply");
569 ndmp_data_abort_reply reply;
574 reply.error = NDMP_ILLEGAL_STATE_ERR;
584 reply.error = NDMP_NO_ERR;
594 reply.error = NDMP_NO_ERR;
599 reply.error = NDMP_ILLEGAL_STATE_ERR;
604 ndmp_send_reply(connection, &reply,
605 "sending data_abort_v3 reply");
625 ndmp_data_stop_reply reply;
630 reply.error = NDMP_ILLEGAL_STATE_ERR;
631 ndmp_send_reply(connection, &reply,
632 "sending data_stop_v3 reply");
643 reply.error = NDMP_NO_ERR;
644 ndmp_send_reply(connection, &reply,
645 "sending data_stop_v3 reply");
666 ndmp_data_listen_reply_v3 reply;
673 (void) memset((void*)&reply, 0, sizeof (reply));
676 reply.error = NDMP_ILLEGAL_STATE_ERR;
680 reply.error = NDMP_ILLEGAL_STATE_ERR;
684 reply.error = NDMP_NO_ERR;
687 if (reply.error != NDMP_NO_ERR) {
688 ndmp_send_reply(connection, &reply,
689 "ndmp_data_listen_request_v3 reply");
695 reply.data_connection_addr.addr_type = request->addr_type;
700 reply.error = NDMP_IO_ERR;
704 reply.error = NDMP_NO_ERR;
705 reply.data_connection_addr.addr_type = request->addr_type;
706 reply.data_connection_addr.tcp_ip_v3 = htonl(addr);
707 reply.data_connection_addr.tcp_port_v3 = htons(port);
718 reply.error = NDMP_ILLEGAL_ARGS_ERR;
722 if (reply.error == NDMP_NO_ERR)
725 ndmp_send_reply(connection, &reply,
726 "ndmp_data_listen_request_v3 reply");
747 ndmp_data_connect_reply_v3 reply;
752 (void) memset((void*)&reply, 0, sizeof (reply));
755 reply.error = NDMP_ILLEGAL_ARGS_ERR;
759 reply.error = NDMP_ILLEGAL_STATE_ERR;
762 reply.error = NDMP_NO_ERR;
765 if (reply.error != NDMP_NO_ERR) {
766 ndmp_send_reply(connection, &reply,
767 "sending ndmp_data_connect_v3 reply");
779 reply.error = NDMP_ILLEGAL_STATE_ERR;
788 reply.error = data_connect_sock_v3(session,
793 reply.error = NDMP_ILLEGAL_ARGS_ERR;
798 if (reply.error == NDMP_NO_ERR)
801 ndmp_send_reply(connection, &reply,
802 "sending ndmp_data_connect_v3 reply");
830 ndmp_data_get_env_reply reply;
833 (void) memset((void*)&reply, 0, sizeof (reply));
838 reply.error = NDMP_ILLEGAL_STATE_ERR;
839 reply.env.env_len = 0;
842 reply.error = NDMP_ILLEGAL_STATE_ERR;
843 reply.env.env_len = 0;
845 reply.error = NDMP_NO_ERR;
846 reply.env.env_len = session->ns_data.dd_env_len;
847 reply.env.env_val = session->ns_data.dd_env;
850 ndmp_send_reply(connection, &reply, "sending data_get_env reply");
869 ndmp_data_get_state_reply_v4 reply;
872 (void) memset((void*)&reply, 0, sizeof (reply));
874 reply.error = NDMP_NO_ERR;
875 reply.unsupported = NDMP_DATA_STATE_EST_BYTES_REMAIN_INVALID
877 reply.operation = session->ns_data.dd_operation;
878 reply.state = session->ns_data.dd_state;
879 reply.halt_reason = session->ns_data.dd_halt_reason;
881 if (reply.operation == NDMP_DATA_OP_BACKUP)
882 reply.bytes_processed = long_long_to_quad(
885 reply.bytes_processed =
888 reply.est_bytes_remain = long_long_to_quad(0LL);
889 reply.est_time_remain = 0;
891 ndmp_copy_addr_v4(&reply.data_connection_addr,
894 reply.read_offset = long_long_to_quad(session->ns_data.dd_read_offset);
895 reply.read_length = long_long_to_quad(session->ns_data.dd_read_length);
897 ndmp_send_reply(connection, &reply,
898 "sending ndmp_data_get_state_v4 reply");
899 free(reply.data_connection_addr.tcp_addr_v4);
920 ndmp_data_connect_reply_v4 reply;
925 (void) memset((void*)&reply, 0, sizeof (reply));
928 reply.error = NDMP_ILLEGAL_ARGS_ERR;
932 reply.error = NDMP_ILLEGAL_STATE_ERR;
935 reply.error = NDMP_NO_ERR;
938 if (reply.error != NDMP_NO_ERR) {
939 ndmp_send_reply(connection, &reply,
940 "sending ndmp_data_connect_v4 reply");
952 reply.error = NDMP_ILLEGAL_STATE_ERR;
961 reply.error = data_connect_sock_v3(session,
966 reply.error = NDMP_ILLEGAL_ARGS_ERR;
971 if (reply.error == NDMP_NO_ERR)
974 ndmp_send_reply(connection, &reply,
975 "sending ndmp_data_connect_v4 reply");
995 ndmp_data_listen_reply_v4 reply;
1002 (void) memset((void*)&reply, 0, sizeof (reply));
1005 reply.error = NDMP_ILLEGAL_STATE_ERR;
1009 reply.error = NDMP_ILLEGAL_STATE_ERR;
1013 reply.error = NDMP_NO_ERR;
1016 if (reply.error != NDMP_NO_ERR) {
1017 ndmp_send_reply(connection, &reply,
1018 "ndmp_data_listen_request_v4 reply");
1024 reply.connect_addr.addr_type = request->addr_type;
1029 reply.error = NDMP_IO_ERR;
1033 reply.error = NDMP_NO_ERR;
1034 reply.connect_addr.addr_type = request->addr_type;
1035 reply.connect_addr.tcp_addr_v4 =
1038 reply.connect_addr.tcp_ip_v4(0) = htonl(addr);
1039 reply.connect_addr.tcp_port_v4(0) = htons(port);
1040 reply.connect_addr.tcp_len_v4 = 1;
1061 reply.error = NDMP_ILLEGAL_ARGS_ERR;
1065 if (reply.error == NDMP_NO_ERR)
1068 ndmp_send_reply(connection, &reply,
1069 "ndmp_data_listen_request_v4 reply");
1090 ndmp_data_start_recover_filehist_reply_v4 reply;
1093 reply.error = NDMP_NOT_SUPPORTED_ERR;
1095 ndmp_send_reply(connection, &reply,
1096 "sending ndmp_data_start_recover_filehist_reply_v4 reply");
1375 ndmp_data_start_backup_reply_v3 reply;
1377 (void) memset((void*)&reply, 0, sizeof (reply));
1443 reply.error = ndmp_backup_get_params_v3(session, params);
1444 if (reply.error != NDMP_NO_ERR) {
1447 return (reply.error);
1450 reply.error = NDMP_NO_ERR;
1452 &reply) < 0) {
1453 NDMP_LOG(LOG_DEBUG, "Sending data_start_backup_v3 reply");
1501 ndmp_data_start_recover_reply_v3 reply;
1506 (void) memset((void*)&reply, 0, sizeof (reply));
1515 reply.error = ndmpd_save_env(session, env_val, env_len);
1516 if (reply.error != NDMP_NO_ERR) {
1521 reply.error = ndmpd_save_nlist_v3(session, nlist_val, nlist_len);
1522 if (reply.error != NDMP_NO_ERR) {
1575 reply.error = NDMP_NO_ERR;
1577 &reply) < 0) {
1617 void *reply;
1678 reply = &backup_reply;
1682 reply = &recover_reply;
1686 reply) < 0) {
1687 NDMP_LOG(LOG_DEBUG, "Sending data_start_%s_v3 reply", str);
2067 ndmp_data_start_backup_reply reply;
2160 reply.error = NDMP_NO_ERR;
2162 &reply) < 0) {
2163 NDMP_LOG(LOG_DEBUG, "Sending data_start_backup reply");
2216 ndmp_data_start_recover_reply_v2 reply;
2233 reply.error = ndmpd_save_env(session, env_val, env_len);
2234 if (reply.error != NDMP_NO_ERR)
2237 reply.error = ndmpd_save_nlist_v2(session, nlist_val, nlist_len);
2238 if (reply.error != NDMP_NO_ERR)
2295 reply.error = NDMP_NO_ERR;
2297 &reply) < 0) {
2298 NDMP_LOG(LOG_DEBUG, "Sending data_start_recover reply");