From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Praktikum2/loesung_neu/phonebook_clnt.c | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Bachelor/Verteilte Systeme/Praktikum2/loesung_neu/phonebook_clnt.c (limited to 'Bachelor/Verteilte Systeme/Praktikum2/loesung_neu/phonebook_clnt.c') diff --git a/Bachelor/Verteilte Systeme/Praktikum2/loesung_neu/phonebook_clnt.c b/Bachelor/Verteilte Systeme/Praktikum2/loesung_neu/phonebook_clnt.c new file mode 100644 index 0000000..e80fc05 --- /dev/null +++ b/Bachelor/Verteilte Systeme/Praktikum2/loesung_neu/phonebook_clnt.c @@ -0,0 +1,40 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include /* for memset */ +#include "phonebook.h" + +/* Default timeout can be changed using clnt_control() */ +static struct timeval TIMEOUT = { 25, 0 }; + +int * +add_1(phonebookEntry *argp, CLIENT *clnt) +{ + static int clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, add, + (xdrproc_t) xdr_phonebookEntry, (caddr_t) argp, + (xdrproc_t) xdr_int, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} + +str_number * +search_1(str_name *argp, CLIENT *clnt) +{ + static str_number clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, search, + (xdrproc_t) xdr_str_name, (caddr_t) argp, + (xdrproc_t) xdr_str_number, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} -- cgit v1.2.3