1 /* xdr_ptrace.c - xdr routines for remote ptrace calls */
3 /* Copyright 1984, 1985, 1986, 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
5 This code was donated by Wind River Systems, Inc. */
10 01b,25may91,maf now uses counted bytes struct to transfer registers.
11 removed xdr_regs_ptr (), xdr_fp_status_ptr (), and
13 01a,05jun90,llk extracted from xdr_ptrace.h, version 01c.
19 #include "xdr_ptrace.h"
23 /********************************************************************
27 * xdr routine for counted bytes
30 bool_t
xdr_c_bytes(xdrs
,objp
)
34 return(xdr_bytes(xdrs
, &objp
->bytes
, (u_int
*) &objp
->len
, MAX_LEN
));
37 /********************************************************************
41 * xdr routine for counted bytes branch of ptrace_info
45 LOCAL bool_t
xdr_c_bytes_ptr(xdrs
,objp
)
49 return(xdr_pointer(xdrs
, (char **) objp
, sizeof(C_bytes
), xdr_c_bytes
));
50 } /* xdr_c_bytes_ptr */
52 /********************************************************************
56 * xdr routine for discriminated union ptrace_info
60 bool_t
xdr_ptrace_info(xdrs
,objp
)
64 static struct xdr_discrim choices
[] =
66 { (int) DATA
, xdr_c_bytes_ptr
},
67 { __dontcare__
, NULL
}
70 return(xdr_union(xdrs
, (enum_t
*) &objp
->ttype
,
71 (char *) &objp
->more_data
, choices
, xdr_void
));
72 } /* xdr_ptrace_info */
74 /********************************************************************
78 * xdr routine for remote ptrace data into server
82 bool_t
xdr_rptrace(xdrs
,objp
)
86 if (! xdr_int(xdrs
, &objp
->pid
))
88 if (! xdr_int(xdrs
, &objp
->data
))
90 if (! xdr_int(xdrs
, &objp
->addr
))
92 if (! xdr_ptrace_info(xdrs
, &objp
->info
))
98 /********************************************************************
100 * xdr_ptrace_return -
102 * xdr routine for remote ptrace data returned by server
106 bool_t
xdr_ptrace_return(xdrs
, objp
)
110 if (! xdr_int(xdrs
, &objp
->status
))
112 if (! xdr_int(xdrs
, &objp
->errno
))
114 if (! xdr_ptrace_info(xdrs
, &objp
->info
))
118 } /* xdr_ptrace_return */
This page took 0.030845 seconds and 4 git commands to generate.