#include <rpc/xdr.h> bool_t xdr_pointer(XDR *xdrs, char **objpp, u_int objsize, const xdrproc_t xdrobj);
The xdr_pointer() function provides pointer chasing within structures and serializes null pointers. This function can represent recursive data structures, such as binary trees or linked lists.
Pointer chasing is the substitution of the pointer itself with the actual structure it points to.
No authorization is required.
TRUE (1) | Successful |
FALSE (0) | Unsuccessful |
None.
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
See Code disclaimer information for information pertaining to code examples.
The following example shows how xdr_pointer() is used:
#include <xdr.h> typedef struct node { int value; struct node *p; } node ; bool_t xdr_list(XDR *xdrs, node **p_node) { return xdr_pointer(xdrs,(caddr *)p_node, sizeof(node),(xdrproc_t)xdr_node) } bool_t xdr_node(XDR *xdrs, node *p_node) { xdr_int(xdrs,&(p_node->value)); return xdr_list(xdrs,&(p_node->p)); }
Top | Remote Procedure Call (RPC) APIs | APIs by category |