本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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));
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例13: xdr_pmap
bool_t
xdr_pmap(
XDR *xdrs,
struct pmap *regs)
{
if (xdr_uint32_t(xdrs, ®s->pm_prog) &&
xdr_uint32_t(xdrs, ®s->pm_vers) &&
xdr_uint32_t(xdrs, ®s->pm_prot))
return (xdr_uint32_t(xdrs, ®s->pm_port));
return (FALSE);
}
示例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;
}
示例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);
}