这篇教程C++ xdr_bool函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xdr_bool函数的典型用法代码示例。如果您正苦于以下问题:C++ xdr_bool函数的具体用法?C++ xdr_bool怎么用?C++ xdr_bool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xdr_bool函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: xdr_remote_client_cmd_argsbool_txdr_remote_client_cmd_args (XDR *xdrs, remote_client_cmd_args *objp){ register int32_t *buf; if (!xdr_string (xdrs, &objp->cmdstring, MAX_CMD_LEN)) return FALSE; if (!xdr_stringlist (xdrs, &objp->environment_settings)) return FALSE; if (!xdr_string (xdrs, &objp->identstring, MAX_IDENT_LEN)) return FALSE; if (!xdr_int (xdrs, &objp->run_in_background)) return FALSE; if (!xdr_int (xdrs, &objp->run_in_shell)) return FALSE; if (!xdr_Iu32 (xdrs, &objp->timeout)) return FALSE; if (!xdr_bool (xdrs, &objp->fail_on_timeout)) return FALSE; if (!xdr_bool (xdrs, &objp->workqueueID_flag)) return FALSE; if (!xdr_Iu32 (xdrs, &objp->workqueueID)) return FALSE; if (!xdr_Iu32 (xdrs, &objp->actionresultID)) return FALSE; if (!xdr_int (xdrs, &objp->msglevel)) return FALSE; return TRUE;}
开发者ID:DaveSinclair,项目名称:DAF,代码行数:29,
示例2: xdr_nulltype/* * Function: xdr_nulltype * * Purpose: XDR function for arbitrary pointer types that are either * NULL or contain data. */bool_t xdr_nulltype(XDR *xdrs, void **objp, xdrproc_t proc){ bool_t null; switch (xdrs->x_op) { case XDR_DECODE: if (!xdr_bool(xdrs, &null)) return FALSE; if (null) { *objp = NULL; return TRUE; } return (*proc)(xdrs, objp); case XDR_ENCODE: if (*objp == NULL) null = TRUE; else null = FALSE; if (!xdr_bool(xdrs, &null)) return FALSE; if (null == FALSE) return (*proc)(xdrs, objp); return TRUE; case XDR_FREE: if (*objp) return (*proc)(xdrs, objp); return TRUE; } return FALSE;}
开发者ID:FarazShaikh,项目名称:LikewiseSMB2,代码行数:39,
示例3: xdr_Create_LinkParmsbool_t xdr_Create_LinkParms (XDR *xdrs, Create_LinkParms *objp){#if defined(SOLARIS) && !defined(_LP64) register long *buf;#else register int32_t *buf;#endif if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_long (xdrs, &objp->clientId)) return FALSE; if (!xdr_bool (xdrs, &objp->lockDevice)) return FALSE; if (!xdr_u_long (xdrs, &objp->lock_timeout)) return FALSE; } else { IXDR_PUT_INT32(buf, objp->clientId); IXDR_PUT_BOOL(buf, objp->lockDevice); IXDR_PUT_U_INT32(buf, objp->lock_timeout); } if (!xdr_string (xdrs, &objp->device, ~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_long (xdrs, &objp->clientId)) return FALSE; if (!xdr_bool (xdrs, &objp->lockDevice)) return FALSE; if (!xdr_u_long (xdrs, &objp->lock_timeout)) return FALSE; } else { objp->clientId = IXDR_GET_INT32(buf); objp->lockDevice = IXDR_GET_BOOL(buf); objp->lock_timeout = IXDR_GET_U_INT32(buf); } if (!xdr_string (xdrs, &objp->device, ~0)) return FALSE; return TRUE; } if (!xdr_long (xdrs, &objp->clientId)) return FALSE; if (!xdr_bool (xdrs, &objp->lockDevice)) return FALSE; if (!xdr_u_long (xdrs, &objp->lock_timeout)) return FALSE; if (!xdr_string (xdrs, &objp->device, ~0)) return FALSE; return TRUE;}
开发者ID:epicsdeb,项目名称:sdds,代码行数:56,
示例4: xdr_remote_client_query_tag_outcomebool_txdr_remote_client_query_tag_outcome (XDR *xdrs, remote_client_query_tag_outcome *objp){ register int32_t *buf; if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_bool (xdrs, &objp->valid)) return FALSE; if (!xdr_u_int (xdrs, &objp->state)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_code)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_signal)) return FALSE; } else { IXDR_PUT_BOOL(buf, objp->valid); IXDR_PUT_U_LONG(buf, objp->state); IXDR_PUT_LONG(buf, objp->cmd_exit_code); IXDR_PUT_LONG(buf, objp->cmd_exit_signal); } return TRUE; } else if (xdrs->x_op == XDR_DECODE) { buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_bool (xdrs, &objp->valid)) return FALSE; if (!xdr_u_int (xdrs, &objp->state)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_code)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_signal)) return FALSE; } else { objp->valid = IXDR_GET_BOOL(buf); objp->state = IXDR_GET_U_LONG(buf); objp->cmd_exit_code = IXDR_GET_LONG(buf); objp->cmd_exit_signal = IXDR_GET_LONG(buf); } return TRUE; } if (!xdr_bool (xdrs, &objp->valid)) return FALSE; if (!xdr_u_int (xdrs, &objp->state)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_code)) return FALSE; if (!xdr_int (xdrs, &objp->cmd_exit_signal)) return FALSE; return TRUE;}
开发者ID:DaveSinclair,项目名称:DAF,代码行数:54,
示例5: xdr_klm_holderbool_txdr_klm_holder (XDR *xdrs, klm_holder *objp){ register int32_t *buf; if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_int (xdrs, &objp->svid)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_offset)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_len)) return FALSE; } else { IXDR_PUT_BOOL(buf, objp->exclusive); IXDR_PUT_LONG(buf, objp->svid); IXDR_PUT_U_LONG(buf, objp->l_offset); IXDR_PUT_U_LONG(buf, objp->l_len); } return TRUE; } else if (xdrs->x_op == XDR_DECODE) { buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); if (buf == NULL) { if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_int (xdrs, &objp->svid)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_offset)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_len)) return FALSE; } else { objp->exclusive = IXDR_GET_BOOL(buf); objp->svid = IXDR_GET_LONG(buf); objp->l_offset = IXDR_GET_U_LONG(buf); objp->l_len = IXDR_GET_U_LONG(buf); } return TRUE; } if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_int (xdrs, &objp->svid)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_offset)) return FALSE; if (!xdr_u_int (xdrs, &objp->l_len)) return FALSE; return TRUE;}
开发者ID:ArmstrongJ,项目名称:MiNTLib,代码行数:54,
示例6: xdr_klm_lockargsbool_txdr_klm_lockargs(XDR *xdrs, klm_lockargs *objp){ if (!xdr_bool(xdrs, &objp->block)) return (FALSE); if (!xdr_bool(xdrs, &objp->exclusive)) return (FALSE); if (!xdr_klm_lock(xdrs, &objp->alock)) return (FALSE); return (TRUE);}
开发者ID:GSchiaffonati,项目名称:OmegaFreeBSD,代码行数:12,
示例7: xdr_klm_lockargsbool_txdr_klm_lockargs (XDR *xdrs, klm_lockargs *objp){ register int32_t *buf; if (!xdr_bool (xdrs, &objp->block)) return FALSE; if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_klm_lock (xdrs, &objp->alock)) return FALSE; return TRUE;}
开发者ID:ArmstrongJ,项目名称:MiNTLib,代码行数:13,
示例8: xdr_nlm4_cancargsbool_txdr_nlm4_cancargs (XDR *xdrs, nlm4_cancargs *objp){ if (!xdr_netobj (xdrs, &objp->cookie)) return FALSE; if (!xdr_bool (xdrs, &objp->block)) return FALSE; if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_nlm4_lock (xdrs, &objp->alock)) return FALSE; return TRUE;}
开发者ID:rsevero,项目名称:glusterfs,代码行数:13,
示例9: writeInputvoid writeInput(void){ const char routineName[] = "writeInput"; bool_t result=TRUE, PRD_angle_dep, XRD, big_endian; FILE *fp_out; XDR xdrs; if (!strcmp(INPUT_DOT_OUT, "none")) return; if ((fp_out = fopen(INPUT_DOT_OUT, "w")) == NULL) { sprintf(messageStr, "Unable to open output file %s", INPUT_DOT_OUT); Error(ERROR_LEVEL_1, routineName, messageStr); return; } xdrstdio_create(&xdrs, fp_out, XDR_ENCODE); PRD_angle_dep = (input.PRD_angle_dep != PRD_ANGLE_INDEP && atmos.NPRDactive > 0); XRD = (input.XRD && atmos.NPRDactive > 0); /* --- Write various input parameters to file -- -------------- */ result &= xdr_bool(&xdrs, &input.magneto_optical); result &= xdr_bool(&xdrs, &PRD_angle_dep); result &= xdr_bool(&xdrs, &XRD); result &= xdr_enum(&xdrs, (enum_t *) &input.startJ); result &= xdr_enum(&xdrs, (enum_t *) &input.StokesMode); result &= xdr_double(&xdrs, &input.metallicity); result &= xdr_bool(&xdrs, &input.backgr_pol); /* --- Write Endianness of compute architecture so that J can be read properly in the analysis -- -------------- */ big_endian = is_big_endian(); result &= xdr_bool(&xdrs, &big_endian); if (!result) { sprintf(messageStr, "Unable to write proper amount to output file %s", INPUT_DOT_OUT); Error(ERROR_LEVEL_1, routineName, messageStr); } xdr_destroy(&xdrs); fclose(fp_out);}
开发者ID:kouui,项目名称:rh,代码行数:49,
示例10: xdr_remote_client_copyfile_outcomebool_txdr_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;}
开发者ID:DaveSinclair,项目名称:DAF,代码行数:15,
示例11: xdr_nlm_cancargsbool_txdr_nlm_cancargs (XDR *xdrs, nlm_cancargs *objp){ register int32_t *buf; if (!xdr_netobj (xdrs, &objp->cookie)) return FALSE; if (!xdr_bool (xdrs, &objp->block)) return FALSE; if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_nlm_lock (xdrs, &objp->alock)) return FALSE; return TRUE;}
开发者ID:ArmstrongJ,项目名称:MiNTLib,代码行数:15,
示例12: xdr_decode_wlist/* * Conditionally decode a RDMA WRITE chunk list from XDR stream. * * If the next boolean in the XDR stream is false there is no * RDMA WRITE chunk list present. Otherwise iterate over the * array and for each entry: allocate a struct clist and decode. * Pass back an indication via wlist_exists if we have seen a * RDMA WRITE chunk list. */bool_txdr_decode_wlist(XDR *xdrs, struct clist **w, bool_t *wlist_exists){ struct clist *tmp; bool_t more = FALSE; uint32_t seg_array_len; uint32_t i; if (!xdr_bool(xdrs, &more)) return (FALSE); /* is there a wlist? */ if (more == FALSE) { *wlist_exists = FALSE; return (TRUE); } *wlist_exists = TRUE; if (!xdr_uint32(xdrs, &seg_array_len)) return (FALSE); tmp = *w = clist_alloc(); for (i = 0; i < seg_array_len; i++) { if (!xdr_uint32(xdrs, &tmp->c_dmemhandle.mrc_rmr)) return (FALSE); if (!xdr_uint32(xdrs, &tmp->c_len)) return (FALSE); DTRACE_PROBE1(krpc__i__xdr_decode_wlist_len, uint_t, tmp->c_len); if (!xdr_uint64(xdrs, &tmp->u.c_daddr)) return (FALSE); if (i < seg_array_len - 1) { tmp->c_next = clist_alloc(); tmp = tmp->c_next; } else { tmp->c_next = NULL; } } more = FALSE; if (!xdr_bool(xdrs, &more)) return (FALSE); return (TRUE);}
开发者ID:BjoKaSH,项目名称:ZCE-CDDL-FILES,代码行数:57,
示例13: xdr_getquota_rsltstatic int xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr){ if (!xdr_int(xdrsp, "astat)) { DEBUG(6,("nfs_quotas: Status bad or zero/n")); return 0; } if (!xdr_int(xdrsp, &gqr->getquota_rslt_u.gqr_rquota.rq_bsize)) { DEBUG(6,("nfs_quotas: Block size bad or zero/n")); return 0; } if (!xdr_bool(xdrsp, &gqr->getquota_rslt_u.gqr_rquota.rq_active)) { DEBUG(6,("nfs_quotas: Active bad or zero/n")); return 0; } if (!xdr_int(xdrsp, &gqr->getquota_rslt_u.gqr_rquota.rq_bhardlimit)) { DEBUG(6,("nfs_quotas: Hardlimit bad or zero/n")); return 0; } if (!xdr_int(xdrsp, &gqr->getquota_rslt_u.gqr_rquota.rq_bsoftlimit)) { DEBUG(6,("nfs_quotas: Softlimit bad or zero/n")); return 0; } if (!xdr_int(xdrsp, &gqr->getquota_rslt_u.gqr_rquota.rq_curblocks)) { DEBUG(6,("nfs_quotas: Currentblocks bad or zero/n")); return 0; } return (1);}
开发者ID:livebox,项目名称:livebox2,代码行数:28,
示例14: xdr_remote_client_query_version_outcomebool_txdr_remote_client_query_version_outcome (XDR *xdrs, remote_client_query_version_outcome *objp){ register int32_t *buf; if (!xdr_u_int (xdrs, &objp->agent_major_version)) return FALSE; if (!xdr_u_int (xdrs, &objp->agent_minor_version)) return FALSE; if (!xdr_string (xdrs, &objp->agent_version_string, 128)) return FALSE; if (!xdr_string (xdrs, &objp->agent_build_machine, 128)) return FALSE; if (!xdr_bool (xdrs, &objp->p_osdata_is_valid)) return FALSE; if (!xdr_string (xdrs, &objp->p_name, 128)) return FALSE; if (!xdr_string (xdrs, &objp->p_os_type, 128)) return FALSE; if (!xdr_string (xdrs, &objp->p_os_version, 128)) return FALSE; if (!xdr_string (xdrs, &objp->p_os_description, 128)) return FALSE; if (!xdr_string (xdrs, &objp->p_cpu_architecture, 128)) return FALSE; return TRUE;}
开发者ID:DaveSinclair,项目名称:DAF,代码行数:27,
示例15: my_xdr_getquota_rsltstatic int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr){ int quotastat; if (!xdr_int(xdrsp, "astat)) { DEBUG(6,("nfs_quotas: Status bad or zero/n")); return 0; } gqr->GQR_STATUS = quotastat; if (!xdr_int(xdrsp, &gqr->GQR_RQUOTA.rq_bsize)) { DEBUG(6,("nfs_quotas: Block size bad or zero/n")); return 0; } if (!xdr_bool(xdrsp, &gqr->GQR_RQUOTA.rq_active)) { DEBUG(6,("nfs_quotas: Active bad or zero/n")); return 0; } if (!xdr_int(xdrsp, (int *)&gqr->GQR_RQUOTA.rq_bhardlimit)) { DEBUG(6,("nfs_quotas: Hardlimit bad or zero/n")); return 0; } if (!xdr_int(xdrsp, (int *)&gqr->GQR_RQUOTA.rq_bsoftlimit)) { DEBUG(6,("nfs_quotas: Softlimit bad or zero/n")); return 0; } if (!xdr_int(xdrsp, (int *)&gqr->GQR_RQUOTA.rq_curblocks)) { DEBUG(6,("nfs_quotas: Currentblocks bad or zero/n")); return 0; } return (1);}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:32,
示例16: xdr_decode_reply_wchunk/* * XDR decode the long reply write chunk. */bool_txdr_decode_reply_wchunk(XDR *xdrs, struct clist **clist){ bool_t have_rchunk = FALSE; struct clist *first = NULL, *ncl = NULL; uint32_t num_wclist; uint32_t i; if (!xdr_bool(xdrs, &have_rchunk)) return (FALSE); if (have_rchunk == FALSE) return (TRUE); if (!xdr_uint32(xdrs, &num_wclist)) { DTRACE_PROBE(krpc__e__xdrrdma__replywchunk__listlength); return (FALSE); } if (num_wclist == 0) { return (FALSE); } first = ncl = clist_alloc(); for (i = 0; i < num_wclist; i++) { if (i > 0) { ncl->c_next = clist_alloc(); ncl = ncl->c_next; } if (!xdr_uint32(xdrs, &ncl->c_dmemhandle.mrc_rmr)) goto err_out; if (!xdr_uint32(xdrs, &ncl->c_len)) goto err_out; if (!xdr_uint64(xdrs, &ncl->u.c_daddr)) goto err_out; if (ncl->c_len > MAX_SVC_XFER_SIZE) { DTRACE_PROBE( krpc__e__xdrrdma__replywchunk__chunklist_toobig); ncl->c_len = MAX_SVC_XFER_SIZE; } if (!(ncl->c_dmemhandle.mrc_rmr && (ncl->c_len > 0) && ncl->u.c_daddr)) DTRACE_PROBE( krpc__e__xdrrdma__replywchunk__invalid_segaddr); DTRACE_PROBE1(krpc__i__xdr_decode_reply_wchunk_c_len, uint32_t, ncl->c_len); } *clist = first; return (TRUE);err_out: clist_free(first); return (FALSE);}
开发者ID:BjoKaSH,项目名称:ZCE-CDDL-FILES,代码行数:63,
示例17: xdr_pmaplist/* * What is going on with linked lists? (!) * First recall the link list declaration from pmap_prot.h: * * struct pmaplist { * struct pmap pml_map; * struct pmaplist *pml_map; * }; * * Compare that declaration with a corresponding xdr declaration that * is (a) pointer-less, and (b) recursive: * * typedef union switch (bool_t) { * * case TRUE: struct { * struct pmap; * pmaplist_t foo; * }; * * case FALSE: struct {}; * } pmaplist_t; * * Notice that the xdr declaration has no nxt pointer while * the C declaration has no bool_t variable. The bool_t can be * interpreted as ``more data follows me''; if FALSE then nothing * follows this bool_t; if TRUE then the bool_t is followed by * an actual struct pmap, and then (recursively) by the * xdr union, pmaplist_t. * * This could be implemented via the xdr_union primitive, though this * would cause a one recursive call per element in the list. Rather than do * that we can ``unwind'' the recursion * into a while loop and do the union arms in-place. * * The head of the list is what the C programmer wishes to past around * the net, yet is the data that the pointer points to which is interesting; * this sounds like a job for xdr_reference! */bool_txdr_pmaplist( register XDR *xdrs, register struct pmaplist **rp){ /* * more_elements is pre-computed in case the direction is * XDR_ENCODE or XDR_FREE. more_elements is overwritten by * xdr_bool when the direction is XDR_DECODE. */ bool_t more_elements; register int freeing = (xdrs->x_op == XDR_FREE); register struct pmaplist **next; while (TRUE) { more_elements = (bool_t)(*rp != NULL); if (! xdr_bool(xdrs, &more_elements)) return (FALSE); if (! more_elements) return (TRUE); /* we are done */ /* * the unfortunate side effect of non-recursion is that in * the case of freeing we must remember the next object * before we free the current object ... */ if (freeing) next = &((*rp)->pml_next); if (! xdr_reference(xdrs, (caddr_t *)rp, (u_int)sizeof(struct pmaplist), xdr_pmap)) return (FALSE); rp = (freeing) ? next : &((*rp)->pml_next); }}
开发者ID:mingpen,项目名称:OpenNT,代码行数:71,
示例18: smb_posix_grps_helper_xdrstatic bool_tsmb_posix_grps_helper_xdr(XDR *xdrs, char **identity){ uint32_t pos, len; uint32_t cnt; bool_t rc; if (xdrs->x_op == XDR_DECODE) { pos = xdr_getpos(xdrs); if (!xdr_bool(xdrs, &rc)) return (FALSE); if (!xdr_uint32_t(xdrs, &cnt)) return (FALSE); rc = xdr_setpos(xdrs, pos); if (rc == FALSE) return (FALSE); } else { if (*identity == NULL) return (FALSE); cnt = ((smb_posix_grps_t *)(uintptr_t)*identity)->pg_ngrps; } len = SMB_POSIX_GRPS_SIZE(cnt); if (!xdr_pointer(xdrs, identity, len, (xdrproc_t)smb_posix_grps_xdr)) return (FALSE); return (TRUE);}
开发者ID:mikess,项目名称:illumos-gate,代码行数:31,
示例19: xdr_ypall/* * Serializes/deserializes a stream of struct ypresp_key_val's. This is used * only by the client side of the batch enumerate operation. */boolxdr_ypall(XDR *xdrs, struct ypall_callback *callback){ bool_t more; struct ypresp_key_val kv; char keybuf[YPMAXRECORD]; char valbuf[YPMAXRECORD]; if (xdrs->x_op == XDR_ENCODE) return (FALSE); if (xdrs->x_op == XDR_FREE) return (TRUE); kv.keydat.dptr = keybuf; kv.valdat.dptr = valbuf; kv.keydat.dsize = YPMAXRECORD; kv.valdat.dsize = YPMAXRECORD; for (;;) { if (!xdr_bool(xdrs, &more)) return (FALSE); if (!more) return (TRUE); if (!xdr_ypresp_key_val(xdrs, &kv)) return (FALSE); if ((*callback->foreach)(kv.status, kv.keydat.dptr, kv.keydat.dsize, kv.valdat.dptr, kv.valdat.dsize, callback->data)) return (TRUE); }}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:38,
示例20: xdr_mntlistencodestatic bool_txdr_mntlistencode(XDR *xdrs, HASHSET *mntlist){ HASHSET_ITERATOR iterator = h_iterator(*mntlist); for (;;) { struct mntentry *m = (struct mntentry *)h_next(iterator); bool_t more_data = (m != NULL); if (!xdr_bool(xdrs, &more_data)) { if (iterator != NULL) free(iterator); return (FALSE); } if (!more_data) break; if ((!xdr_name(xdrs, &m->m_host)) || (!xdr_dirpath(xdrs, &m->m_path))) { if (iterator != NULL) free(iterator); return (FALSE); } } if (iterator != NULL) free(iterator); return (TRUE);}
开发者ID:CoryXie,项目名称:opensolaris,代码行数:32,
示例21: xdr_ypmaplist/* * Serializes/deserializes a ypmaplist. */static boolxdr_ypmaplist(XDR *xdrs, struct ypmaplist **lst){ bool_t more_elements; int freeing = (xdrs->x_op == XDR_FREE); struct ypmaplist **next; for (;;) { more_elements = (*lst != NULL); if (!xdr_bool(xdrs, &more_elements)) return (FALSE); if (!more_elements) return (TRUE); /* All done */ if (freeing) next = &((*lst)->ypml_next); if (!xdr_reference(xdrs, (caddr_t *)lst, (uint_t)sizeof (struct ypmaplist), (xdrproc_t)xdr_ypmaplist_wrap_string)) return (FALSE); lst = (freeing) ? next : &((*lst)->ypml_next); } /*NOTREACHED*/}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:31,
示例22: xdr_gss_OIDbool_txdr_gss_OID(XDR *xdrs, gss_OID *oidp){ gss_OID oid; bool_t is_null; switch (xdrs->x_op) { case XDR_ENCODE: oid = *oidp; if (oid) { is_null = FALSE; if (!xdr_bool(xdrs, &is_null) || !xdr_gss_OID_desc(xdrs, oid)) return (FALSE); } else { is_null = TRUE; if (!xdr_bool(xdrs, &is_null)) return (FALSE); } break; case XDR_DECODE: if (!xdr_bool(xdrs, &is_null)) return (FALSE); if (is_null) { *oidp = GSS_C_NO_OID; } else { oid = mem_alloc(sizeof(gss_OID_desc)); memset(oid, 0, sizeof(*oid)); if (!xdr_gss_OID_desc(xdrs, oid)) { mem_free(oid, sizeof(gss_OID_desc)); return (FALSE); } *oidp = oid; } break; case XDR_FREE: oid = *oidp; if (oid) { xdr_gss_OID_desc(xdrs, oid); mem_free(oid, sizeof(gss_OID_desc)); } } return (TRUE);}
开发者ID:2asoft,项目名称:freebsd,代码行数:47,
示例23: xdr_gss_OID_setbool_txdr_gss_OID_set(XDR *xdrs, gss_OID_set *setp){ gss_OID_set set; bool_t is_null; switch (xdrs->x_op) { case XDR_ENCODE: set = *setp; if (set) { is_null = FALSE; if (!xdr_bool(xdrs, &is_null) || !xdr_gss_OID_set_desc(xdrs, set)) return (FALSE); } else { is_null = TRUE; if (!xdr_bool(xdrs, &is_null)) return (FALSE); } break; case XDR_DECODE: if (!xdr_bool(xdrs, &is_null)) return (FALSE); if (is_null) { *setp = GSS_C_NO_OID_SET; } else { set = mem_alloc(sizeof(gss_OID_set_desc)); memset(set, 0, sizeof(*set)); if (!xdr_gss_OID_set_desc(xdrs, set)) { mem_free(set, sizeof(gss_OID_set_desc)); return (FALSE); } *setp = set; } break; case XDR_FREE: set = *setp; if (set) { xdr_gss_OID_set_desc(xdrs, set); mem_free(set, sizeof(gss_OID_set_desc)); } } return (TRUE);}
开发者ID:2asoft,项目名称:freebsd,代码行数:47,
示例24: xdr_encode_rlist_svc/* ARGSUSED */bool_txdr_encode_rlist_svc(XDR *xdrs, clist *rlist){ bool_t vfalse = FALSE; ASSERT(rlist == NULL); return (xdr_bool(xdrs, &vfalse));}
开发者ID:BjoKaSH,项目名称:ZCE-CDDL-FILES,代码行数:9,
示例25: xdr_nlm4_lockargsbool_txdr_nlm4_lockargs (XDR *xdrs, nlm4_lockargs *objp){ if (!xdr_netobj (xdrs, &objp->cookie)) return FALSE; if (!xdr_bool (xdrs, &objp->block)) return FALSE; if (!xdr_bool (xdrs, &objp->exclusive)) return FALSE; if (!xdr_nlm4_lock (xdrs, &objp->alock)) return FALSE; if (!xdr_bool (xdrs, &objp->reclaim)) return FALSE; if (!xdr_int (xdrs, &objp->state)) return FALSE; return TRUE;}
开发者ID:rsevero,项目名称:glusterfs,代码行数:17,
示例26: F77_FUNCvoidF77_FUNC(xdrfbool,XDRFBOOL)(int *xdrid, int *pb, int *ret) { xdr_fortran_lock(); *ret = xdr_bool(xdridptr[*xdrid], pb); cnt += XDR_INT_SIZE; xdr_fortran_unlock();}
开发者ID:alexholehouse,项目名称:gromacs,代码行数:8,
示例27: xdrypserv_ypall/* * Serializes a stream of struct ypresp_key_val's. This is used * only by the ypserv side of the transaction. */static boolxdrypserv_ypall(XDR *xdrs, struct ypreq_nokey *req){ bool_t more = TRUE; struct ypresp_key_val resp; DBM *fdb; resp.keydat.dptr = resp.valdat.dptr = (char *)NULL; resp.keydat.dsize = resp.valdat.dsize = 0; if ((fdb = ypset_current_map(req->map, req->domain, &resp.status)) != NULL) { ypfilter(fdb, (datum *) NULL, &resp.keydat, &resp.valdat, &resp.status, FALSE); while (resp.status == YP_TRUE) { if (!xdr_bool(xdrs, &more)) { return (FALSE); } if (!xdr_ypresp_key_val(xdrs, &resp)) { return (FALSE); } ypfilter(fdb, &resp.keydat, &resp.keydat, &resp.valdat, &resp.status, FALSE); } } if (!xdr_bool(xdrs, &more)) { return (FALSE); } if (!xdr_ypresp_key_val(xdrs, &resp)) { return (FALSE); } more = FALSE; if (!xdr_bool(xdrs, &more)) { return (FALSE); } return (TRUE);}
开发者ID:andreiw,项目名称:polaris,代码行数:49,
示例28: xdr_primo_outbool_txdr_primo_out (XDR *xdrs, primo_out *objp){ register int32_t *buf; if (!xdr_bool (xdrs, &objp->res)) return FALSE; return TRUE;}
开发者ID:tatan1121,项目名称:Proyecto-distribuidos,代码行数:9,
示例29: xdr_dirlistp3bool_txdr_dirlistp3 (XDR *xdrs, dirlistp3 *objp){ if (!xdr_pointer (xdrs, (char **)&objp->entries, sizeof (entryp3), (xdrproc_t) xdr_entryp3)) return FALSE; if (!xdr_bool (xdrs, &objp->eof)) return FALSE; return TRUE;}
开发者ID:Byreddys,项目名称:glusterfs,代码行数:9,
注:本文中的xdr_bool函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xdr_bytes函数代码示例 C++ xdr_array函数代码示例 |