xdryp.c (90297) | xdryp.c (90298) |
---|---|
1/* 2 * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#if defined(LIBC_SCCS) && !defined(lint) | 1/* 2 * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#if defined(LIBC_SCCS) && !defined(lint) |
31static char *rcsid = "$FreeBSD: head/lib/libc/yp/xdryp.c 90297 2002-02-06 13:30:31Z des $"; | 31static char *rcsid = "$FreeBSD: head/lib/libc/yp/xdryp.c 90298 2002-02-06 15:26:07Z des $"; |
32#endif 33 34#include <rpc/rpc.h> 35#include <rpcsvc/yp.h> 36#include <stdlib.h> 37#include <string.h> 38 39extern int (*ypresp_allfn)(); --- 6 unchanged lines hidden (view full) --- 46 * leave it in in case somebody goes looking for it. 47 */ 48typedef struct { 49 char *dptr; 50 int dsize; 51} datum; 52 53bool_t | 32#endif 33 34#include <rpc/rpc.h> 35#include <rpcsvc/yp.h> 36#include <stdlib.h> 37#include <string.h> 38 39extern int (*ypresp_allfn)(); --- 6 unchanged lines hidden (view full) --- 46 * leave it in in case somebody goes looking for it. 47 */ 48typedef struct { 49 char *dptr; 50 int dsize; 51} datum; 52 53bool_t |
54xdr_datum(xdrs, objp) 55XDR *xdrs; 56datum *objp; | 54xdr_datum(XDR *xdrs, datum *objp) |
57{ 58 if (!xdr_bytes(xdrs, (char **)&objp->dptr, (u_int *)&objp->dsize, YPMAXRECORD)) { 59 return (FALSE); 60 } 61 return (TRUE); 62} 63 64bool_t | 55{ 56 if (!xdr_bytes(xdrs, (char **)&objp->dptr, (u_int *)&objp->dsize, YPMAXRECORD)) { 57 return (FALSE); 58 } 59 return (TRUE); 60} 61 62bool_t |
65xdr_ypresp_all_seq(xdrs, objp) 66XDR *xdrs; 67u_long *objp; | 63xdr_ypresp_all_seq(XDR *xdrs, u_long *objp) |
68{ 69 struct ypresp_all out; 70 u_long status; 71 char *key, *val; 72 int r; 73 74 bzero(&out, sizeof out); 75 while (1) { --- 44 unchanged lines hidden --- | 64{ 65 struct ypresp_all out; 66 u_long status; 67 char *key, *val; 68 int r; 69 70 bzero(&out, sizeof out); 71 while (1) { --- 44 unchanged lines hidden --- |