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


C++ xdr_uint32_t函数代码示例

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


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

示例1: smb_token_xdr

bool_t
smb_token_xdr(XDR *xdrs, smb_token_t *objp)
{
	if (!smb_id_xdr(xdrs, &objp->tkn_user))
		return (FALSE);
	if (!smb_id_xdr(xdrs, &objp->tkn_owner))
		return (FALSE);
	if (!smb_id_xdr(xdrs, &objp->tkn_primary_grp))
		return (FALSE);
	if (!smb_ids_xdr(xdrs, &objp->tkn_win_grps))
		return (FALSE);
	if (!smb_privset_helper_xdr(xdrs, (char **)&objp->tkn_privileges))
		return (FALSE);
	if (!xdr_string(xdrs, &objp->tkn_account_name, ~0))
		return (FALSE);
	if (!xdr_string(xdrs, &objp->tkn_domain_name, ~0))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->tkn_flags))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->tkn_audit_sid))
		return (FALSE);
	if (!xdr_pointer(xdrs, (char **)&objp->tkn_session_key,
	    sizeof (smb_session_key_t), (xdrproc_t)smb_session_key_xdr))
		return (FALSE);
	if (!smb_posix_grps_helper_xdr(xdrs, (char **)&objp->tkn_posix_grps))
		return (FALSE);
	return (TRUE);
}
开发者ID:mikess,项目名称:illumos-gate,代码行数:28,代码来源:smb_token_xdr.c

示例2: dfs_info_xdr

bool_t
dfs_info_xdr(XDR *xdrs, dfs_info_t *objp)
{
	if (!xdr_vector(xdrs, (char *)objp->i_uncpath, DFS_PATH_MAX,
	    sizeof (char), (xdrproc_t)xdr_char))
		return (FALSE);

	if (!xdr_vector(xdrs, (char *)objp->i_comment, DFS_COMMENT_MAX,
	    sizeof (char), (xdrproc_t)xdr_char))
		return (FALSE);

	if (!xdr_vector(xdrs, (char *)objp->i_guid,
	    UUID_PRINTABLE_STRING_LENGTH, sizeof (char), (xdrproc_t)xdr_char))
		return (FALSE);

	if (!xdr_uint32_t(xdrs, &objp->i_state))
		return (FALSE);

	if (!xdr_uint32_t(xdrs, &objp->i_timeout))
		return (FALSE);

	if (!xdr_uint32_t(xdrs, &objp->i_propflags))
		return (FALSE);

	if (!xdr_uint32_t(xdrs, &objp->i_type))
		return (FALSE);

	if (!xdr_array(xdrs, (char **)&objp->i_targets,
	    (uint32_t *)&objp->i_ntargets, ~0, sizeof (dfs_target_t),
	    (xdrproc_t)dfs_target_xdr))
		return (FALSE);

	return (TRUE);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:34,代码来源:smb_xdr.c

示例3: smb_netuserinfo_xdr

/*
 * XDR encode/decode for smb_netuserinfo_t.
 */
bool_t
smb_netuserinfo_xdr(XDR *xdrs, smb_netuserinfo_t *objp)
{
	if (!xdr_uint64_t(xdrs, &objp->ui_session_id))
		return (FALSE);
	if (!xdr_uint16_t(xdrs, &objp->ui_smb_uid))
		return (FALSE);
	if (!xdr_uint16_t(xdrs, &objp->ui_domain_len))
		return (FALSE);
	if (!xdr_string(xdrs, &objp->ui_domain, ~0))
		return (FALSE);
	if (!xdr_uint16_t(xdrs, &objp->ui_account_len))
		return (FALSE);
	if (!xdr_string(xdrs, &objp->ui_account, ~0))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->ui_posix_uid))
		return (FALSE);
	if (!xdr_uint16_t(xdrs, &objp->ui_workstation_len))
		return (FALSE);
	if (!xdr_string(xdrs, &objp->ui_workstation, ~0))
		return (FALSE);
	if (!smb_inaddr_xdr(xdrs, &objp->ui_ipaddr))
		return (FALSE);
	if (!xdr_int32_t(xdrs, &objp->ui_native_os))
		return (FALSE);
	if (!xdr_int64_t(xdrs, &objp->ui_logon_time))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->ui_numopens))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->ui_flags))
		return (FALSE);
	return (TRUE);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:36,代码来源:smb_xdr.c

示例4: xdr_geo_sync_data_ret_t

bool_t
xdr_geo_sync_data_ret_t (XDR *xdrs, geo_sync_data_ret_t *objp)
{
	//register int32_t *buf;

	 if (!xdr_uint16_t (xdrs, &objp->eid))
		 return FALSE;
	 if (!xdr_uint16_t (xdrs, &objp->site_id))
		 return FALSE;
	 if (!xdr_uint64_t (xdrs, &objp->file_idx))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->local_ref))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->remote_ref))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->last))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->first_record))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->nb_records))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
		 return FALSE;
	return TRUE;
}
开发者ID:ptulpen,项目名称:test1234,代码行数:25,代码来源:geo_replica_protoxdr.c

示例5: xdr_nis_oid

bool_t
xdr_nis_oid(XDR *xdrs, nis_oid *objp)
{
	if (!xdr_uint32_t(xdrs, &objp->ctime))
		return (FALSE);
	return (xdr_uint32_t(xdrs, &objp->mtime));
}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:7,代码来源:nis_xdr.c

示例6: _xdr_nis_result

bool_t
_xdr_nis_result (XDR *xdrs, nis_result *objp)
{
  bool_t res = xdr_nis_error (xdrs, &objp->status);
  if (__builtin_expect (res, TRUE))
    {
      res = xdr_array (xdrs, (void *) &objp->objects.objects_val,
		       &objp->objects.objects_len, ~0,
		       sizeof (nis_object), (xdrproc_t) _xdr_nis_object);
      if (__builtin_expect (res, TRUE))
	{
	  res = xdr_netobj (xdrs, &objp->cookie);
	  if (__builtin_expect (res, TRUE))
	    {
	      res = xdr_uint32_t (xdrs, &objp->zticks);
	      if (__builtin_expect (res, TRUE))
		{
		  res = xdr_uint32_t (xdrs, &objp->dticks);
		  if (__builtin_expect (res, TRUE))
		    {
		      res = xdr_uint32_t (xdrs, &objp->aticks);
		      if (__builtin_expect (res, TRUE))
			res = xdr_uint32_t (xdrs, &objp->cticks);
		    }
		}
	    }
	}
    }
  return res;
}
开发者ID:siddhesh,项目名称:glibc,代码行数:30,代码来源:nis_xdr.c

示例7: xdr_rejected_reply

/*
 * XDR the MSG_DENIED part of a reply message union
 */
bool_t 
xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
{
	enum reject_stat *prj_stat;
	enum auth_stat *prj_why;

	assert(xdrs != NULL);
	assert(rr != NULL);

	prj_stat = &rr->rj_stat;

	/* personalized union, rather than calling xdr_union */
	if (! xdr_enum(xdrs, (enum_t *) prj_stat))
		return (FALSE);
	switch (rr->rj_stat) {

	case RPC_MISMATCH:
		if (! xdr_uint32_t(xdrs, &(rr->rj_vers.low)))
			return (FALSE);
		return (xdr_uint32_t(xdrs, &(rr->rj_vers.high)));

	case AUTH_ERROR:
		prj_why = &rr->rj_why;
		return (xdr_enum(xdrs, (enum_t *) prj_why));
	}
	/* NOTREACHED */
	assert(0);
	return (FALSE);
}
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:32,代码来源:rpc_prot.c

示例8: xdr_disk_vol_t

bool_t
xdr_disk_vol_t(
XDR *xdrs,
disk_vol_t *objp)
{

	if (!xdr_vsn_t(xdrs, objp->vol_name))
		return (FALSE);
	if (!xdr_host_t(xdrs, objp->host))
		return (FALSE);
	if (!xdr_upath_t(xdrs, objp->path))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->set_flags))
		return (FALSE);
	/* added in 4.4 release */
#ifdef SAMRPC_CLIENT
	if (xdrs->x_op == XDR_DECODE || xdrs->x_op == XDR_ENCODE) {
		if ((xdrs->x_public != NULL) &&
		    (strcmp(xdrs->x_public, "1.2") <= 0)) {

			return (TRUE); /* versions 1.2 or lower */
		}
	}
#endif /* samrpc_client */
	if (!xdr_fsize_t(xdrs, &objp->capacity))
		return (FALSE);
	if (!xdr_fsize_t(xdrs, &objp->free_space))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->status_flags))
		return (FALSE);
	return (TRUE);
}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:32,代码来源:diskvols_xdr.c

示例9: xdr_nis_oid

static bool_t
xdr_nis_oid (XDR *xdrs, nis_oid *objp)
{
  bool_t res = xdr_uint32_t (xdrs, &objp->ctime);
  if  (__builtin_expect (res, TRUE))
    res = xdr_uint32_t (xdrs, &objp->mtime);
  return res;
}
开发者ID:siddhesh,项目名称:glibc,代码行数:8,代码来源:nis_xdr.c

示例10: smb_luid_xdr

static bool_t
smb_luid_xdr(XDR *xdrs, smb_luid_t *objp)
{
	if (!xdr_uint32_t(xdrs, &objp->lo_part))
		return (FALSE);
	if (!xdr_uint32_t(xdrs, &objp->hi_part))
		return (FALSE);
	return (TRUE);
}
开发者ID:mikess,项目名称:illumos-gate,代码行数:9,代码来源:smb_token_xdr.c

示例11: xdr_storcli_read_no_data_ret_t

bool_t
xdr_storcli_read_no_data_ret_t (XDR *xdrs, storcli_read_no_data_ret_t *objp)
{
	//register int32_t *buf;

	 if (!xdr_uint32_t (xdrs, &objp->alignment))
		 return FALSE;
	 if (!xdr_uint32_t (xdrs, &objp->len))
		 return FALSE;
	return TRUE;
}
开发者ID:OlivierB,项目名称:rozofs,代码行数:11,代码来源:storcli_protoxdr.c

示例12: xdr_kdbe_time_t

bool_t
xdr_kdbe_time_t (XDR *xdrs, kdbe_time_t *objp)
{
    int32_t *buf;

    if (!xdr_uint32_t (xdrs, &objp->seconds))
        return FALSE;
    if (!xdr_uint32_t (xdrs, &objp->useconds))
        return FALSE;
    return TRUE;
}
开发者ID:PADL,项目名称:krb5,代码行数:11,代码来源:iprop_xdr.c

示例13: xdr_pmap

bool_t
xdr_pmap(
	XDR *xdrs,
	struct pmap *regs)
{

	if (xdr_uint32_t(xdrs, &regs->pm_prog) && 
		xdr_uint32_t(xdrs, &regs->pm_vers) && 
		xdr_uint32_t(xdrs, &regs->pm_prot))
		return (xdr_uint32_t(xdrs, &regs->pm_port));
	return (FALSE);
}
开发者ID:richwolski,项目名称:bluesky,代码行数:12,代码来源:pmap_prot.c

示例14: _xdr_cp_result

bool_t
_xdr_cp_result (XDR *xdrs, cp_result *objp)
{
  bool_t res = xdr_nis_error (xdrs, &objp->cp_status);
  if (__builtin_expect (res, TRUE))
    {
      res = xdr_uint32_t (xdrs, &objp->cp_zticks);
      if (__builtin_expect (res, TRUE))
	res = xdr_uint32_t (xdrs, &objp->cp_dticks);
    }
  return res;
}
开发者ID:siddhesh,项目名称:glibc,代码行数:12,代码来源:nis_xdr.c

示例15: smb_list_xdr

/*
 * XDR a list_t list of elements
 * offset - offset of list_node_t in list element
 * elsize - size of list element
 * elproc - XDR function for the list element
 */
bool_t
smb_list_xdr(XDR *xdrs, list_t *list,  const size_t offset,
    const size_t elsize, const xdrproc_t elproc)
{
	void *node;
	uint32_t count = 0;

	switch (xdrs->x_op) {
	case XDR_ENCODE:
		node = list_head(list);
		while (node) {
			++count;
			node = list_next(list, node);
		}
		if (!xdr_uint32_t(xdrs, &count))
			return (FALSE);

		node = list_head(list);
		while (node) {
			if (!elproc(xdrs, node))
				return (FALSE);
			node = list_next(list, node);
		}
		return (TRUE);

	case XDR_DECODE:
		if (!xdr_uint32_t(xdrs, &count))
			return (FALSE);
		list_create(list, elsize, offset);
		while (count) {
			node = MEM_MALLOC("xdr", elsize);
			if (node == NULL)
				return (FALSE);
			if (!elproc(xdrs, node))
				return (FALSE);
			list_insert_tail(list, node);
			--count;
		}
		return (TRUE);

	case XDR_FREE:
		while ((node = list_head(list)) != NULL) {
			list_remove(list, node);
			(void) elproc(xdrs, node);
			MEM_FREE("xdr", node);
		}
		list_destroy(list);
		return (TRUE);
	}

	return (FALSE);
}
开发者ID:bahamas10,项目名称:openzfs,代码行数:58,代码来源:smb_xdr.c


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