From ace254884bc493625285eeeb339751bbaa163c83 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 29 Aug 2021 15:06:49 +0200 Subject: [PATCH] - libtirpc: remove patches --- package/libtirpc/libtirpc.mk | 2 - ...parts-of-TIRPC-requiring-NIS-support.patch | 50 - ...nerate-XDR-header-files-from-.x-sour.patch | 1001 ---------- ...es-needed-to-build-rpcbind-on-top-of.patch | 1653 ----------------- 4 files changed, 2706 deletions(-) delete mode 100644 package/libtirpc/patches/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch delete mode 100644 package/libtirpc/patches/0003-Automatically-generate-XDR-header-files-from-.x-sour.patch delete mode 100644 package/libtirpc/patches/0004-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch diff --git a/package/libtirpc/libtirpc.mk b/package/libtirpc/libtirpc.mk index 4484799b..7397215d 100644 --- a/package/libtirpc/libtirpc.mk +++ b/package/libtirpc/libtirpc.mk @@ -9,8 +9,6 @@ LIBTIRPC_DIR = libtirpc-$(LIBTIRPC_VERSION) LIBTIRPC_SOURCE = libtirpc-$(LIBTIRPC_VERSION).tar.bz2 LIBTIRPC_SITE = https://sourceforge.net/projects/libtirpc/files/libtirpc/$(LIBTIRPC_VERSION) -LIBTIRPC_AUTORECONF = YES - LIBTIRPC_CONF_OPTS = \ --disable-gssapi diff --git a/package/libtirpc/patches/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch b/package/libtirpc/patches/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch deleted file mode 100644 index 101a779a..00000000 --- a/package/libtirpc/patches/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch +++ /dev/null @@ -1,50 +0,0 @@ -From cb30579c9195ae29c82545c934e0bd9677262bce Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Krause?= -Date: Fri, 20 Dec 2019 17:58:17 +0100 -Subject: [PATCH] Disable parts of TIRPC requiring NIS support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Thomas Petazzoni -[yann.morin.1998@free.fr: update for 0.3.1] -Signed-off-by: "Yann E. MORIN" -[joerg.krause@embedded.rocks: update for 0.3.2] -Signed-off-by: Jörg Krause -[peda@axentia.se: update for 1.0.1] -Signed-off-by: Peter Rosin -[bernd.kuhls@t-online.de: update for 1.0.2] -Signed-off-by: Bernd Kuhls -[pvorel: update for 1.2.5] -Signed-off-by: Petr Vorel ---- - src/Makefile.am | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index b2d5436..864f984 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c \ - rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ - rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ - svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ -- auth_time.c debug.c -+ debug.c - - if AUTHDES - libtirpc_la_SOURCES += auth_des.c authdes_prot.c des_crypt.c des_impl.c des_soft.c svc_auth_des.c -@@ -45,8 +45,8 @@ if GSS - libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS) - endif - --libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c --libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c -+#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c -+#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c - - CLEANFILES = cscope.* *~ - DISTCLEANFILES = Makefile.in --- -2.24.0 - diff --git a/package/libtirpc/patches/0003-Automatically-generate-XDR-header-files-from-.x-sour.patch b/package/libtirpc/patches/0003-Automatically-generate-XDR-header-files-from-.x-sour.patch deleted file mode 100644 index 2712f53c..00000000 --- a/package/libtirpc/patches/0003-Automatically-generate-XDR-header-files-from-.x-sour.patch +++ /dev/null @@ -1,1001 +0,0 @@ -From 001e3f26dc80b8f21bed7d9b5872fe10e8b4af04 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 10 Nov 2012 17:29:53 +0100 -Subject: [PATCH] Automatically generate XDR header files from .x sources using - rpcgen - -[Gustavo: update after dropping non-IPv6 support] -Signed-off-by: Thomas Petazzoni -[yann.morin.1998@free.fr: update for 0.3.1] -Signed-off-by: "Yann E. MORIN" -[baruch: use external rpcgen] -Signed-off-by: Baruch Siach ---- - Makefile.am | 16 +- - src/Makefile.am | 2 +- - tirpc/rpc/rpcb_prot.h | 797 ------------------------------------------ - tirpc/rpcsvc/crypt.h | 109 ------ - 4 files changed, 14 insertions(+), 910 deletions(-) - delete mode 100644 tirpc/rpc/rpcb_prot.h - delete mode 100644 tirpc/rpcsvc/crypt.h - -diff --git a/Makefile.am b/Makefile.am -index 3f6063771faf..368fb8a1aed2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,6 +1,9 @@ - SUBDIRS = src man doc - ACLOCAL_AMFLAGS = -I m4 - -+GENFILES = tirpc/rpcsvc/crypt.h \ -+ tirpc/rpc/rpcb_prot.h -+ - noinst_HEADERS = tirpc/reentrant.h \ - tirpc/getpeereid.h \ - tirpc/libc_private.h \ -@@ -8,7 +11,6 @@ noinst_HEADERS = tirpc/reentrant.h \ - - nobase_include_HEADERS = tirpc/netconfig.h \ - tirpc/rpcsvc/crypt.x \ -- tirpc/rpcsvc/crypt.h \ - tirpc/rpc/xdr.h \ - tirpc/rpc/types.h \ - tirpc/rpc/svc_soc.h \ -@@ -21,7 +23,6 @@ nobase_include_HEADERS = tirpc/netconfig.h \ - tirpc/rpc/rpcent.h \ - tirpc/rpc/rpc_com.h \ - tirpc/rpc/rpcb_prot.x \ -- tirpc/rpc/rpcb_prot.h \ - tirpc/rpc/rpcb_clnt.h \ - tirpc/rpc/raw.h \ - tirpc/rpc/pmap_rmt.h \ -@@ -48,5 +49,14 @@ endif - pkgconfigdir=$(libdir)/pkgconfig - pkgconfig_DATA = libtirpc.pc - --CLEANFILES = cscope.* *~ -+nobase_nodist_include_HEADERS = $(GENFILES) -+BUILT_SOURCES = $(GENFILES) -+ -+$(GENFILES): %.h: %.x -+ mkdir -p $(dir $@) -+ rpcgen -h -o $@ $< -+ -+force: -+ -+CLEANFILES = cscope.* *~ $(GENFILES) - DISTCLEANFILES = Makefile.in libtirpc*.tar.gz -diff --git a/src/Makefile.am b/src/Makefile.am -index 2af40f16d03a..0b7e23835c36 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -8,7 +8,7 @@ - noinst_HEADERS = rpc_com.h debug.h - - AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ -- -D_GNU_SOURCE -Wall -pipe -+ -D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc - - lib_LTLIBRARIES = libtirpc.la - -diff --git a/tirpc/rpc/rpcb_prot.h b/tirpc/rpc/rpcb_prot.h -deleted file mode 100644 -index 7ae48b805370..000000000000 ---- a/tirpc/rpc/rpcb_prot.h -+++ /dev/null -@@ -1,797 +0,0 @@ --/* -- * Please do not edit this file. -- * It was generated using rpcgen. -- */ -- --#ifndef _RPCB_PROT_H_RPCGEN --#define _RPCB_PROT_H_RPCGEN -- --#include -- --#ifndef IXDR_GET_INT32 --#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) --#endif --#ifndef IXDR_PUT_INT32 --#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) --#endif --#ifndef IXDR_GET_U_INT32 --#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) --#endif --#ifndef IXDR_PUT_U_INT32 --#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) --#endif --/* -- * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $ -- * -- * Copyright (c) 2009, Sun Microsystems, Inc. -- * All rights reserved. -- * -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions are met: -- * - Redistributions of source code must retain the above copyright notice, -- * this list of conditions and the following disclaimer. -- * - Redistributions in binary form must reproduce the above copyright notice, -- * this list of conditions and the following disclaimer in the documentation -- * and/or other materials provided with the distribution. -- * - Neither the name of Sun Microsystems, Inc. nor the names of its -- * contributors may be used to endorse or promote products derived -- * from this software without specific prior written permission. -- * -- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- * POSSIBILITY OF SUCH DAMAGE. -- */ --/* -- * Copyright (c) 1988 by Sun Microsystems, Inc. -- */ --/* from rpcb_prot.x */ -- --/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */ -- --#ifndef _KERNEL -- -- --/* -- * The following procedures are supported by the protocol in version 3: -- * -- * RPCBPROC_NULL() returns () -- * takes nothing, returns nothing -- * -- * RPCBPROC_SET(rpcb) returns (bool_t) -- * TRUE is success, FALSE is failure. Registers the tuple -- * [prog, vers, address, owner, netid]. -- * Finds out owner and netid information on its own. -- * -- * RPCBPROC_UNSET(rpcb) returns (bool_t) -- * TRUE is success, FALSE is failure. Un-registers tuple -- * [prog, vers, netid]. addresses is ignored. -- * If netid is NULL, unregister all. -- * -- * RPCBPROC_GETADDR(rpcb) returns (string). -- * 0 is failure. Otherwise returns the universal address where the -- * triple [prog, vers, netid] is registered. Ignore address and owner. -- * -- * RPCBPROC_DUMP() RETURNS (rpcblist_ptr) -- * used to dump the entire rpcbind maps -- * -- * RPCBPROC_CALLIT(rpcb_rmtcallargs) -- * RETURNS (rpcb_rmtcallres); -- * Calls the procedure on the remote machine. If it is not registered, -- * this procedure is quiet; i.e. it does not return error information!!! -- * This routine only passes null authentication parameters. -- * It has no interface to xdr routines for RPCBPROC_CALLIT. -- * -- * RPCBPROC_GETTIME() returns (int). -- * Gets the remote machines time -- * -- * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf) -- * Returns the netbuf address from universal address. -- * -- * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string) -- * Returns the universal address from netbuf address. -- * -- * END OF RPCBIND VERSION 3 PROCEDURES -- */ --/* -- * Except for RPCBPROC_CALLIT, the procedures above are carried over to -- * rpcbind version 4. Those below are added or modified for version 4. -- * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER -- * AS RPCBPROC_CALLIT. -- * -- * RPCBPROC_BCAST(rpcb_rmtcallargs) -- * RETURNS (rpcb_rmtcallres); -- * Calls the procedure on the remote machine. If it is not registered, -- * this procedure IS quiet; i.e. it DOES NOT return error information!!! -- * This routine should be used for broadcasting and nothing else. -- * -- * RPCBPROC_GETVERSADDR(rpcb) returns (string). -- * 0 is failure. Otherwise returns the universal address where the -- * triple [prog, vers, netid] is registered. Ignore address and owner. -- * Same as RPCBPROC_GETADDR except that if the given version number -- * is not available, the address is not returned. -- * -- * RPCBPROC_INDIRECT(rpcb_rmtcallargs) -- * RETURNS (rpcb_rmtcallres); -- * Calls the procedure on the remote machine. If it is not registered, -- * this procedure is NOT quiet; i.e. it DOES return error information!!! -- * as any normal application would expect. -- * -- * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr). -- * Same as RPCBPROC_GETADDR except that it returns a list of all the -- * addresses registered for the combination (prog, vers) (for all -- * transports). -- * -- * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers) -- * Returns the statistics about the kind of requests received by rpcbind. -- */ -- --/* -- * A mapping of (program, version, network ID) to address -- */ -- --struct rpcb { -- rpcprog_t r_prog; -- rpcvers_t r_vers; -- char *r_netid; -- char *r_addr; -- char *r_owner; --}; --typedef struct rpcb rpcb; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb(XDR *, rpcb*); --#elif __STDC__ --extern bool_t xdr_rpcb(XDR *, rpcb*); --#else /* Old Style C */ --bool_t xdr_rpcb(); --#endif /* Old Style C */ -- -- --typedef rpcb RPCB; -- -- --/* -- * A list of mappings -- * -- * Below are two definitions for the rpcblist structure. This is done because -- * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a -- * struct rpcblist * that rpcgen would produce. One version of the rpcblist -- * structure (actually called rp__list) is used with rpcgen, and the other is -- * defined only in the header file for compatibility with the specified -- * interface. -- */ -- --struct rp__list { -- rpcb rpcb_map; -- struct rp__list *rpcb_next; --}; --typedef struct rp__list rp__list; --#ifdef __cplusplus --extern "C" bool_t xdr_rp__list(XDR *, rp__list*); --#elif __STDC__ --extern bool_t xdr_rp__list(XDR *, rp__list*); --#else /* Old Style C */ --bool_t xdr_rp__list(); --#endif /* Old Style C */ -- -- --typedef rp__list *rpcblist_ptr; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); --#elif __STDC__ --extern bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); --#else /* Old Style C */ --bool_t xdr_rpcblist_ptr(); --#endif /* Old Style C */ -- -- --typedef struct rp__list rpcblist; --typedef struct rp__list RPCBLIST; -- --#ifndef __cplusplus --struct rpcblist { -- RPCB rpcb_map; -- struct rpcblist *rpcb_next; --}; --#endif -- --#ifdef __cplusplus --extern "C" { --#endif --extern bool_t xdr_rpcblist(XDR *, rpcblist**); --#ifdef __cplusplus --} --#endif -- -- --/* -- * Arguments of remote calls -- */ -- --struct rpcb_rmtcallargs { -- rpcprog_t prog; -- rpcvers_t vers; -- rpcproc_t proc; -- struct { -- u_int args_len; -- char *args_val; -- } args; --}; --typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); --#elif __STDC__ --extern bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); --#else /* Old Style C */ --bool_t xdr_rpcb_rmtcallargs(); --#endif /* Old Style C */ -- -- --/* -- * Client-side only representation of rpcb_rmtcallargs structure. -- * -- * The routine that XDRs the rpcb_rmtcallargs structure must deal with the -- * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to -- * be passed the XDR routine that knows the args' structure. This routine -- * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since -- * the application being called already knows the args structure. So we use a -- * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which -- * includes the args' XDR routine. -- */ --struct r_rpcb_rmtcallargs { -- rpcprog_t prog; -- rpcvers_t vers; -- rpcproc_t proc; -- struct { -- u_int args_len; -- char *args_val; -- } args; -- xdrproc_t xdr_args; /* encodes args */ --}; -- -- --/* -- * Results of the remote call -- */ -- --struct rpcb_rmtcallres { -- char *addr; -- struct { -- u_int results_len; -- char *results_val; -- } results; --}; --typedef struct rpcb_rmtcallres rpcb_rmtcallres; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); --#elif __STDC__ --extern bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); --#else /* Old Style C */ --bool_t xdr_rpcb_rmtcallres(); --#endif /* Old Style C */ -- -- --/* -- * Client-side only representation of rpcb_rmtcallres structure. -- */ --struct r_rpcb_rmtcallres { -- char *addr; -- struct { -- u_int32_t results_len; -- char *results_val; -- } results; -- xdrproc_t xdr_res; /* decodes results */ --}; -- --/* -- * rpcb_entry contains a merged address of a service on a particular -- * transport, plus associated netconfig information. A list of rpcb_entrys -- * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used -- * in r_nc_* fields. -- */ -- --struct rpcb_entry { -- char *r_maddr; -- char *r_nc_netid; -- u_int r_nc_semantics; -- char *r_nc_protofmly; -- char *r_nc_proto; --}; --typedef struct rpcb_entry rpcb_entry; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); --#elif __STDC__ --extern bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); --#else /* Old Style C */ --bool_t xdr_rpcb_entry(); --#endif /* Old Style C */ -- -- --/* -- * A list of addresses supported by a service. -- */ -- --struct rpcb_entry_list { -- rpcb_entry rpcb_entry_map; -- struct rpcb_entry_list *rpcb_entry_next; --}; --typedef struct rpcb_entry_list rpcb_entry_list; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); --#elif __STDC__ --extern bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); --#else /* Old Style C */ --bool_t xdr_rpcb_entry_list(); --#endif /* Old Style C */ -- -- --typedef rpcb_entry_list *rpcb_entry_list_ptr; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); --#elif __STDC__ --extern bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); --#else /* Old Style C */ --bool_t xdr_rpcb_entry_list_ptr(); --#endif /* Old Style C */ -- -- --/* -- * rpcbind statistics -- */ -- --#define rpcb_highproc_2 RPCBPROC_CALLIT --#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR --#define rpcb_highproc_4 RPCBPROC_GETSTAT --#define RPCBSTAT_HIGHPROC 13 --#define RPCBVERS_STAT 3 --#define RPCBVERS_4_STAT 2 --#define RPCBVERS_3_STAT 1 --#define RPCBVERS_2_STAT 0 -- --/* Link list of all the stats about getport and getaddr */ -- --struct rpcbs_addrlist { -- rpcprog_t prog; -- rpcvers_t vers; -- int success; -- int failure; -- char *netid; -- struct rpcbs_addrlist *next; --}; --typedef struct rpcbs_addrlist rpcbs_addrlist; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); --#elif __STDC__ --extern bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); --#else /* Old Style C */ --bool_t xdr_rpcbs_addrlist(); --#endif /* Old Style C */ -- -- --/* Link list of all the stats about rmtcall */ -- --struct rpcbs_rmtcalllist { -- rpcprog_t prog; -- rpcvers_t vers; -- rpcproc_t proc; -- int success; -- int failure; -- int indirect; -- char *netid; -- struct rpcbs_rmtcalllist *next; --}; --typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); --#elif __STDC__ --extern bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); --#else /* Old Style C */ --bool_t xdr_rpcbs_rmtcalllist(); --#endif /* Old Style C */ -- -- --typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); --#elif __STDC__ --extern bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); --#else /* Old Style C */ --bool_t xdr_rpcbs_proc(); --#endif /* Old Style C */ -- -- --typedef rpcbs_addrlist *rpcbs_addrlist_ptr; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); --#elif __STDC__ --extern bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); --#else /* Old Style C */ --bool_t xdr_rpcbs_addrlist_ptr(); --#endif /* Old Style C */ -- -- --typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); --#elif __STDC__ --extern bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); --#else /* Old Style C */ --bool_t xdr_rpcbs_rmtcalllist_ptr(); --#endif /* Old Style C */ -- -- --struct rpcb_stat { -- rpcbs_proc info; -- int setinfo; -- int unsetinfo; -- rpcbs_addrlist_ptr addrinfo; -- rpcbs_rmtcalllist_ptr rmtinfo; --}; --typedef struct rpcb_stat rpcb_stat; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); --#elif __STDC__ --extern bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); --#else /* Old Style C */ --bool_t xdr_rpcb_stat(); --#endif /* Old Style C */ -- -- --/* -- * One rpcb_stat structure is returned for each version of rpcbind -- * being monitored. -- */ -- --typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; --#ifdef __cplusplus --extern "C" bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); --#elif __STDC__ --extern bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); --#else /* Old Style C */ --bool_t xdr_rpcb_stat_byvers(); --#endif /* Old Style C */ -- -- --/* -- * We don't define netbuf in RPCL, since it would contain structure member -- * names that would conflict with the definition of struct netbuf in -- * . Instead we merely declare the XDR routine xdr_netbuf() here, -- * and implement it ourselves in rpc/rpcb_prot.c. -- */ --#ifdef __cplusplus --extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *); -- --#else /* __STDC__ */ --extern bool_t xdr_netbuf(XDR *, struct netbuf *); -- --#endif -- --#define RPCBVERS_3 RPCBVERS --#define RPCBVERS_4 RPCBVERS4 -- --#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock" -- --#else /* ndef _KERNEL */ --#ifdef __cplusplus --extern "C" { --#endif -- --/* -- * A mapping of (program, version, network ID) to address -- */ --struct rpcb { -- rpcprog_t r_prog; /* program number */ -- rpcvers_t r_vers; /* version number */ -- char *r_netid; /* network id */ -- char *r_addr; /* universal address */ -- char *r_owner; /* owner of the mapping */ --}; --typedef struct rpcb RPCB; -- --/* -- * A list of mappings -- */ --struct rpcblist { -- RPCB rpcb_map; -- struct rpcblist *rpcb_next; --}; --typedef struct rpcblist RPCBLIST; --typedef struct rpcblist *rpcblist_ptr; -- --/* -- * Remote calls arguments -- */ --struct rpcb_rmtcallargs { -- rpcprog_t prog; /* program number */ -- rpcvers_t vers; /* version number */ -- rpcproc_t proc; /* procedure number */ -- u_int32_t arglen; /* arg len */ -- caddr_t args_ptr; /* argument */ -- xdrproc_t xdr_args; /* XDR routine for argument */ --}; --typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; -- --/* -- * Remote calls results -- */ --struct rpcb_rmtcallres { -- char *addr_ptr; /* remote universal address */ -- u_int32_t resultslen; /* results length */ -- caddr_t results_ptr; /* results */ -- xdrproc_t xdr_results; /* XDR routine for result */ --}; --typedef struct rpcb_rmtcallres rpcb_rmtcallres; -- --struct rpcb_entry { -- char *r_maddr; -- char *r_nc_netid; -- unsigned int r_nc_semantics; -- char *r_nc_protofmly; -- char *r_nc_proto; --}; --typedef struct rpcb_entry rpcb_entry; -- --/* -- * A list of addresses supported by a service. -- */ -- --struct rpcb_entry_list { -- rpcb_entry rpcb_entry_map; -- struct rpcb_entry_list *rpcb_entry_next; --}; --typedef struct rpcb_entry_list rpcb_entry_list; -- --typedef rpcb_entry_list *rpcb_entry_list_ptr; -- --/* -- * rpcbind statistics -- */ -- --#define rpcb_highproc_2 RPCBPROC_CALLIT --#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR --#define rpcb_highproc_4 RPCBPROC_GETSTAT --#define RPCBSTAT_HIGHPROC 13 --#define RPCBVERS_STAT 3 --#define RPCBVERS_4_STAT 2 --#define RPCBVERS_3_STAT 1 --#define RPCBVERS_2_STAT 0 -- --/* Link list of all the stats about getport and getaddr */ -- --struct rpcbs_addrlist { -- rpcprog_t prog; -- rpcvers_t vers; -- int success; -- int failure; -- char *netid; -- struct rpcbs_addrlist *next; --}; --typedef struct rpcbs_addrlist rpcbs_addrlist; -- --/* Link list of all the stats about rmtcall */ -- --struct rpcbs_rmtcalllist { -- rpcprog_t prog; -- rpcvers_t vers; -- rpcproc_t proc; -- int success; -- int failure; -- int indirect; -- char *netid; -- struct rpcbs_rmtcalllist *next; --}; --typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; -- --typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; -- --typedef rpcbs_addrlist *rpcbs_addrlist_ptr; -- --typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; -- --struct rpcb_stat { -- rpcbs_proc info; -- int setinfo; -- int unsetinfo; -- rpcbs_addrlist_ptr addrinfo; -- rpcbs_rmtcalllist_ptr rmtinfo; --}; --typedef struct rpcb_stat rpcb_stat; -- --/* -- * One rpcb_stat structure is returned for each version of rpcbind -- * being monitored. -- */ -- --typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; -- --#ifdef __cplusplus --} --#endif -- --#endif /* ndef _KERNEL */ -- --#define RPCBPROG ((u_int32_t)100000) --#define RPCBVERS ((u_int32_t)3) -- --#ifdef __cplusplus --#define RPCBPROC_SET ((u_int32_t)1) --extern "C" bool_t * rpcbproc_set_3(rpcb *, CLIENT *); --extern "C" bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_UNSET ((u_int32_t)2) --extern "C" bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); --extern "C" bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_GETADDR ((u_int32_t)3) --extern "C" char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); --extern "C" char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_DUMP ((u_int32_t)4) --extern "C" rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); --extern "C" rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); --#define RPCBPROC_CALLIT ((u_int32_t)5) --extern "C" rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); --extern "C" rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); --#define RPCBPROC_GETTIME ((u_int32_t)6) --extern "C" u_int * rpcbproc_gettime_3(void *, CLIENT *); --extern "C" u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); --#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) --extern "C" struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); --extern "C" struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); --#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) --extern "C" char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); --extern "C" char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); -- --#elif __STDC__ --#define RPCBPROC_SET ((u_int32_t)1) --extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *); --extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_UNSET ((u_int32_t)2) --extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); --extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_GETADDR ((u_int32_t)3) --extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); --extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); --#define RPCBPROC_DUMP ((u_int32_t)4) --extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); --extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); --#define RPCBPROC_CALLIT ((u_int32_t)5) --extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); --extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); --#define RPCBPROC_GETTIME ((u_int32_t)6) --extern u_int * rpcbproc_gettime_3(void *, CLIENT *); --extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); --#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) --extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); --extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); --#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) --extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); --extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); -- --#else /* Old Style C */ --#define RPCBPROC_SET ((u_int32_t)1) --extern bool_t * rpcbproc_set_3(); --extern bool_t * rpcbproc_set_3_svc(); --#define RPCBPROC_UNSET ((u_int32_t)2) --extern bool_t * rpcbproc_unset_3(); --extern bool_t * rpcbproc_unset_3_svc(); --#define RPCBPROC_GETADDR ((u_int32_t)3) --extern char ** rpcbproc_getaddr_3(); --extern char ** rpcbproc_getaddr_3_svc(); --#define RPCBPROC_DUMP ((u_int32_t)4) --extern rpcblist_ptr * rpcbproc_dump_3(); --extern rpcblist_ptr * rpcbproc_dump_3_svc(); --#define RPCBPROC_CALLIT ((u_int32_t)5) --extern rpcb_rmtcallres * rpcbproc_callit_3(); --extern rpcb_rmtcallres * rpcbproc_callit_3_svc(); --#define RPCBPROC_GETTIME ((u_int32_t)6) --extern u_int * rpcbproc_gettime_3(); --extern u_int * rpcbproc_gettime_3_svc(); --#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) --extern struct netbuf * rpcbproc_uaddr2taddr_3(); --extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(); --#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) --extern char ** rpcbproc_taddr2uaddr_3(); --extern char ** rpcbproc_taddr2uaddr_3_svc(); --#endif /* Old Style C */ --#define RPCBVERS4 ((u_int32_t)4) -- --#ifdef __cplusplus --extern "C" bool_t * rpcbproc_set_4(rpcb *, CLIENT *); --extern "C" bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); --extern "C" bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); --extern "C" bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); --extern "C" char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); --extern "C" char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); --extern "C" rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); --extern "C" rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); --#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) --extern "C" rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); --extern "C" rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); --extern "C" u_int * rpcbproc_gettime_4(void *, CLIENT *); --extern "C" u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); --extern "C" struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); --extern "C" struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); --extern "C" char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); --extern "C" char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); --#define RPCBPROC_GETVERSADDR ((u_int32_t)9) --extern "C" char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); --extern "C" char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); --#define RPCBPROC_INDIRECT ((u_int32_t)10) --extern "C" rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); --extern "C" rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); --#define RPCBPROC_GETADDRLIST ((u_int32_t)11) --extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); --extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); --#define RPCBPROC_GETSTAT ((u_int32_t)12) --extern "C" rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); --extern "C" rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); -- --#elif __STDC__ --extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *); --extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); --extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); --extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); --extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); --extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); --extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); --extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); --#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) --extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); --extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); --extern u_int * rpcbproc_gettime_4(void *, CLIENT *); --extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); --extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); --extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); --extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); --extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); --#define RPCBPROC_GETVERSADDR ((u_int32_t)9) --extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); --extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); --#define RPCBPROC_INDIRECT ((u_int32_t)10) --extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); --extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); --#define RPCBPROC_GETADDRLIST ((u_int32_t)11) --extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); --extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); --#define RPCBPROC_GETSTAT ((u_int32_t)12) --extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); --extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); -- --#else /* Old Style C */ --extern bool_t * rpcbproc_set_4(); --extern bool_t * rpcbproc_set_4_svc(); --extern bool_t * rpcbproc_unset_4(); --extern bool_t * rpcbproc_unset_4_svc(); --extern char ** rpcbproc_getaddr_4(); --extern char ** rpcbproc_getaddr_4_svc(); --extern rpcblist_ptr * rpcbproc_dump_4(); --extern rpcblist_ptr * rpcbproc_dump_4_svc(); --#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) --extern rpcb_rmtcallres * rpcbproc_bcast_4(); --extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(); --extern u_int * rpcbproc_gettime_4(); --extern u_int * rpcbproc_gettime_4_svc(); --extern struct netbuf * rpcbproc_uaddr2taddr_4(); --extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(); --extern char ** rpcbproc_taddr2uaddr_4(); --extern char ** rpcbproc_taddr2uaddr_4_svc(); --#define RPCBPROC_GETVERSADDR ((u_int32_t)9) --extern char ** rpcbproc_getversaddr_4(); --extern char ** rpcbproc_getversaddr_4_svc(); --#define RPCBPROC_INDIRECT ((u_int32_t)10) --extern rpcb_rmtcallres * rpcbproc_indirect_4(); --extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(); --#define RPCBPROC_GETADDRLIST ((u_int32_t)11) --extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(); --extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(); --#define RPCBPROC_GETSTAT ((u_int32_t)12) --extern rpcb_stat * rpcbproc_getstat_4(); --extern rpcb_stat * rpcbproc_getstat_4_svc(); --#endif /* Old Style C */ -- --#endif /* !_RPCB_PROT_H_RPCGEN */ -diff --git a/tirpc/rpcsvc/crypt.h b/tirpc/rpcsvc/crypt.h -deleted file mode 100644 -index da1f9ccb56ea..000000000000 ---- a/tirpc/rpcsvc/crypt.h -+++ /dev/null -@@ -1,109 +0,0 @@ --/* -- * Please do not edit this file. -- * It was generated using rpcgen. -- */ -- --#ifndef _CRYPT_H_RPCGEN --#define _CRYPT_H_RPCGEN -- --#include -- --#ifndef IXDR_GET_INT32 --#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) --#endif --#ifndef IXDR_PUT_INT32 --#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) --#endif --#ifndef IXDR_GET_U_INT32 --#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) --#endif --#ifndef IXDR_PUT_U_INT32 --#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) --#endif -- --enum des_dir { -- ENCRYPT_DES = 0, -- DECRYPT_DES = 1, --}; --typedef enum des_dir des_dir; --#ifdef __cplusplus --extern "C" bool_t xdr_des_dir(XDR *, des_dir*); --#elif __STDC__ --extern bool_t xdr_des_dir(XDR *, des_dir*); --#else /* Old Style C */ --bool_t xdr_des_dir(); --#endif /* Old Style C */ -- -- --enum des_mode { -- CBC_DES = 0, -- ECB_DES = 1, --}; --typedef enum des_mode des_mode; --#ifdef __cplusplus --extern "C" bool_t xdr_des_mode(XDR *, des_mode*); --#elif __STDC__ --extern bool_t xdr_des_mode(XDR *, des_mode*); --#else /* Old Style C */ --bool_t xdr_des_mode(); --#endif /* Old Style C */ -- -- --struct desargs { -- u_char des_key[8]; -- des_dir des_dir; -- des_mode des_mode; -- u_char des_ivec[8]; -- struct { -- u_int desbuf_len; -- char *desbuf_val; -- } desbuf; --}; --typedef struct desargs desargs; --#ifdef __cplusplus --extern "C" bool_t xdr_desargs(XDR *, desargs*); --#elif __STDC__ --extern bool_t xdr_desargs(XDR *, desargs*); --#else /* Old Style C */ --bool_t xdr_desargs(); --#endif /* Old Style C */ -- -- --struct desresp { -- struct { -- u_int desbuf_len; -- char *desbuf_val; -- } desbuf; -- u_char des_ivec[8]; -- int stat; --}; --typedef struct desresp desresp; --#ifdef __cplusplus --extern "C" bool_t xdr_desresp(XDR *, desresp*); --#elif __STDC__ --extern bool_t xdr_desresp(XDR *, desresp*); --#else /* Old Style C */ --bool_t xdr_desresp(); --#endif /* Old Style C */ -- -- --#define CRYPT_PROG ((u_int32_t)600100029) --#define CRYPT_VERS ((u_int32_t)1) -- --#ifdef __cplusplus --#define DES_CRYPT ((u_int32_t)1) --extern "C" desresp * des_crypt_1(desargs *, CLIENT *); --extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *); -- --#elif __STDC__ --#define DES_CRYPT ((u_int32_t)1) --extern desresp * des_crypt_1(desargs *, CLIENT *); --extern desresp * des_crypt_1_svc(desargs *, struct svc_req *); -- --#else /* Old Style C */ --#define DES_CRYPT ((u_int32_t)1) --extern desresp * des_crypt_1(); --extern desresp * des_crypt_1_svc(); --#endif /* Old Style C */ -- --#endif /* !_CRYPT_H_RPCGEN */ --- -2.17.0 - diff --git a/package/libtirpc/patches/0004-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch b/package/libtirpc/patches/0004-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch deleted file mode 100644 index 7f53ffca..00000000 --- a/package/libtirpc/patches/0004-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch +++ /dev/null @@ -1,1653 +0,0 @@ -From baeca7ea594fe9faa1d40d35e76066c6002ca638 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 10 Nov 2012 17:45:03 +0100 -Subject: [PATCH] Add more XDR files needed to build rpcbind on top of libtirpc - -Signed-off-by: Thomas Petazzoni -[yann.morin.1998@free.fr: update for 0.3.1] -Signed-off-by: "Yann E. MORIN" ---- - Makefile.am | 6 + - tirpc/rpcsvc/mount.x | 257 ++++++++++ - tirpc/rpcsvc/nfs_prot.x | 1266 +++++++++++++++++++++++++++++++++++++++++++++++ - tirpc/rpcsvc/rquota.x | 67 +++ - 4 files changed, 1596 insertions(+) - create mode 100644 tirpc/rpcsvc/mount.x - create mode 100644 tirpc/rpcsvc/nfs_prot.x - create mode 100644 tirpc/rpcsvc/rquota.x - -diff --git a/Makefile.am b/Makefile.am -index aa5908e..4999066 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2,6 +2,9 @@ SUBDIRS = src man doc rpcgen - ACLOCAL_AMFLAGS = -I m4 - - GENFILES = tirpc/rpcsvc/crypt.h \ -+ tirpc/rpcsvc/mount.h \ -+ tirpc/rpcsvc/nfs_prot.h \ -+ tirpc/rpcsvc/rquota.h \ - tirpc/rpc/rpcb_prot.h - - noinst_HEADERS = tirpc/reentrant.h \ -@@ -11,6 +14,9 @@ noinst_HEADERS = tirpc/reentrant.h \ - - nobase_include_HEADERS = tirpc/netconfig.h \ - tirpc/rpcsvc/crypt.x \ -+ tirpc/rpcsvc/mount.x \ -+ tirpc/rpcsvc/nfs_prot.x \ -+ tirpc/rpcsvc/rquota.x \ - tirpc/rpc/xdr.h \ - tirpc/rpc/types.h \ - tirpc/rpc/svc_soc.h \ -diff --git a/tirpc/rpcsvc/mount.x b/tirpc/rpcsvc/mount.x -new file mode 100644 -index 0000000..f68a06f ---- /dev/null -+++ b/tirpc/rpcsvc/mount.x -@@ -0,0 +1,257 @@ -+/* -+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -+ * unrestricted use provided that this legend is included on all tape -+ * media and as a part of the software program in whole or part. Users -+ * may copy or modify Sun RPC without charge, but are not authorized -+ * to license or distribute it to anyone else except as part of a product or -+ * program developed by the user. -+ * -+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -+ * -+ * Sun RPC is provided with no support and without any obligation on the -+ * part of Sun Microsystems, Inc. to assist in its use, correction, -+ * modification or enhancement. -+ * -+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -+ * OR ANY PART THEREOF. -+ * -+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue -+ * or profits or other special, indirect and consequential damages, even if -+ * Sun has been advised of the possibility of such damages. -+ * -+ * Sun Microsystems, Inc. -+ * 2550 Garcia Avenue -+ * Mountain View, California 94043 -+ */ -+ -+/* -+ * Protocol description for the mount program -+ */ -+ -+#ifndef RPC_HDR -+%#ifndef lint -+%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ -+%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/ -+%static const char rcsid[] = -+% "$FreeBSD: src/include/rpcsvc/mount.x,v 1.6 1999/08/27 23:45:08 peter Exp $"; -+%#endif /* not lint */ -+#endif -+ -+const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ -+const MNTNAMLEN = 255; /* maximum bytes in a name argument */ -+const FHSIZE = 32; /* size in bytes of a file handle */ -+#ifdef WANT_NFS3 -+const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ -+#endif -+ -+/* -+ * The fhandle is the file handle that the server passes to the client. -+ * All file operations are done using the file handles to refer to a file -+ * or a directory. The file handle can contain whatever information the -+ * server needs to distinguish an individual file. -+ */ -+typedef opaque fhandle[FHSIZE]; -+#ifdef WANT_NFS3 -+typedef opaque fhandle3; -+#endif -+ -+/* -+ * If a status of zero is returned, the call completed successfully, and -+ * a file handle for the directory follows. A non-zero status indicates -+ * some sort of error. The status corresponds with UNIX error numbers. -+ */ -+union fhstatus switch (unsigned fhs_status) { -+case 0: -+ fhandle fhs_fhandle; -+default: -+ void; -+}; -+ -+#ifdef WANT_NFS3 -+/* -+ * Status codes returned by the version 3 mount call. -+ */ -+enum mountstat3 { -+ MNT3_OK = 0, /* no error */ -+ MNT3ERR_PERM = 1, /* Not owner */ -+ MNT3ERR_NOENT = 2, /* No such file or directory */ -+ MNT3ERR_IO = 5, /* I/O error */ -+ MNT3ERR_ACCES = 13, /* Permission denied */ -+ MNT3ERR_NOTDIR = 20, /* Not a directory */ -+ MNT3ERR_INVAL = 22, /* Invalid argument */ -+ MNT3ERR_NAMETOOLONG = 63, /* Filename too long */ -+ MNT3ERR_NOTSUPP = 10004, /* Operation not supported */ -+ MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */ -+}; -+ -+struct mountres3_ok { -+ fhandle3 fhandle; -+ int auth_flavors<>; -+}; -+ -+union mountres3 switch (mountstat3 fhs_status) { -+case 0: -+ mountres3_ok mountinfo; -+default: -+ void; -+}; -+#endif -+ -+/* -+ * The type dirpath is the pathname of a directory -+ */ -+typedef string dirpath; -+ -+/* -+ * The type name is used for arbitrary names (hostnames, groupnames) -+ */ -+typedef string name; -+ -+/* -+ * A list of who has what mounted -+ */ -+typedef struct mountbody *mountlist; -+struct mountbody { -+ name ml_hostname; -+ dirpath ml_directory; -+ mountlist ml_next; -+}; -+ -+/* -+ * A list of netgroups -+ */ -+typedef struct groupnode *groups; -+struct groupnode { -+ name gr_name; -+ groups gr_next; -+}; -+ -+/* -+ * A list of what is exported and to whom -+ */ -+typedef struct exportnode *exports; -+struct exportnode { -+ dirpath ex_dir; -+ groups ex_groups; -+ exports ex_next; -+}; -+ -+program MOUNTPROG { -+ /* -+ * Version one of the mount protocol communicates with version two -+ * of the NFS protocol. Version three communicates with -+ * version three of the NFS protocol. The only connecting -+ * point is the fhandle structure, which is the same for both -+ * protocols. -+ */ -+ version MOUNTVERS { -+ /* -+ * Does no work. It is made available in all RPC services -+ * to allow server reponse testing and timing -+ */ -+ void -+ MOUNTPROC_NULL(void) = 0; -+ -+ /* -+ * If fhs_status is 0, then fhs_fhandle contains the -+ * file handle for the directory. This file handle may -+ * be used in the NFS protocol. This procedure also adds -+ * a new entry to the mount list for this client mounting -+ * the directory. -+ * Unix authentication required. -+ */ -+ fhstatus -+ MOUNTPROC_MNT(dirpath) = 1; -+ -+ /* -+ * Returns the list of remotely mounted filesystems. The -+ * mountlist contains one entry for each hostname and -+ * directory pair. -+ */ -+ mountlist -+ MOUNTPROC_DUMP(void) = 2; -+ -+ /* -+ * Removes the mount list entry for the directory -+ * Unix authentication required. -+ */ -+ void -+ MOUNTPROC_UMNT(dirpath) = 3; -+ -+ /* -+ * Removes all of the mount list entries for this client -+ * Unix authentication required. -+ */ -+ void -+ MOUNTPROC_UMNTALL(void) = 4; -+ -+ /* -+ * Returns a list of all the exported filesystems, and which -+ * machines are allowed to import it. -+ */ -+ exports -+ MOUNTPROC_EXPORT(void) = 5; -+ -+ /* -+ * Identical to MOUNTPROC_EXPORT above -+ */ -+ exports -+ MOUNTPROC_EXPORTALL(void) = 6; -+ } = 1; -+#ifdef WANT_NFS3 -+ version MOUNTVERS3 { -+ /* -+ * Does no work. It is made available in all RPC services -+ * to allow server reponse testing and timing -+ */ -+ void -+ MOUNTPROC_NULL(void) = 0; -+ -+ /* -+ * If mountres3.fhs_status is MNT3_OK, then -+ * mountres3.mountinfo contains the file handle for -+ * the directory and a list of acceptable -+ * authentication flavors. This file handle may only -+ * be used in the NFS version 3 protocol. This -+ * procedure also results in the server adding a new -+ * entry to its mount list recording that this client -+ * has mounted the directory. AUTH_UNIX authentication -+ * or better is required. -+ */ -+ mountres3 -+ MOUNTPROC_MNT(dirpath) = 1; -+ -+ /* -+ * Returns the list of remotely mounted filesystems. The -+ * mountlist contains one entry for each hostname and -+ * directory pair. -+ */ -+ mountlist -+ MOUNTPROC_DUMP(void) = 2; -+ -+ /* -+ * Removes the mount list entry for the directory -+ * Unix authentication required. -+ */ -+ void -+ MOUNTPROC_UMNT(dirpath) = 3; -+ -+ /* -+ * Removes all of the mount list entries for this client -+ * Unix authentication required. -+ */ -+ void -+ MOUNTPROC_UMNTALL(void) = 4; -+ -+ /* -+ * Returns a list of all the exported filesystems, and which -+ * machines are allowed to import it. -+ */ -+ exports -+ MOUNTPROC_EXPORT(void) = 5; -+ } = 3; -+#endif -+} = 100005; -diff --git a/tirpc/rpcsvc/nfs_prot.x b/tirpc/rpcsvc/nfs_prot.x -new file mode 100644 -index 0000000..01564f8 ---- /dev/null -+++ b/tirpc/rpcsvc/nfs_prot.x -@@ -0,0 +1,1266 @@ -+/* -+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -+ * unrestricted use provided that this legend is included on all tape -+ * media and as a part of the software program in whole or part. Users -+ * may copy or modify Sun RPC without charge, but are not authorized -+ * to license or distribute it to anyone else except as part of a product or -+ * program developed by the user. -+ * -+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -+ * -+ * Sun RPC is provided with no support and without any obligation on the -+ * part of Sun Microsystems, Inc. to assist in its use, correction, -+ * modification or enhancement. -+ * -+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -+ * OR ANY PART THEREOF. -+ * -+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue -+ * or profits or other special, indirect and consequential damages, even if -+ * Sun has been advised of the possibility of such damages. -+ * -+ * Sun Microsystems, Inc. -+ * 2550 Garcia Avenue -+ * Mountain View, California 94043 -+ */ -+ -+#ifndef RPC_HDR -+%#ifndef lint -+%/*static char sccsid[] = "from: @(#)nfs_prot.x 1.2 87/10/12 Copyr 1987 Sun Micro";*/ -+%/*static char sccsid[] = "from: @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ -+%static const char rcsid[] = -+% "$FreeBSD: src/include/rpcsvc/nfs_prot.x,v 1.7 1999/08/27 23:45:08 peter Exp $"; -+%#endif /* not lint */ -+#endif -+ -+const NFS_PORT = 2049; -+const NFS_MAXDATA = 8192; -+const NFS_MAXPATHLEN = 1024; -+const NFS_MAXNAMLEN = 255; -+const NFS_FHSIZE = 32; -+const NFS_COOKIESIZE = 4; -+const NFS_FIFO_DEV = -1; /* size kludge for named pipes */ -+ -+/* -+ * File types -+ */ -+const NFSMODE_FMT = 0170000; /* type of file */ -+const NFSMODE_DIR = 0040000; /* directory */ -+const NFSMODE_CHR = 0020000; /* character special */ -+const NFSMODE_BLK = 0060000; /* block special */ -+const NFSMODE_REG = 0100000; /* regular */ -+const NFSMODE_LNK = 0120000; /* symbolic link */ -+const NFSMODE_SOCK = 0140000; /* socket */ -+const NFSMODE_FIFO = 0010000; /* fifo */ -+ -+/* -+ * Error status -+ */ -+enum nfsstat { -+ NFS_OK= 0, /* no error */ -+ NFSERR_PERM=1, /* Not owner */ -+ NFSERR_NOENT=2, /* No such file or directory */ -+ NFSERR_IO=5, /* I/O error */ -+ NFSERR_NXIO=6, /* No such device or address */ -+ NFSERR_ACCES=13, /* Permission denied */ -+ NFSERR_EXIST=17, /* File exists */ -+ NFSERR_NODEV=19, /* No such device */ -+ NFSERR_NOTDIR=20, /* Not a directory*/ -+ NFSERR_ISDIR=21, /* Is a directory */ -+ NFSERR_FBIG=27, /* File too large */ -+ NFSERR_NOSPC=28, /* No space left on device */ -+ NFSERR_ROFS=30, /* Read-only file system */ -+ NFSERR_NAMETOOLONG=63, /* File name too long */ -+ NFSERR_NOTEMPTY=66, /* Directory not empty */ -+ NFSERR_DQUOT=69, /* Disc quota exceeded */ -+ NFSERR_STALE=70, /* Stale NFS file handle */ -+ NFSERR_WFLUSH=99 /* write cache flushed */ -+}; -+ -+/* -+ * File types -+ */ -+enum ftype { -+ NFNON = 0, /* non-file */ -+ NFREG = 1, /* regular file */ -+ NFDIR = 2, /* directory */ -+ NFBLK = 3, /* block special */ -+ NFCHR = 4, /* character special */ -+ NFLNK = 5, /* symbolic link */ -+ NFSOCK = 6, /* unix domain sockets */ -+ NFBAD = 7, /* unused */ -+ NFFIFO = 8 /* named pipe */ -+}; -+ -+/* -+ * File access handle -+ */ -+struct nfs_fh { -+ opaque data[NFS_FHSIZE]; -+}; -+ -+/* -+ * Timeval -+ */ -+struct nfstime { -+ unsigned seconds; -+ unsigned useconds; -+}; -+ -+ -+/* -+ * File attributes -+ */ -+struct fattr { -+ ftype type; /* file type */ -+ unsigned mode; /* protection mode bits */ -+ unsigned nlink; /* # hard links */ -+ unsigned uid; /* owner user id */ -+ unsigned gid; /* owner group id */ -+ unsigned size; /* file size in bytes */ -+ unsigned blocksize; /* prefered block size */ -+ unsigned rdev; /* special device # */ -+ unsigned blocks; /* Kb of disk used by file */ -+ unsigned fsid; /* device # */ -+ unsigned fileid; /* inode # */ -+ nfstime atime; /* time of last access */ -+ nfstime mtime; /* time of last modification */ -+ nfstime ctime; /* time of last change */ -+}; -+ -+/* -+ * File attributes which can be set -+ */ -+struct sattr { -+ unsigned mode; /* protection mode bits */ -+ unsigned uid; /* owner user id */ -+ unsigned gid; /* owner group id */ -+ unsigned size; /* file size in bytes */ -+ nfstime atime; /* time of last access */ -+ nfstime mtime; /* time of last modification */ -+}; -+ -+ -+typedef string filename; -+typedef string nfspath; -+ -+/* -+ * Reply status with file attributes -+ */ -+union attrstat switch (nfsstat status) { -+case NFS_OK: -+ fattr attributes; -+default: -+ void; -+}; -+ -+struct sattrargs { -+ nfs_fh file; -+ sattr attributes; -+}; -+ -+/* -+ * Arguments for directory operations -+ */ -+struct diropargs { -+ nfs_fh dir; /* directory file handle */ -+ filename name; /* name (up to NFS_MAXNAMLEN bytes) */ -+}; -+ -+struct diropokres { -+ nfs_fh file; -+ fattr attributes; -+}; -+ -+/* -+ * Results from directory operation -+ */ -+union diropres switch (nfsstat status) { -+case NFS_OK: -+ diropokres diropres; -+default: -+ void; -+}; -+ -+union readlinkres switch (nfsstat status) { -+case NFS_OK: -+ nfspath data; -+default: -+ void; -+}; -+ -+/* -+ * Arguments to remote read -+ */ -+struct readargs { -+ nfs_fh file; /* handle for file */ -+ unsigned offset; /* byte offset in file */ -+ unsigned count; /* immediate read count */ -+ unsigned totalcount; /* total read count (from this offset)*/ -+}; -+ -+/* -+ * Status OK portion of remote read reply -+ */ -+struct readokres { -+ fattr attributes; /* attributes, need for pagin*/ -+ opaque data; -+}; -+ -+union readres switch (nfsstat status) { -+case NFS_OK: -+ readokres reply; -+default: -+ void; -+}; -+ -+/* -+ * Arguments to remote write -+ */ -+struct writeargs { -+ nfs_fh file; /* handle for file */ -+ unsigned beginoffset; /* beginning byte offset in file */ -+ unsigned offset; /* current byte offset in file */ -+ unsigned totalcount; /* total write count (to this offset)*/ -+ opaque data; -+}; -+ -+struct createargs { -+ diropargs where; -+ sattr attributes; -+}; -+ -+struct renameargs { -+ diropargs from; -+ diropargs to; -+}; -+ -+struct linkargs { -+ nfs_fh from; -+ diropargs to; -+}; -+ -+struct symlinkargs { -+ diropargs from; -+ nfspath to; -+ sattr attributes; -+}; -+ -+ -+typedef opaque nfscookie[NFS_COOKIESIZE]; -+ -+/* -+ * Arguments to readdir -+ */ -+struct readdirargs { -+ nfs_fh dir; /* directory handle */ -+ nfscookie cookie; -+ unsigned count; /* number of directory bytes to read */ -+}; -+ -+struct entry { -+ unsigned fileid; -+ filename name; -+ nfscookie cookie; -+ entry *nextentry; -+}; -+ -+struct dirlist { -+ entry *entries; -+ bool eof; -+}; -+ -+union readdirres switch (nfsstat status) { -+case NFS_OK: -+ dirlist reply; -+default: -+ void; -+}; -+ -+struct statfsokres { -+ unsigned tsize; /* preferred transfer size in bytes */ -+ unsigned bsize; /* fundamental file system block size */ -+ unsigned blocks; /* total blocks in file system */ -+ unsigned bfree; /* free blocks in fs */ -+ unsigned bavail; /* free blocks avail to non-superuser */ -+}; -+ -+union statfsres switch (nfsstat status) { -+case NFS_OK: -+ statfsokres reply; -+default: -+ void; -+}; -+ -+#ifdef WANT_NFS3 -+ -+/* -+ * NFSv3 constants and types -+ */ -+const NFS3_FHSIZE = 64; /* maximum size in bytes of a file handle */ -+const NFS3_COOKIEVERFSIZE = 8; /* size of a cookie verifier for READDIR */ -+const NFS3_CREATEVERFSIZE = 8; /* size of the verifier used for CREATE */ -+const NFS3_WRITEVERFSIZE = 8; /* size of the verifier used for WRITE */ -+ -+typedef unsigned hyper uint64; -+typedef hyper int64; -+typedef unsigned long uint32; -+typedef long int32; -+typedef string filename3<>; -+typedef string nfspath3<>; -+typedef uint64 fileid3; -+typedef uint64 cookie3; -+typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; -+typedef opaque createverf3[NFS3_CREATEVERFSIZE]; -+typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; -+typedef uint32 uid3; -+typedef uint32 gid3; -+typedef uint64 size3; -+typedef uint64 offset3; -+typedef uint32 mode3; -+typedef uint32 count3; -+ -+/* -+ * Error status (v3) -+ */ -+enum nfsstat3 { -+ NFS3_OK = 0, -+ NFS3ERR_PERM = 1, -+ NFS3ERR_NOENT = 2, -+ NFS3ERR_IO = 5, -+ NFS3ERR_NXIO = 6, -+ NFS3ERR_ACCES = 13, -+ NFS3ERR_EXIST = 17, -+ NFS3ERR_XDEV = 18, -+ NFS3ERR_NODEV = 19, -+ NFS3ERR_NOTDIR = 20, -+ NFS3ERR_ISDIR = 21, -+ NFS3ERR_INVAL = 22, -+ NFS3ERR_FBIG = 27, -+ NFS3ERR_NOSPC = 28, -+ NFS3ERR_ROFS = 30, -+ NFS3ERR_MLINK = 31, -+ NFS3ERR_NAMETOOLONG = 63, -+ NFS3ERR_NOTEMPTY = 66, -+ NFS3ERR_DQUOT = 69, -+ NFS3ERR_STALE = 70, -+ NFS3ERR_REMOTE = 71, -+ NFS3ERR_BADHANDLE = 10001, -+ NFS3ERR_NOT_SYNC = 10002, -+ NFS3ERR_BAD_COOKIE = 10003, -+ NFS3ERR_NOTSUPP = 10004, -+ NFS3ERR_TOOSMALL = 10005, -+ NFS3ERR_SERVERFAULT = 10006, -+ NFS3ERR_BADTYPE = 10007, -+ NFS3ERR_JUKEBOX = 10008 -+}; -+ -+/* -+ * File types (v3) -+ */ -+enum ftype3 { -+ NF3REG = 1, /* regular file */ -+ NF3DIR = 2, /* directory */ -+ NF3BLK = 3, /* block special */ -+ NF3CHR = 4, /* character special */ -+ NF3LNK = 5, /* symbolic link */ -+ NF3SOCK = 6, /* unix domain sockets */ -+ NF3FIFO = 7 /* named pipe */ -+}; -+ -+struct specdata3 { -+ uint32 specdata1; -+ uint32 specdata2; -+}; -+ -+/* -+ * File access handle (v3) -+ */ -+struct nfs_fh3 { -+ opaque data; -+}; -+ -+/* -+ * Timeval (v3) -+ */ -+struct nfstime3 { -+ uint32 seconds; -+ uint32 nseconds; -+}; -+ -+ -+/* -+ * File attributes (v3) -+ */ -+struct fattr3 { -+ ftype3 type; /* file type */ -+ mode3 mode; /* protection mode bits */ -+ uint32 nlink; /* # hard links */ -+ uid3 uid; /* owner user id */ -+ gid3 gid; /* owner group id */ -+ size3 size; /* file size in bytes */ -+ size3 used; /* prefered block size */ -+ specdata3 rdev; /* special device # */ -+ uint64 fsid; /* device # */ -+ fileid3 fileid; /* inode # */ -+ nfstime3 atime; /* time of last access */ -+ nfstime3 mtime; /* time of last modification */ -+ nfstime3 ctime; /* time of last change */ -+}; -+ -+union post_op_attr switch (bool attributes_follow) { -+case TRUE: -+ fattr3 attributes; -+case FALSE: -+ void; -+}; -+ -+struct wcc_attr { -+ size3 size; -+ nfstime3 mtime; -+ nfstime3 ctime; -+}; -+ -+union pre_op_attr switch (bool attributes_follow) { -+case TRUE: -+ wcc_attr attributes; -+case FALSE: -+ void; -+}; -+ -+struct wcc_data { -+ pre_op_attr before; -+ post_op_attr after; -+}; -+ -+union post_op_fh3 switch (bool handle_follows) { -+case TRUE: -+ nfs_fh3 handle; -+case FALSE: -+ void; -+}; -+ -+/* -+ * File attributes which can be set (v3) -+ */ -+enum time_how { -+ DONT_CHANGE = 0, -+ SET_TO_SERVER_TIME = 1, -+ SET_TO_CLIENT_TIME = 2 -+}; -+ -+union set_mode3 switch (bool set_it) { -+case TRUE: -+ mode3 mode; -+default: -+ void; -+}; -+ -+union set_uid3 switch (bool set_it) { -+case TRUE: -+ uid3 uid; -+default: -+ void; -+}; -+ -+union set_gid3 switch (bool set_it) { -+case TRUE: -+ gid3 gid; -+default: -+ void; -+}; -+ -+union set_size3 switch (bool set_it) { -+case TRUE: -+ size3 size; -+default: -+ void; -+}; -+ -+union set_atime switch (time_how set_it) { -+case SET_TO_CLIENT_TIME: -+ nfstime3 atime; -+default: -+ void; -+}; -+ -+union set_mtime switch (time_how set_it) { -+case SET_TO_CLIENT_TIME: -+ nfstime3 mtime; -+default: -+ void; -+}; -+ -+struct sattr3 { -+ set_mode3 mode; -+ set_uid3 uid; -+ set_gid3 gid; -+ set_size3 size; -+ set_atime atime; -+ set_mtime mtime; -+}; -+ -+/* -+ * Arguments for directory operations (v3) -+ */ -+struct diropargs3 { -+ nfs_fh3 dir; /* directory file handle */ -+ filename3 name; /* name (up to NFS_MAXNAMLEN bytes) */ -+}; -+ -+/* -+ * Arguments to getattr (v3). -+ */ -+struct GETATTR3args { -+ nfs_fh3 object; -+}; -+ -+struct GETATTR3resok { -+ fattr3 obj_attributes; -+}; -+ -+union GETATTR3res switch (nfsstat3 status) { -+case NFS3_OK: -+ GETATTR3resok resok; -+default: -+ void; -+}; -+ -+/* -+ * Arguments to setattr (v3). -+ */ -+union sattrguard3 switch (bool check) { -+case TRUE: -+ nfstime3 obj_ctime; -+case FALSE: -+ void; -+}; -+ -+struct SETATTR3args { -+ nfs_fh3 object; -+ sattr3 new_attributes; -+ sattrguard3 guard; -+}; -+ -+struct SETATTR3resok { -+ wcc_data obj_wcc; -+}; -+ -+struct SETATTR3resfail { -+ wcc_data obj_wcc; -+}; -+ -+union SETATTR3res switch (nfsstat3 status) { -+case NFS3_OK: -+ SETATTR3resok resok; -+default: -+ SETATTR3resfail resfail; -+}; -+ -+/* -+ * Arguments to lookup (v3). -+ */ -+struct LOOKUP3args { -+ diropargs3 what; -+}; -+ -+struct LOOKUP3resok { -+ nfs_fh3 object; -+ post_op_attr obj_attributes; -+ post_op_attr dir_attributes; -+}; -+ -+struct LOOKUP3resfail { -+ post_op_attr dir_attributes; -+}; -+ -+union LOOKUP3res switch (nfsstat3 status) { -+case NFS3_OK: -+ LOOKUP3resok resok; -+default: -+ LOOKUP3resfail resfail; -+}; -+ -+/* -+ * Arguments to access (v3). -+ */ -+const ACCESS3_READ = 0x0001; -+const ACCESS3_LOOKUP = 0x0002; -+const ACCESS3_MODIFY = 0x0004; -+const ACCESS3_EXTEND = 0x0008; -+const ACCESS3_DELETE = 0x0010; -+const ACCESS3_EXECUTE = 0x0020; -+ -+struct ACCESS3args { -+ nfs_fh3 object; -+ uint32 access; -+}; -+ -+struct ACCESS3resok { -+ post_op_attr obj_attributes; -+ uint32 access; -+}; -+ -+struct ACCESS3resfail { -+ post_op_attr obj_attributes; -+}; -+ -+union ACCESS3res switch (nfsstat3 status) { -+case NFS3_OK: -+ ACCESS3resok resok; -+default: -+ ACCESS3resfail resfail; -+}; -+ -+/* -+ * Arguments to readlink (v3). -+ */ -+struct READLINK3args { -+ nfs_fh3 symlink; -+}; -+ -+struct READLINK3resok { -+ post_op_attr symlink_attributes; -+ nfspath3 data; -+}; -+ -+struct READLINK3resfail { -+ post_op_attr symlink_attributes; -+}; -+ -+union READLINK3res switch (nfsstat3 status) { -+case NFS3_OK: -+ READLINK3resok resok; -+default: -+ READLINK3resfail resfail; -+}; -+ -+/* -+ * Arguments to read (v3). -+ */ -+struct READ3args { -+ nfs_fh3 file; -+ offset3 offset; -+ count3 count; -+}; -+ -+struct READ3resok { -+ post_op_attr file_attributes; -+ count3 count; -+ bool eof; -+ opaque data<>; -+}; -+ -+struct READ3resfail { -+ post_op_attr file_attributes; -+}; -+ -+/* XXX: solaris 2.6 uses ``nfsstat'' here */ -+union READ3res switch (nfsstat3 status) { -+case NFS3_OK: -+ READ3resok resok; -+default: -+ READ3resfail resfail; -+}; -+ -+/* -+ * Arguments to write (v3). -+ */ -+enum stable_how { -+ UNSTABLE = 0, -+ DATA_SYNC = 1, -+ FILE_SYNC = 2 -+}; -+ -+struct WRITE3args { -+ nfs_fh3 file; -+ offset3 offset; -+ count3 count; -+ stable_how stable; -+ opaque data<>; -+}; -+ -+struct WRITE3resok { -+ wcc_data file_wcc; -+ count3 count; -+ stable_how committed; -+ writeverf3 verf; -+}; -+ -+struct WRITE3resfail { -+ wcc_data file_wcc; -+}; -+ -+union WRITE3res switch (nfsstat3 status) { -+case NFS3_OK: -+ WRITE3resok resok; -+default: -+ WRITE3resfail resfail; -+}; -+ -+/* -+ * Arguments to create (v3). -+ */ -+enum createmode3 { -+ UNCHECKED = 0, -+ GUARDED = 1, -+ EXCLUSIVE = 2 -+}; -+ -+union createhow3 switch (createmode3 mode) { -+case UNCHECKED: -+case GUARDED: -+ sattr3 obj_attributes; -+case EXCLUSIVE: -+ createverf3 verf; -+}; -+ -+struct CREATE3args { -+ diropargs3 where; -+ createhow3 how; -+}; -+ -+struct CREATE3resok { -+ post_op_fh3 obj; -+ post_op_attr obj_attributes; -+ wcc_data dir_wcc; -+}; -+ -+struct CREATE3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union CREATE3res switch (nfsstat3 status) { -+case NFS3_OK: -+ CREATE3resok resok; -+default: -+ CREATE3resfail resfail; -+}; -+ -+/* -+ * Arguments to mkdir (v3). -+ */ -+struct MKDIR3args { -+ diropargs3 where; -+ sattr3 attributes; -+}; -+ -+struct MKDIR3resok { -+ post_op_fh3 obj; -+ post_op_attr obj_attributes; -+ wcc_data dir_wcc; -+}; -+ -+struct MKDIR3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union MKDIR3res switch (nfsstat3 status) { -+case NFS3_OK: -+ MKDIR3resok resok; -+default: -+ MKDIR3resfail resfail; -+}; -+ -+/* -+ * Arguments to symlink (v3). -+ */ -+struct symlinkdata3 { -+ sattr3 symlink_attributes; -+ nfspath3 symlink_data; -+}; -+ -+struct SYMLINK3args { -+ diropargs3 where; -+ symlinkdata3 symlink; -+}; -+ -+struct SYMLINK3resok { -+ post_op_fh3 obj; -+ post_op_attr obj_attributes; -+ wcc_data dir_wcc; -+}; -+ -+struct SYMLINK3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union SYMLINK3res switch (nfsstat3 status) { -+case NFS3_OK: -+ SYMLINK3resok resok; -+default: -+ SYMLINK3resfail resfail; -+}; -+ -+/* -+ * Arguments to mknod (v3). -+ */ -+struct devicedata3 { -+ sattr3 dev_attributes; -+ specdata3 spec; -+}; -+ -+union mknoddata3 switch (ftype3 type) { -+case NF3CHR: -+case NF3BLK: -+ devicedata3 device; -+case NF3SOCK: -+case NF3FIFO: -+ sattr3 pipe_attributes; -+default: -+ void; -+}; -+ -+struct MKNOD3args { -+ diropargs3 where; -+ mknoddata3 what; -+}; -+ -+struct MKNOD3resok { -+ post_op_fh3 obj; -+ post_op_attr obj_attributes; -+ wcc_data dir_wcc; -+}; -+ -+struct MKNOD3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union MKNOD3res switch (nfsstat3 status) { -+case NFS3_OK: -+ MKNOD3resok resok; -+default: -+ MKNOD3resfail resfail; -+}; -+ -+/* -+ * Arguments to remove (v3). -+ */ -+struct REMOVE3args { -+ diropargs3 object; -+}; -+ -+struct REMOVE3resok { -+ wcc_data dir_wcc; -+}; -+ -+struct REMOVE3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union REMOVE3res switch (nfsstat3 status) { -+case NFS3_OK: -+ REMOVE3resok resok; -+default: -+ REMOVE3resfail resfail; -+}; -+ -+/* -+ * Arguments to rmdir (v3). -+ */ -+struct RMDIR3args { -+ diropargs3 object; -+}; -+ -+struct RMDIR3resok { -+ wcc_data dir_wcc; -+}; -+ -+struct RMDIR3resfail { -+ wcc_data dir_wcc; -+}; -+ -+union RMDIR3res switch (nfsstat3 status) { -+case NFS3_OK: -+ RMDIR3resok resok; -+default: -+ RMDIR3resfail resfail; -+}; -+ -+/* -+ * Arguments to rename (v3). -+ */ -+struct RENAME3args { -+ diropargs3 from; -+ diropargs3 to; -+}; -+ -+struct RENAME3resok { -+ wcc_data fromdir_wcc; -+ wcc_data todir_wcc; -+}; -+ -+struct RENAME3resfail { -+ wcc_data fromdir_wcc; -+ wcc_data todir_wcc; -+}; -+ -+union RENAME3res switch (nfsstat3 status) { -+case NFS3_OK: -+ RENAME3resok resok; -+default: -+ RENAME3resfail resfail; -+}; -+ -+/* -+ * Arguments to link (v3). -+ */ -+struct LINK3args { -+ nfs_fh3 file; -+ diropargs3 link; -+}; -+ -+struct LINK3resok { -+ post_op_attr file_attributes; -+ wcc_data linkdir_wcc; -+}; -+ -+struct LINK3resfail { -+ post_op_attr file_attributes; -+ wcc_data linkdir_wcc; -+}; -+ -+union LINK3res switch (nfsstat3 status) { -+case NFS3_OK: -+ LINK3resok resok; -+default: -+ LINK3resfail resfail; -+}; -+ -+/* -+ * Arguments to readdir (v3). -+ */ -+struct READDIR3args { -+ nfs_fh3 dir; -+ cookie3 cookie; -+ cookieverf3 cookieverf; -+ count3 count; -+}; -+ -+struct entry3 { -+ fileid3 fileid; -+ filename3 name; -+ cookie3 cookie; -+ entry3 *nextentry; -+}; -+ -+struct dirlist3 { -+ entry3 *entries; -+ bool eof; -+}; -+ -+struct READDIR3resok { -+ post_op_attr dir_attributes; -+ cookieverf3 cookieverf; -+ dirlist3 reply; -+}; -+ -+struct READDIR3resfail { -+ post_op_attr dir_attributes; -+}; -+ -+union READDIR3res switch (nfsstat3 status) { -+case NFS3_OK: -+ READDIR3resok resok; -+default: -+ READDIR3resfail resfail; -+}; -+ -+/* -+ * Arguments to readdirplus (v3). -+ */ -+struct READDIRPLUS3args { -+ nfs_fh3 dir; -+ cookie3 cookie; -+ cookieverf3 cookieverf; -+ count3 dircount; -+ count3 maxcount; -+}; -+ -+struct entryplus3 { -+ fileid3 fileid; -+ filename3 name; -+ cookie3 cookie; -+ post_op_attr name_attributes; -+ post_op_fh3 name_handle; -+ entryplus3 *nextentry; -+}; -+ -+struct dirlistplus3 { -+ entryplus3 *entries; -+ bool eof; -+}; -+ -+struct READDIRPLUS3resok { -+ post_op_attr dir_attributes; -+ cookieverf3 cookieverf; -+ dirlistplus3 reply; -+}; -+ -+struct READDIRPLUS3resfail { -+ post_op_attr dir_attributes; -+}; -+ -+union READDIRPLUS3res switch (nfsstat3 status) { -+case NFS3_OK: -+ READDIRPLUS3resok resok; -+default: -+ READDIRPLUS3resfail resfail; -+}; -+ -+/* -+ * Arguments to fsstat (v3). -+ */ -+struct FSSTAT3args { -+ nfs_fh3 fsroot; -+}; -+ -+struct FSSTAT3resok { -+ post_op_attr obj_attributes; -+ size3 tbytes; -+ size3 fbytes; -+ size3 abytes; -+ size3 tfiles; -+ size3 ffiles; -+ size3 afiles; -+ uint32 invarsec; -+}; -+ -+struct FSSTAT3resfail { -+ post_op_attr obj_attributes; -+}; -+ -+union FSSTAT3res switch (nfsstat3 status) { -+case NFS3_OK: -+ FSSTAT3resok resok; -+default: -+ FSSTAT3resfail resfail; -+}; -+ -+/* -+ * Arguments to fsinfo (v3). -+ */ -+const FSF3_LINK = 0x0001; -+const FSF3_SYMLINK = 0x0002; -+const FSF3_HOMOGENEOUS = 0x0008; -+const FSF3_CANSETTIME = 0x0010; -+ -+struct FSINFO3args { -+ nfs_fh3 fsroot; -+}; -+ -+struct FSINFO3resok { -+ post_op_attr obj_attributes; -+ uint32 rtmax; -+ uint32 rtpref; -+ uint32 rtmult; -+ uint32 wtmax; -+ uint32 wtpref; -+ uint32 wtmult; -+ uint32 dtpref; -+ size3 maxfilesize; -+ nfstime3 time_delta; -+ uint32 properties; -+}; -+ -+struct FSINFO3resfail { -+ post_op_attr obj_attributes; -+}; -+ -+union FSINFO3res switch (nfsstat3 status) { -+case NFS3_OK: -+ FSINFO3resok resok; -+default: -+ FSINFO3resfail resfail; -+}; -+ -+/* -+ * Arguments to pathconf (v3). -+ */ -+struct PATHCONF3args { -+ nfs_fh3 object; -+}; -+ -+struct PATHCONF3resok { -+ post_op_attr obj_attributes; -+ uint32 linkmax; -+ uint32 name_max; -+ bool no_trunc; -+ bool chown_restricted; -+ bool case_insensitive; -+ bool case_preserving; -+}; -+ -+struct PATHCONF3resfail { -+ post_op_attr obj_attributes; -+}; -+ -+union PATHCONF3res switch (nfsstat3 status) { -+case NFS3_OK: -+ PATHCONF3resok resok; -+default: -+ PATHCONF3resfail resfail; -+}; -+ -+/* -+ * Arguments to commit (v3). -+ */ -+struct COMMIT3args { -+ nfs_fh3 file; -+ offset3 offset; -+ count3 count; -+}; -+ -+struct COMMIT3resok { -+ wcc_data file_wcc; -+ writeverf3 verf; -+}; -+ -+struct COMMIT3resfail { -+ wcc_data file_wcc; -+}; -+ -+union COMMIT3res switch (nfsstat3 status) { -+case NFS3_OK: -+ COMMIT3resok resok; -+default: -+ COMMIT3resfail resfail; -+}; -+ -+#endif /* WANT_NFS3 */ -+ -+/* -+ * Remote file service routines -+ */ -+program NFS_PROGRAM { -+ version NFS_VERSION { -+ void -+ NFSPROC_NULL(void) = 0; -+ -+ attrstat -+ NFSPROC_GETATTR(nfs_fh) = 1; -+ -+ attrstat -+ NFSPROC_SETATTR(sattrargs) = 2; -+ -+ void -+ NFSPROC_ROOT(void) = 3; -+ -+ diropres -+ NFSPROC_LOOKUP(diropargs) = 4; -+ -+ readlinkres -+ NFSPROC_READLINK(nfs_fh) = 5; -+ -+ readres -+ NFSPROC_READ(readargs) = 6; -+ -+ void -+ NFSPROC_WRITECACHE(void) = 7; -+ -+ attrstat -+ NFSPROC_WRITE(writeargs) = 8; -+ -+ diropres -+ NFSPROC_CREATE(createargs) = 9; -+ -+ nfsstat -+ NFSPROC_REMOVE(diropargs) = 10; -+ -+ nfsstat -+ NFSPROC_RENAME(renameargs) = 11; -+ -+ nfsstat -+ NFSPROC_LINK(linkargs) = 12; -+ -+ nfsstat -+ NFSPROC_SYMLINK(symlinkargs) = 13; -+ -+ diropres -+ NFSPROC_MKDIR(createargs) = 14; -+ -+ nfsstat -+ NFSPROC_RMDIR(diropargs) = 15; -+ -+ readdirres -+ NFSPROC_READDIR(readdirargs) = 16; -+ -+ statfsres -+ NFSPROC_STATFS(nfs_fh) = 17; -+ } = 2; -+} = 100003; -+#ifdef WANT_NFS3 -+program NFS3_PROGRAM { -+ version NFS_V3 { -+ void -+ NFSPROC3_NULL(void) = 0; -+ -+ GETATTR3res -+ NFSPROC3_GETATTR(GETATTR3args) = 1; -+ -+ SETATTR3res -+ NFSPROC3_SETATTR(SETATTR3args) = 2; -+ -+ LOOKUP3res -+ NFSPROC3_LOOKUP(LOOKUP3args) = 3; -+ -+ ACCESS3res -+ NFSPROC3_ACCESS(ACCESS3args) = 4; -+ -+ READLINK3res -+ NFSPROC3_READLINK(READLINK3args) = 5; -+ -+ READ3res -+ NFSPROC3_READ(READ3args) = 6; -+ -+ WRITE3res -+ NFSPROC3_WRITE(WRITE3args) = 7; -+ -+ CREATE3res -+ NFSPROC3_CREATE(CREATE3args) = 8; -+ -+ MKDIR3res -+ NFSPROC3_MKDIR(MKDIR3args) = 9; -+ -+ SYMLINK3res -+ NFSPROC3_SYMLINK(SYMLINK3args) = 10; -+ -+ MKNOD3res -+ NFSPROC3_MKNOD(MKNOD3args) = 11; -+ -+ REMOVE3res -+ NFSPROC3_REMOVE(REMOVE3args) = 12; -+ -+ RMDIR3res -+ NFSPROC3_RMDIR(RMDIR3args) = 13; -+ -+ RENAME3res -+ NFSPROC3_RENAME(RENAME3args) = 14; -+ -+ LINK3res -+ NFSPROC3_LINK(LINK3args) = 15; -+ -+ READDIR3res -+ NFSPROC3_READDIR(READDIR3args) = 16; -+ -+ READDIRPLUS3res -+ NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; -+ -+ FSSTAT3res -+ NFSPROC3_FSSTAT(FSSTAT3args) = 18; -+ -+ FSINFO3res -+ NFSPROC3_FSINFO(FSINFO3args) = 19; -+ -+ PATHCONF3res -+ NFSPROC3_PATHCONF(PATHCONF3args) = 20; -+ -+ COMMIT3res -+ NFSPROC3_COMMIT(COMMIT3args) = 21; -+ } = 3; -+} = 100003; -+#endif -+ -diff --git a/tirpc/rpcsvc/rquota.x b/tirpc/rpcsvc/rquota.x -new file mode 100644 -index 0000000..72864d1 ---- /dev/null -+++ b/tirpc/rpcsvc/rquota.x -@@ -0,0 +1,67 @@ -+/* -+ * Remote quota protocol -+ * Requires unix authentication -+ */ -+ -+#ifndef RPC_HDR -+%#ifndef lint -+%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ -+%/*static char sccsid[] = "from: @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC";*/ -+%static const char rcsid[] = -+% "$FreeBSD: src/include/rpcsvc/rquota.x,v 1.6 1999/08/27 23:45:10 peter Exp $"; -+%#endif /* not lint */ -+#endif -+ -+const RQ_PATHLEN = 1024; -+ -+struct getquota_args { -+ string gqa_pathp; /* path to filesystem of interest */ -+ int gqa_uid; /* inquire about quota for uid */ -+}; -+ -+/* -+ * remote quota structure -+ */ -+struct rquota { -+ int rq_bsize; /* block size for block counts */ -+ bool rq_active; /* indicates whether quota is active */ -+ unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ -+ unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ -+ unsigned int rq_curblocks; /* current block count */ -+ unsigned int rq_fhardlimit; /* absolute limit on allocated files */ -+ unsigned int rq_fsoftlimit; /* preferred file limit */ -+ unsigned int rq_curfiles; /* current # allocated files */ -+ unsigned int rq_btimeleft; /* time left for excessive disk use */ -+ unsigned int rq_ftimeleft; /* time left for excessive files */ -+}; -+ -+enum gqr_status { -+ Q_OK = 1, /* quota returned */ -+ Q_NOQUOTA = 2, /* noquota for uid */ -+ Q_EPERM = 3 /* no permission to access quota */ -+}; -+ -+union getquota_rslt switch (gqr_status status) { -+case Q_OK: -+ rquota gqr_rquota; /* valid if status == Q_OK */ -+case Q_NOQUOTA: -+ void; -+case Q_EPERM: -+ void; -+}; -+ -+program RQUOTAPROG { -+ version RQUOTAVERS { -+ /* -+ * Get all quotas -+ */ -+ getquota_rslt -+ RQUOTAPROC_GETQUOTA(getquota_args) = 1; -+ -+ /* -+ * Get active quotas only -+ */ -+ getquota_rslt -+ RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; -+ } = 1; -+} = 100011; --- -1.9.1 -