bool_t xdr_ls_challenge_in(XDR *xdrs, ls_challenge_in *objp) { if (!xdr_u_int(xdrs, &objp->reserved)) { return (FALSE); } if (!xdr_u_int(xdrs, &objp->secret)) { return (FALSE); } if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, 16)) { return (FALSE); } return (TRUE); }
bool_t xdr_read3resok (XDR *xdrs, read3resok *objp) { if (!xdr_post_op_attr (xdrs, &objp->file_attributes)) return FALSE; if (!xdr_count3 (xdrs, &objp->count)) return FALSE; if (!xdr_bool (xdrs, &objp->eof)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_readokres(XDR *xdrs, readokres *objp) { if (!xdr_fattr(xdrs, &objp->attributes)) return (FALSE); if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, NFS_MAXDATA)) return (FALSE); return (TRUE); }
bool_t xdr_ndmp3_execute_cdb_request (XDR *xdrs, ndmp3_execute_cdb_request *objp) { register int32_t *buf; if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_u_long (xdrs, &objp->flags)) return FALSE; if (!xdr_u_long (xdrs, &objp->timeout)) return FALSE; if (!xdr_u_long (xdrs, &objp->datain_len)) return FALSE; } else { IXDR_PUT_U_LONG(buf, objp->flags); IXDR_PUT_U_LONG(buf, objp->timeout); IXDR_PUT_U_LONG(buf, objp->datain_len); } if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0)) return FALSE; return TRUE; } else if (xdrs->x_op == XDR_DECODE) { buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_u_long (xdrs, &objp->flags)) return FALSE; if (!xdr_u_long (xdrs, &objp->timeout)) return FALSE; if (!xdr_u_long (xdrs, &objp->datain_len)) return FALSE; } else { objp->flags = IXDR_GET_U_LONG(buf); objp->timeout = IXDR_GET_U_LONG(buf); objp->datain_len = IXDR_GET_U_LONG(buf); } if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0)) return FALSE; return TRUE; } if (!xdr_u_long (xdrs, &objp->flags)) return FALSE; if (!xdr_u_long (xdrs, &objp->timeout)) return FALSE; if (!xdr_u_long (xdrs, &objp->datain_len)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_krb5_keyblock(XDR *xdrs, krb5_keyblock *objp) { /* XXX This only works because free_keyblock assumes ->contents is allocated by malloc() */ if(!xdr_krb5_enctype(xdrs, &objp->enctype)) return FALSE; if(!xdr_bytes(xdrs, (char **) &objp->contents, (unsigned int *) &objp->length, ~0)) return FALSE; return TRUE; }
bool_t xdr_ls_query_out(XDR *xdrs, ls_query_out *objp) { if (!xdr_u_int(xdrs, &objp->status)) { return (FALSE); } if (!xdr_u_int(xdrs, &objp->value)) { return (FALSE); } if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, ~0)) { return (FALSE); } return (TRUE); }
bool_t xdr_am_fhandle3(XDR *xdrs, am_fhandle3 *objp) { if (amuDebug(D_XDRTRACE)) plog(XLOG_DEBUG, "xdr_am_fhandle3:"); if (!xdr_bytes(xdrs, (char **) &objp->fhandle3_val, (u_int *) &objp->fhandle3_len, AM_FHSIZE3)) return (FALSE); return (TRUE); }
bool_t xdr_gf1_cli_create_vol_req (XDR *xdrs, gf1_cli_create_vol_req *objp) { if (!xdr_string (xdrs, &objp->volname, ~0)) return FALSE; if (!xdr_gf1_cluster_type (xdrs, &objp->type)) return FALSE; if (!xdr_int (xdrs, &objp->count)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->bricks.bricks_val, (u_int *) &objp->bricks.bricks_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_gf1_cli_peer_list_rsp (XDR *xdrs, gf1_cli_peer_list_rsp *objp) { register int32_t *buf; buf = NULL; if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->friends.friends_val, (u_int *) &objp->friends.friends_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_gf1_cli_fsm_log_rsp (XDR *xdrs, gf1_cli_fsm_log_rsp *objp) { if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; if (!xdr_string (xdrs, &objp->op_errstr, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->fsm_log.fsm_log_val, (u_int *) &objp->fsm_log.fsm_log_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_Device_WriteParms (XDR *xdrs, Device_WriteParms *objp) { if (!xdr_Device_Link (xdrs, &objp->lid)) return FALSE; if (!xdr_u_long (xdrs, &objp->io_timeout)) return FALSE; if (!xdr_u_long (xdrs, &objp->lock_timeout)) return FALSE; if (!xdr_Device_Flags (xdrs, &objp->flags)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_gd1_mgmt_brick_op_rsp (XDR *xdrs, gd1_mgmt_brick_op_rsp *objp) { if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->output.output_val, (u_int *) &objp->output.output_len, ~0)) return FALSE; if (!xdr_string (xdrs, &objp->op_errstr, ~0)) return FALSE; return TRUE; }
bool_t xdr_gss_buffer_desc(XDR *xdrs, gss_buffer_desc *buf) { char *val; u_int len; len = buf->length; val = buf->value; if (!xdr_bytes(xdrs, &val, &len, ~0)) return (FALSE); buf->length = len; buf->value = val; return (TRUE); }
bool_t xdr_gd1_mgmt_friend_req (XDR *xdrs, gd1_mgmt_friend_req *objp) { if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) return FALSE; if (!xdr_string (xdrs, &objp->hostname, ~0)) return FALSE; if (!xdr_int (xdrs, &objp->port)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->vols.vols_val, (u_int *) &objp->vols.vols_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_readokres(XDR *xdrs, readokres *objp) { register int32_t *buf = buf; if(!xdr_fattr(xdrs, &objp->attributes)) { return (FALSE); } if(!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, NFS_MAXDATA)) { return (FALSE); } return (TRUE); }
bool_t xdr_chunk (XDR *xdrs, chunk *objp) { // register int32_t *buf; if (!xdr_string (xdrs, &objp->filename, FILENAME_LENGTH)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, DATA_LENGTH)) return FALSE; if (!xdr_int (xdrs, &objp->status)) return FALSE; if (!xdr_int (xdrs, &objp->dest_offset)) return FALSE; return TRUE; }
bool_t xdr_gss_buffer_desc(XDR *xdrs, gss_buffer_desc *p) { char *val; u_int len; bool_t ret; val = p->value; len = p->length; ret = xdr_bytes(xdrs, &val, &len, MAX_GSS_SIZE); p->value = val; p->length = len; return (ret); }
bool_t xdr_gss_OID_desc(XDR *xdrs, gss_OID_desc *oid) { char *val; u_int len; len = oid->length; val = oid->elements; if (!xdr_bytes(xdrs, &val, &len, ~0)) return (FALSE); oid->length = len; oid->elements = val; return (TRUE); }
bool_t xdr_remote_client_copyfile_outcome (XDR *xdrs, remote_client_copyfile_outcome *objp) { register int32_t *buf; if (!xdr_bool (xdrs, &objp->valid_copyfile)) return FALSE; if (!xdr_int (xdrs, &objp->num_bytes_in_transfer)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) return FALSE; if (!xdr_bool (xdrs, &objp->eof)) return FALSE; return TRUE; }
bool_t xdr_WRITE3args(register XDR *xdrs, WRITE3args *objp) { if (!xdr_nfs_fh3(xdrs, &objp->file)) return (FALSE); if (!xdr_offset3(xdrs, &objp->offset)) return (FALSE); if (!xdr_count3(xdrs, &objp->count)) return (FALSE); if (!xdr_stable_how(xdrs, &objp->stable)) return (FALSE); if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) return (FALSE); return (TRUE); }
bool_t xdr_gf_cli_rsp (XDR *xdrs, gf_cli_rsp *objp) { register int32_t *buf; buf = NULL; if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; if (!xdr_string (xdrs, &objp->op_errstr, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_gf1_cli_set_vol_rsp (XDR *xdrs, gf1_cli_set_vol_rsp *objp) { if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; if (!xdr_string (xdrs, &objp->volname, ~0)) return FALSE; if (!xdr_string (xdrs, &objp->op_errstr, ~0)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_write_args(XDR *xdrs, WRITE3args *objp) { if (!xdr_nfs_fh3(xdrs, &objp->file)) return FALSE; if (!xdr_offset3(xdrs, &objp->offset)) return FALSE; if (!xdr_count3(xdrs, &objp->count)) return FALSE; if (!xdr_stable_how(xdrs, &objp->stable)) return FALSE; if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_fsdb_client (XDR *xdrs, fsdb_client *objp) { if (!xdr_fsdb_client_id (xdrs, &objp->id)) return FALSE; if (!xdr_uint32_t (xdrs, &objp->flags)) return FALSE; if (!xdr_uint32_t (xdrs, &objp->sequence_id)) return FALSE; if (!xdr_opaque (xdrs, objp->verifier, NFS_VERIFIER_SIZE)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->owner.owner_val, (u_int *) &objp->owner.owner_len, NFS_OPAQUE_LIMIT)) return FALSE; return TRUE; }
bool_t xdr_writeargs(XDR *xdrs, writeargs *objp) { if (!xdr_nfs_fh(xdrs, &objp->file)) return (FALSE); if (!xdr_u_int(xdrs, &objp->beginoffset)) return (FALSE); if (!xdr_u_int(xdrs, &objp->offset)) return (FALSE); if (!xdr_u_int(xdrs, &objp->totalcount)) return (FALSE); if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA)) return (FALSE); return (TRUE); }
bool_t xdr_readokres(XDR *xdrs, nfsreadokres *objp) { if (amuDebug(D_XDRTRACE)) plog(XLOG_DEBUG, "xdr_readokres:"); if (!xdr_fattr(xdrs, &objp->raok_attributes)) { return (FALSE); } if (!xdr_bytes(xdrs, (char **) & objp->raok_u.raok_val_u, (u_int *) & objp->raok_u.raok_len_u, NFS_MAXDATA)) { return (FALSE); } return (TRUE); }
bool_t xdr_output (XDR *xdrs, output *objp) { register int32_t *buf; if (!xdr_int (xdrs, &objp->errno)) return FALSE; switch (objp->errno) { case 0: if (!xdr_bytes (xdrs, (char **)&objp->output_u.res.res_val, (u_int *) &objp->output_u.res.res_len, ~0)) return FALSE; break; default: break; } return TRUE; }
bool_t smb_buf32_xdr(XDR *xdrs, smb_buf32_t *objp) { uint_t maxsize = SMB_XDRMAX32_SZ; uint_t size; if (xdrs->x_op != XDR_DECODE) maxsize = size = (uint_t)objp->len; if (xdr_bytes(xdrs, (char **)&objp->val, &size, maxsize)) { if (xdrs->x_op == XDR_DECODE) objp->len = (uint32_t)size; return (TRUE); } return (FALSE); }
bool_t xdr_rpc_loc_predicted_orbits_data_s_type (XDR *xdrs, rpc_loc_predicted_orbits_data_s_type *objp) { register int32_t *buf; if (!xdr_rpc_loc_predicted_orbits_data_format_e_type (xdrs, &objp->format_type)) return FALSE; if (!xdr_rpc_uint32 (xdrs, &objp->total_size)) return FALSE; if (!xdr_rpc_uint8 (xdrs, &objp->total_parts)) return FALSE; if (!xdr_rpc_uint8 (xdrs, &objp->part)) return FALSE; if (!xdr_rpc_uint16 (xdrs, &objp->part_len)) return FALSE; if (!xdr_bytes (xdrs, (char **)&objp->data_ptr.data_ptr_val, (u_int *) &objp->data_ptr.data_ptr_len, ~0)) return FALSE; return TRUE; }
bool_t xdr_rpc_gss_buf(XDR *xdrs, gss_buffer_t buf, u_int maxsize) { bool_t xdr_stat; u_int tmplen; if (xdrs->x_op != XDR_DECODE) { if (buf->length > UINT_MAX) return (FALSE); else tmplen = buf->length; } xdr_stat = xdr_bytes(xdrs, (char **)&buf->value, &tmplen, maxsize); if (xdr_stat && xdrs->x_op == XDR_DECODE) buf->length = tmplen; return (xdr_stat); }