diff options
Diffstat (limited to 'rpc/xdr/src/glusterd1-xdr.c')
| -rw-r--r-- | rpc/xdr/src/glusterd1-xdr.c | 360 | 
1 files changed, 356 insertions, 4 deletions
diff --git a/rpc/xdr/src/glusterd1-xdr.c b/rpc/xdr/src/glusterd1-xdr.c index 6c6514c901c..7fa98aaebc7 100644 --- a/rpc/xdr/src/glusterd1-xdr.c +++ b/rpc/xdr/src/glusterd1-xdr.c @@ -493,7 +493,7 @@ xdr_gd1_mgmt_brick_op_rsp (XDR *xdrs, gd1_mgmt_brick_op_rsp *objp)  }  bool_t -xdr_gd1_mgmt_volume_lock_req (XDR *xdrs, gd1_mgmt_volume_lock_req *objp) +xdr_gd1_mgmt_v3_lock_req (XDR *xdrs, gd1_mgmt_v3_lock_req *objp)  {  	register int32_t *buf;          buf = NULL; @@ -512,7 +512,7 @@ xdr_gd1_mgmt_volume_lock_req (XDR *xdrs, gd1_mgmt_volume_lock_req *objp)  }  bool_t -xdr_gd1_mgmt_volume_lock_rsp (XDR *xdrs, gd1_mgmt_volume_lock_rsp *objp) +xdr_gd1_mgmt_v3_lock_rsp (XDR *xdrs, gd1_mgmt_v3_lock_rsp *objp)  {  	register int32_t *buf;          buf = NULL; @@ -533,7 +533,357 @@ xdr_gd1_mgmt_volume_lock_rsp (XDR *xdrs, gd1_mgmt_volume_lock_rsp *objp)  }  bool_t -xdr_gd1_mgmt_volume_unlock_req (XDR *xdrs, gd1_mgmt_volume_unlock_req *objp) +xdr_gd1_mgmt_v3_pre_val_req (XDR *xdrs, gd1_mgmt_v3_pre_val_req *objp) +{ +	register int32_t *buf; +        buf = NULL; + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 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_gd1_mgmt_v3_pre_val_rsp (XDR *xdrs, gd1_mgmt_v3_pre_val_rsp *objp) +{ +	register int32_t *buf; +        buf = NULL; + + +	if (xdrs->x_op == XDR_ENCODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		IXDR_PUT_LONG(buf, objp->op); +		IXDR_PUT_LONG(buf, objp->op_ret); +		IXDR_PUT_LONG(buf, objp->op_errno); +		} +		 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; +	} else if (xdrs->x_op == XDR_DECODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		objp->op = IXDR_GET_LONG(buf); +		objp->op_ret = IXDR_GET_LONG(buf); +		objp->op_errno = IXDR_GET_LONG(buf); +		} +		 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; +	} + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 return FALSE; +	 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_gd1_mgmt_v3_brick_op_req (XDR *xdrs, gd1_mgmt_v3_brick_op_req *objp) +{ +	register int32_t *buf; +        buf = NULL; + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 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_gd1_mgmt_v3_brick_op_rsp (XDR *xdrs, gd1_mgmt_v3_brick_op_rsp *objp) +{ +	register int32_t *buf; +        buf = NULL; + + +	if (xdrs->x_op == XDR_ENCODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		IXDR_PUT_LONG(buf, objp->op); +		IXDR_PUT_LONG(buf, objp->op_ret); +		IXDR_PUT_LONG(buf, objp->op_errno); +		} +		 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; +	} else if (xdrs->x_op == XDR_DECODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		objp->op = IXDR_GET_LONG(buf); +		objp->op_ret = IXDR_GET_LONG(buf); +		objp->op_errno = IXDR_GET_LONG(buf); +		} +		 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; +	} + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 return FALSE; +	 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_gd1_mgmt_v3_commit_req (XDR *xdrs, gd1_mgmt_v3_commit_req *objp) +{ +	register int32_t *buf; +        buf = NULL; + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 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_gd1_mgmt_v3_commit_rsp (XDR *xdrs, gd1_mgmt_v3_commit_rsp *objp) +{ +	register int32_t *buf; +        buf = NULL; + + +	if (xdrs->x_op == XDR_ENCODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		IXDR_PUT_LONG(buf, objp->op); +		IXDR_PUT_LONG(buf, objp->op_ret); +		IXDR_PUT_LONG(buf, objp->op_errno); +		} +		 if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) +			 return FALSE; +		 if (!xdr_string (xdrs, &objp->op_errstr, ~0)) +			 return FALSE; +		return TRUE; +	} else if (xdrs->x_op == XDR_DECODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		objp->op = IXDR_GET_LONG(buf); +		objp->op_ret = IXDR_GET_LONG(buf); +		objp->op_errno = IXDR_GET_LONG(buf); +		} +		 if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) +			 return FALSE; +		 if (!xdr_string (xdrs, &objp->op_errstr, ~0)) +			 return FALSE; +	 return TRUE; +	} + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op_ret)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op_errno)) +		 return FALSE; +	 if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) +		 return FALSE; +	 if (!xdr_string (xdrs, &objp->op_errstr, ~0)) +		 return FALSE; +	return TRUE; +} + +bool_t +xdr_gd1_mgmt_v3_post_val_req (XDR *xdrs, gd1_mgmt_v3_post_val_req *objp) +{ +	register int32_t *buf; +        buf = NULL; + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op_ret)) +		 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_gd1_mgmt_v3_post_val_rsp (XDR *xdrs, gd1_mgmt_v3_post_val_rsp *objp) +{ +	register int32_t *buf; +        buf = NULL; + + +	if (xdrs->x_op == XDR_ENCODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		IXDR_PUT_LONG(buf, objp->op); +		IXDR_PUT_LONG(buf, objp->op_ret); +		IXDR_PUT_LONG(buf, objp->op_errno); +		} +		 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; +	} else if (xdrs->x_op == XDR_DECODE) { +		 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +			sizeof (u_char), (xdrproc_t) xdr_u_char)) +			 return FALSE; +		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); +		if (buf == NULL) { +			 if (!xdr_int (xdrs, &objp->op)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_ret)) +				 return FALSE; +			 if (!xdr_int (xdrs, &objp->op_errno)) +				 return FALSE; + +		} else { +		objp->op = IXDR_GET_LONG(buf); +		objp->op_ret = IXDR_GET_LONG(buf); +		objp->op_errno = IXDR_GET_LONG(buf); +		} +		 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; +	} + +	 if (!xdr_vector (xdrs, (char *)objp->uuid, 16, +		sizeof (u_char), (xdrproc_t) xdr_u_char)) +		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 return FALSE; +	 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_gd1_mgmt_v3_unlock_req (XDR *xdrs, gd1_mgmt_v3_unlock_req *objp)  {  	register int32_t *buf;          buf = NULL; @@ -544,13 +894,15 @@ xdr_gd1_mgmt_volume_unlock_req (XDR *xdrs, gd1_mgmt_volume_unlock_req *objp)  	 if (!xdr_vector (xdrs, (char *)objp->txn_id, 16,  		sizeof (u_char), (xdrproc_t) xdr_u_char))  		 return FALSE; +	 if (!xdr_int (xdrs, &objp->op)) +		 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_gd1_mgmt_volume_unlock_rsp (XDR *xdrs, gd1_mgmt_volume_unlock_rsp *objp) +xdr_gd1_mgmt_v3_unlock_rsp (XDR *xdrs, gd1_mgmt_v3_unlock_rsp *objp)  {  	register int32_t *buf;          buf = NULL;  | 
