本文整理汇总了C++中xdr_int函数的典型用法代码示例。如果您正苦于以下问题:C++ xdr_int函数的具体用法?C++ xdr_int怎么用?C++ xdr_int使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xdr_int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xdr_readres
bool_t
xdr_readres (XDR *xdrs, readres *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->status))
return FALSE;
if (!xdr_string (xdrs, &objp->data, ~0))
return FALSE;
return TRUE;
}
示例2: xdr_remote_client_run_cmd_args
bool_t
xdr_remote_client_run_cmd_args (XDR *xdrs, remote_client_run_cmd_args *objp)
{
register int32_t *buf;
if (!xdr_string (xdrs, &objp->cmdstring, MAX_CMD_LEN))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例3: xdr_remote_client_run_cmd_outcome
bool_t
xdr_remote_client_run_cmd_outcome (XDR *xdrs, remote_client_run_cmd_outcome *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->valid))
return FALSE;
if (!xdr_string (xdrs, &objp->outputline, MAX_CMD_OUTPUT_LINE_LEN))
return FALSE;
return TRUE;
}
示例4: xdr_remote_client_dirlist_args
bool_t
xdr_remote_client_dirlist_args (XDR *xdrs, remote_client_dirlist_args *objp)
{
register int32_t *buf;
if (!xdr_string (xdrs, &objp->remotepathname, MAX_PATHNAME_LEN))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例5: xdr_remote_client_cntrl_args
bool_t
xdr_remote_client_cntrl_args (XDR *xdrs, remote_client_cntrl_args *objp)
{
register int32_t *buf;
if (!xdr_bool (xdrs, &objp->clear_shared_memory_flag))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例6: xdr_remote_client_cancel_tag_args
bool_t
xdr_remote_client_cancel_tag_args (XDR *xdrs, remote_client_cancel_tag_args *objp)
{
register int32_t *buf;
if (!xdr_u_int (xdrs, &objp->tag))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例7: xdr_remote_client_clear_ident_args
bool_t
xdr_remote_client_clear_ident_args (XDR *xdrs, remote_client_clear_ident_args *objp)
{
register int32_t *buf;
if (!xdr_string (xdrs, &objp->identstring, MAX_IDENT_LEN))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例8: xdr_uvfsstat
bool_t
xdr_uvfsstat(XDR *xdrs, uvfsstat *objp)
{
register int32_t *buf;
if (!xdr_int(xdrs, objp)) {
return (FALSE);
}
return (TRUE);
}
示例9: xdr_remote_client_query_cmdlog_args
bool_t
xdr_remote_client_query_cmdlog_args (XDR *xdrs, remote_client_query_cmdlog_args *objp)
{
register int32_t *buf;
if (!xdr_u_int (xdrs, &objp->index))
return FALSE;
if (!xdr_int (xdrs, &objp->msglevel))
return FALSE;
return TRUE;
}
示例10: xdr_array_in
bool_t
xdr_array_in (XDR *xdrs, array_in *objp)
{
register int32_t *buf;
if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (int), (xdrproc_t) xdr_int))
return FALSE;
if (!xdr_int (xdrs, &objp->size))
return FALSE;
return TRUE;
}
示例11: xdr_result
bool_t
xdr_result (XDR *xdrs, result *objp)
{
register int32_t *buf;
if (!xdr_int (xdrs, &objp->status))
return FALSE;
if (!xdr_String (xdrs, &objp->resultData))
return FALSE;
return TRUE;
}
示例12: encode_kv
static int
encode_kv(XDR *x, const char *k, const char *v)
{
int32_t n = 1;
if (!xdr_string(x, (char **)&k, _LU_MAXLUSTRLEN)) return 1;
if (!xdr_int(x, &n)) return 1;
if (!xdr_string(x, (char **)&v, _LU_MAXLUSTRLEN)) return 1;
return 0;
}
示例13: xdr_stuff
bool_t
xdr_stuff (XDR *xdrs, stuff *objp)
{
register int32_t *buf;
if (!xdr_string (xdrs, &objp->name, 64))
return FALSE;
if (!xdr_int (xdrs, &objp->val))
return FALSE;
return TRUE;
}
示例14: ltspfs_readlink
void
ltspfs_readlink (int sockfd, XDR *in)
{
XDR out;
char path[PATH_MAX];
char buf[PATH_MAX]; /* linkname */
char output[LTSP_MAXBUF];
char *bufptr = buf;
int i;
/* readlink doesn't terminate with a null */
memset (buf, 0, PATH_MAX);
if (get_fn(sockfd, in, path)) { /* Get the link source */
eacces(sockfd);
return;
}
if (readlink (path, buf, PATH_MAX) == -1) {
status_return(sockfd, FAIL);
return;
}
if (!strncmp(buf, mountpoint, strlen(mountpoint))) /* adjust link target */
bufptr += strlen(mountpoint);
xdrmem_create(&out, output, LTSP_MAXBUF, XDR_ENCODE);
i = 0;
xdr_int(&out, &i); /* First, the dummy length */
xdr_int(&out, &i); /* Then the 0 status return */
xdr_string(&out, &bufptr, PATH_MAX); /* Link target */
i = xdr_getpos(&out); /* Get our position */
xdr_setpos(&out, 0); /* Rewind to the beginning */
xdr_int(&out, &i); /* Rewrite with proper length */
xdr_destroy(&out);
if (debug)
info("returning ok", output);
writen(sockfd, output, i);
}
示例15: xdr_stats
bool_t
xdr_stats(XDR *xdrs, stats *objp)
{
if (!xdr_vector(xdrs, (char *)objp->cp_time, CPUSTATES, sizeof(int), xdr_int)) {
return (FALSE);
}
if (!xdr_vector(xdrs, (char *)objp->dk_xfer, DK_NDRIVE, sizeof(int), xdr_int)) {
return (FALSE);
}
if (!xdr_u_int(xdrs, &objp->v_pgpgin)) {
return (FALSE);
}
if (!xdr_u_int(xdrs, &objp->v_pgpgout)) {
return (FALSE);
}
if (!xdr_u_int(xdrs, &objp->v_pswpin)) {
return (FALSE);
}
if (!xdr_u_int(xdrs, &objp->v_pswpout)) {
return (FALSE);
}
if (!xdr_u_int(xdrs, &objp->v_intr)) {
return (FALSE);
}
if (!xdr_int(xdrs, &objp->if_ipackets)) {
return (FALSE);
}
if (!xdr_int(xdrs, &objp->if_ierrors)) {
return (FALSE);
}
if (!xdr_int(xdrs, &objp->if_oerrors)) {
return (FALSE);
}
if (!xdr_int(xdrs, &objp->if_collisions)) {
return (FALSE);
}
if (!xdr_int(xdrs, &objp->if_opackets)) {
return (FALSE);
}
return (TRUE);
}