/* * Please do not edit this file. * It was generated using rpcgen. */ #include #include "rdb.h" #define DATABASE "personnel.dat" /* '%' passes it through */ /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = { 25, 0 }; record * firstname_key_1(argp, clnt) char **argp; CLIENT *clnt; { static record res; bzero((char *)&res, sizeof(res)); if (clnt_call(clnt, FIRSTNAME_KEY, xdr_wrapstring, argp, xdr_record, &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); } record * lastname_key_1(argp, clnt) char **argp; CLIENT *clnt; { static record res; bzero((char *)&res, sizeof(res)); if (clnt_call(clnt, LASTNAME_KEY, xdr_wrapstring, argp, xdr_record, &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); } record * phone_key_1(argp, clnt) int *argp; CLIENT *clnt; { static record res; bzero((char *)&res, sizeof(res)); if (clnt_call(clnt, PHONE_KEY, xdr_int, argp, xdr_record, &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); } record * location_key_1(argp, clnt) char **argp; CLIENT *clnt; { static record res; bzero((char *)&res, sizeof(res)); if (clnt_call(clnt, LOCATION_KEY, xdr_wrapstring, argp, xdr_record, &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); } int * add_record_1(argp, clnt) record *argp; CLIENT *clnt; { static int res; bzero((char *)&res, sizeof(res)); if (clnt_call(clnt, ADD_RECORD, xdr_record, argp, xdr_int, &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); }