当前位置: 首页>>代码示例>>C++>>正文


C++ xdr_bytes函数代码示例

本文整理汇总了C++中xdr_bytes函数的典型用法代码示例。如果您正苦于以下问题:C++ xdr_bytes函数的具体用法?C++ xdr_bytes怎么用?C++ xdr_bytes使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xdr_bytes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: xdr_ls_challenge_in

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);
}
开发者ID:waywardmonkeys,项目名称:mlworks-temporary,代码行数:13,代码来源:lsxdr.c

示例2: xdr_read3resok

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;
}
开发者ID:BillTheBest,项目名称:glusterfs,代码行数:13,代码来源:xdr-nfs3.c

示例3: xdr_readokres

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);
}
开发者ID:ajinkya93,项目名称:OpenBSD,代码行数:13,代码来源:nfs_prot_xdr.c

示例4: xdr_ndmp3_execute_cdb_request

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;
}
开发者ID:TonyChiang,项目名称:amanda,代码行数:59,代码来源:ndmp3_xdr.c

示例5: xdr_krb5_keyblock

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;
}
开发者ID:FarazShaikh,项目名称:likewise-open,代码行数:13,代码来源:kadm_rpc_xdr.c

示例6: xdr_ls_query_out

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);
}
开发者ID:waywardmonkeys,项目名称:mlworks-temporary,代码行数:13,代码来源:lsxdr.c

示例7: xdr_am_fhandle3

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);
}
开发者ID:0xbda2d2f8,项目名称:freebsd,代码行数:13,代码来源:xdr_func.c

示例8: xdr_gf1_cli_create_vol_req

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;
}
开发者ID:Kaushikbv,项目名称:glusterfs,代码行数:14,代码来源:cli1-xdr.c

示例9: xdr_gf1_cli_peer_list_rsp

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;
}
开发者ID:rajesh0541,项目名称:glusterfs,代码行数:14,代码来源:cli1-xdr.c

示例10: xdr_gf1_cli_fsm_log_rsp

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;
}
开发者ID:Kaushikbv,项目名称:glusterfs,代码行数:14,代码来源:cli1-xdr.c

示例11: xdr_Device_WriteParms

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;
}
开发者ID:epicsdeb,项目名称:sdds,代码行数:14,代码来源:agilentcomm.cpp

示例12: xdr_gd1_mgmt_brick_op_rsp

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;
}
开发者ID:vbellur,项目名称:glusterfs,代码行数:14,代码来源:glusterd1-xdr.c

示例13: xdr_gss_buffer_desc

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);
}
开发者ID:2asoft,项目名称:freebsd,代码行数:15,代码来源:gssd_prot.c

示例14: xdr_gd1_mgmt_friend_req

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;
}
开发者ID:vbellur,项目名称:glusterfs,代码行数:15,代码来源:glusterd1-xdr.c

示例15: xdr_readokres

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);
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:15,代码来源:nfs_prot_xdr.c


注:本文中的xdr_bytes函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。