#include <rpc/xdr.h> bool_t xdr_string(XDR *xdrs, char **sp, u_int maxsize);
The xdr_string() function is a filter primitive that translates between C-language strings and their corresponding external representations.
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_string() is used:
#include <stdio.h> #include <xdr.h> #define MAX_LENGTH 100 typedef struct adress { char street[MAX_LENGTH]; int number; int apartment; } address ; bool_t xdr_address(XDR *xdrs, address *p_address) { if!(xdr_string(xdrs,&(p_address->street), MAX_LENGTH)) return FALSE; if(!xdr_int(xdrs,&(p_address->number))) return FALSE; return xdr_int(xdrs,&(p_address->apartment)); }
Top | Remote Procedure Call (RPC) APIs | APIs by category |