python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / libtirpc / 0004-Automatically-generate-XDR-header-files-from-.x-sour.patch
blobe302c5d1ce52c6e07ffdc81ffed42074842ce7ef
1 From eba198c27f2b8d3f0b27ea4a42f3dc79d397440c Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 10 Nov 2012 17:29:53 +0100
4 Subject: [PATCH] Automatically generate XDR header files from .x sources using
5 rpcgen
7 [Gustavo: update after dropping non-IPv6 support]
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 [yann.morin.1998@free.fr: update for 0.3.1]
10 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
11 ---
12 Makefile.am | 19 +-
13 src/Makefile.am | 2 +-
14 tirpc/rpc/rpcb_prot.h | 797 --------------------------------------------------
15 tirpc/rpcsvc/crypt.h | 109 -------
16 4 files changed, 17 insertions(+), 910 deletions(-)
17 delete mode 100644 tirpc/rpc/rpcb_prot.h
18 delete mode 100644 tirpc/rpcsvc/crypt.h
20 diff --git a/Makefile.am b/Makefile.am
21 index 8558289..aa5908e 100644
22 --- a/Makefile.am
23 +++ b/Makefile.am
24 @@ -1,6 +1,9 @@
25 SUBDIRS = src man doc rpcgen
26 ACLOCAL_AMFLAGS = -I m4
28 +GENFILES = tirpc/rpcsvc/crypt.h \
29 + tirpc/rpc/rpcb_prot.h
31 noinst_HEADERS = tirpc/reentrant.h \
32 tirpc/getpeereid.h \
33 tirpc/libc_private.h \
34 @@ -8,7 +11,6 @@ noinst_HEADERS = tirpc/reentrant.h \
36 nobase_include_HEADERS = tirpc/netconfig.h \
37 tirpc/rpcsvc/crypt.x \
38 - tirpc/rpcsvc/crypt.h \
39 tirpc/rpc/xdr.h \
40 tirpc/rpc/types.h \
41 tirpc/rpc/svc_soc.h \
42 @@ -20,7 +22,6 @@ nobase_include_HEADERS = tirpc/netconfig.h \
43 tirpc/rpc/rpcent.h \
44 tirpc/rpc/rpc_com.h \
45 tirpc/rpc/rpcb_prot.x \
46 - tirpc/rpc/rpcb_prot.h \
47 tirpc/rpc/rpcb_clnt.h \
48 tirpc/rpc/raw.h \
49 tirpc/rpc/pmap_rmt.h \
50 @@ -51,5 +52,17 @@ endif
51 pkgconfigdir=$(libdir)/pkgconfig
52 pkgconfig_DATA = libtirpc.pc
54 -CLEANFILES = cscope.* *~
55 +nobase_nodist_include_HEADERS = $(GENFILES)
56 +BUILT_SOURCES = $(GENFILES)
58 +$(GENFILES): %.h: %.x $(top_builddir)/rpcgen/rpcgen
59 + mkdir -p $(dir $@)
60 + $(top_builddir)/rpcgen/rpcgen -h -o $@ $<
62 +$(top_builddir)/rpcgen/rpcgen: force
63 + cd rpcgen && $(MAKE)
65 +force:
67 +CLEANFILES = cscope.* *~ $(GENFILES)
68 DISTCLEANFILES = Makefile.in libtirpc*.tar.gz
69 diff --git a/src/Makefile.am b/src/Makefile.am
70 index 7428e92..0356171 100644
71 --- a/src/Makefile.am
72 +++ b/src/Makefile.am
73 @@ -8,7 +8,7 @@
74 noinst_HEADERS = rpc_com.h debug.h
76 AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \
77 - -D_GNU_SOURCE -Wall -pipe
78 + -D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc
80 lib_LTLIBRARIES = libtirpc.la
82 diff --git a/tirpc/rpc/rpcb_prot.h b/tirpc/rpc/rpcb_prot.h
83 deleted file mode 100644
84 index 7ae48b8..0000000
85 --- a/tirpc/rpc/rpcb_prot.h
86 +++ /dev/null
87 @@ -1,797 +0,0 @@
88 -/*
89 - * Please do not edit this file.
90 - * It was generated using rpcgen.
91 - */
93 -#ifndef _RPCB_PROT_H_RPCGEN
94 -#define _RPCB_PROT_H_RPCGEN
96 -#include <rpc/rpc.h>
98 -#ifndef IXDR_GET_INT32
99 -#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))
100 -#endif
101 -#ifndef IXDR_PUT_INT32
102 -#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))
103 -#endif
104 -#ifndef IXDR_GET_U_INT32
105 -#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))
106 -#endif
107 -#ifndef IXDR_PUT_U_INT32
108 -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))
109 -#endif
111 - * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $
113 - * Copyright (c) 2009, Sun Microsystems, Inc.
114 - * All rights reserved.
116 - * Redistribution and use in source and binary forms, with or without
117 - * modification, are permitted provided that the following conditions are met:
118 - * - Redistributions of source code must retain the above copyright notice,
119 - * this list of conditions and the following disclaimer.
120 - * - Redistributions in binary form must reproduce the above copyright notice,
121 - * this list of conditions and the following disclaimer in the documentation
122 - * and/or other materials provided with the distribution.
123 - * - Neither the name of Sun Microsystems, Inc. nor the names of its
124 - * contributors may be used to endorse or promote products derived
125 - * from this software without specific prior written permission.
127 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
128 - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
129 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
130 - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
131 - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
132 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
133 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
134 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
135 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
136 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
137 - * POSSIBILITY OF SUCH DAMAGE.
138 - */
140 - * Copyright (c) 1988 by Sun Microsystems, Inc.
141 - */
142 -/* from rpcb_prot.x */
144 -/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */
146 -#ifndef _KERNEL
150 - * The following procedures are supported by the protocol in version 3:
152 - * RPCBPROC_NULL() returns ()
153 - * takes nothing, returns nothing
155 - * RPCBPROC_SET(rpcb) returns (bool_t)
156 - * TRUE is success, FALSE is failure. Registers the tuple
157 - * [prog, vers, address, owner, netid].
158 - * Finds out owner and netid information on its own.
160 - * RPCBPROC_UNSET(rpcb) returns (bool_t)
161 - * TRUE is success, FALSE is failure. Un-registers tuple
162 - * [prog, vers, netid]. addresses is ignored.
163 - * If netid is NULL, unregister all.
165 - * RPCBPROC_GETADDR(rpcb) returns (string).
166 - * 0 is failure. Otherwise returns the universal address where the
167 - * triple [prog, vers, netid] is registered. Ignore address and owner.
169 - * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
170 - * used to dump the entire rpcbind maps
172 - * RPCBPROC_CALLIT(rpcb_rmtcallargs)
173 - * RETURNS (rpcb_rmtcallres);
174 - * Calls the procedure on the remote machine. If it is not registered,
175 - * this procedure is quiet; i.e. it does not return error information!!!
176 - * This routine only passes null authentication parameters.
177 - * It has no interface to xdr routines for RPCBPROC_CALLIT.
179 - * RPCBPROC_GETTIME() returns (int).
180 - * Gets the remote machines time
182 - * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
183 - * Returns the netbuf address from universal address.
185 - * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
186 - * Returns the universal address from netbuf address.
188 - * END OF RPCBIND VERSION 3 PROCEDURES
189 - */
191 - * Except for RPCBPROC_CALLIT, the procedures above are carried over to
192 - * rpcbind version 4. Those below are added or modified for version 4.
193 - * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
194 - * AS RPCBPROC_CALLIT.
196 - * RPCBPROC_BCAST(rpcb_rmtcallargs)
197 - * RETURNS (rpcb_rmtcallres);
198 - * Calls the procedure on the remote machine. If it is not registered,
199 - * this procedure IS quiet; i.e. it DOES NOT return error information!!!
200 - * This routine should be used for broadcasting and nothing else.
202 - * RPCBPROC_GETVERSADDR(rpcb) returns (string).
203 - * 0 is failure. Otherwise returns the universal address where the
204 - * triple [prog, vers, netid] is registered. Ignore address and owner.
205 - * Same as RPCBPROC_GETADDR except that if the given version number
206 - * is not available, the address is not returned.
208 - * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
209 - * RETURNS (rpcb_rmtcallres);
210 - * Calls the procedure on the remote machine. If it is not registered,
211 - * this procedure is NOT quiet; i.e. it DOES return error information!!!
212 - * as any normal application would expect.
214 - * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
215 - * Same as RPCBPROC_GETADDR except that it returns a list of all the
216 - * addresses registered for the combination (prog, vers) (for all
217 - * transports).
219 - * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
220 - * Returns the statistics about the kind of requests received by rpcbind.
221 - */
224 - * A mapping of (program, version, network ID) to address
225 - */
227 -struct rpcb {
228 - rpcprog_t r_prog;
229 - rpcvers_t r_vers;
230 - char *r_netid;
231 - char *r_addr;
232 - char *r_owner;
234 -typedef struct rpcb rpcb;
235 -#ifdef __cplusplus
236 -extern "C" bool_t xdr_rpcb(XDR *, rpcb*);
237 -#elif __STDC__
238 -extern bool_t xdr_rpcb(XDR *, rpcb*);
239 -#else /* Old Style C */
240 -bool_t xdr_rpcb();
241 -#endif /* Old Style C */
244 -typedef rpcb RPCB;
248 - * A list of mappings
250 - * Below are two definitions for the rpcblist structure. This is done because
251 - * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
252 - * struct rpcblist * that rpcgen would produce. One version of the rpcblist
253 - * structure (actually called rp__list) is used with rpcgen, and the other is
254 - * defined only in the header file for compatibility with the specified
255 - * interface.
256 - */
258 -struct rp__list {
259 - rpcb rpcb_map;
260 - struct rp__list *rpcb_next;
262 -typedef struct rp__list rp__list;
263 -#ifdef __cplusplus
264 -extern "C" bool_t xdr_rp__list(XDR *, rp__list*);
265 -#elif __STDC__
266 -extern bool_t xdr_rp__list(XDR *, rp__list*);
267 -#else /* Old Style C */
268 -bool_t xdr_rp__list();
269 -#endif /* Old Style C */
272 -typedef rp__list *rpcblist_ptr;
273 -#ifdef __cplusplus
274 -extern "C" bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*);
275 -#elif __STDC__
276 -extern bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*);
277 -#else /* Old Style C */
278 -bool_t xdr_rpcblist_ptr();
279 -#endif /* Old Style C */
282 -typedef struct rp__list rpcblist;
283 -typedef struct rp__list RPCBLIST;
285 -#ifndef __cplusplus
286 -struct rpcblist {
287 - RPCB rpcb_map;
288 - struct rpcblist *rpcb_next;
290 -#endif
292 -#ifdef __cplusplus
293 -extern "C" {
294 -#endif
295 -extern bool_t xdr_rpcblist(XDR *, rpcblist**);
296 -#ifdef __cplusplus
298 -#endif
302 - * Arguments of remote calls
303 - */
305 -struct rpcb_rmtcallargs {
306 - rpcprog_t prog;
307 - rpcvers_t vers;
308 - rpcproc_t proc;
309 - struct {
310 - u_int args_len;
311 - char *args_val;
312 - } args;
314 -typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
315 -#ifdef __cplusplus
316 -extern "C" bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*);
317 -#elif __STDC__
318 -extern bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*);
319 -#else /* Old Style C */
320 -bool_t xdr_rpcb_rmtcallargs();
321 -#endif /* Old Style C */
325 - * Client-side only representation of rpcb_rmtcallargs structure.
327 - * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
328 - * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to
329 - * be passed the XDR routine that knows the args' structure. This routine
330 - * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
331 - * the application being called already knows the args structure. So we use a
332 - * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
333 - * includes the args' XDR routine.
334 - */
335 -struct r_rpcb_rmtcallargs {
336 - rpcprog_t prog;
337 - rpcvers_t vers;
338 - rpcproc_t proc;
339 - struct {
340 - u_int args_len;
341 - char *args_val;
342 - } args;
343 - xdrproc_t xdr_args; /* encodes args */
348 - * Results of the remote call
349 - */
351 -struct rpcb_rmtcallres {
352 - char *addr;
353 - struct {
354 - u_int results_len;
355 - char *results_val;
356 - } results;
358 -typedef struct rpcb_rmtcallres rpcb_rmtcallres;
359 -#ifdef __cplusplus
360 -extern "C" bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*);
361 -#elif __STDC__
362 -extern bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*);
363 -#else /* Old Style C */
364 -bool_t xdr_rpcb_rmtcallres();
365 -#endif /* Old Style C */
369 - * Client-side only representation of rpcb_rmtcallres structure.
370 - */
371 -struct r_rpcb_rmtcallres {
372 - char *addr;
373 - struct {
374 - u_int32_t results_len;
375 - char *results_val;
376 - } results;
377 - xdrproc_t xdr_res; /* decodes results */
381 - * rpcb_entry contains a merged address of a service on a particular
382 - * transport, plus associated netconfig information. A list of rpcb_entrys
383 - * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used
384 - * in r_nc_* fields.
385 - */
387 -struct rpcb_entry {
388 - char *r_maddr;
389 - char *r_nc_netid;
390 - u_int r_nc_semantics;
391 - char *r_nc_protofmly;
392 - char *r_nc_proto;
394 -typedef struct rpcb_entry rpcb_entry;
395 -#ifdef __cplusplus
396 -extern "C" bool_t xdr_rpcb_entry(XDR *, rpcb_entry*);
397 -#elif __STDC__
398 -extern bool_t xdr_rpcb_entry(XDR *, rpcb_entry*);
399 -#else /* Old Style C */
400 -bool_t xdr_rpcb_entry();
401 -#endif /* Old Style C */
405 - * A list of addresses supported by a service.
406 - */
408 -struct rpcb_entry_list {
409 - rpcb_entry rpcb_entry_map;
410 - struct rpcb_entry_list *rpcb_entry_next;
412 -typedef struct rpcb_entry_list rpcb_entry_list;
413 -#ifdef __cplusplus
414 -extern "C" bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*);
415 -#elif __STDC__
416 -extern bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*);
417 -#else /* Old Style C */
418 -bool_t xdr_rpcb_entry_list();
419 -#endif /* Old Style C */
422 -typedef rpcb_entry_list *rpcb_entry_list_ptr;
423 -#ifdef __cplusplus
424 -extern "C" bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*);
425 -#elif __STDC__
426 -extern bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*);
427 -#else /* Old Style C */
428 -bool_t xdr_rpcb_entry_list_ptr();
429 -#endif /* Old Style C */
433 - * rpcbind statistics
434 - */
436 -#define rpcb_highproc_2 RPCBPROC_CALLIT
437 -#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
438 -#define rpcb_highproc_4 RPCBPROC_GETSTAT
439 -#define RPCBSTAT_HIGHPROC 13
440 -#define RPCBVERS_STAT 3
441 -#define RPCBVERS_4_STAT 2
442 -#define RPCBVERS_3_STAT 1
443 -#define RPCBVERS_2_STAT 0
445 -/* Link list of all the stats about getport and getaddr */
447 -struct rpcbs_addrlist {
448 - rpcprog_t prog;
449 - rpcvers_t vers;
450 - int success;
451 - int failure;
452 - char *netid;
453 - struct rpcbs_addrlist *next;
455 -typedef struct rpcbs_addrlist rpcbs_addrlist;
456 -#ifdef __cplusplus
457 -extern "C" bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*);
458 -#elif __STDC__
459 -extern bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*);
460 -#else /* Old Style C */
461 -bool_t xdr_rpcbs_addrlist();
462 -#endif /* Old Style C */
465 -/* Link list of all the stats about rmtcall */
467 -struct rpcbs_rmtcalllist {
468 - rpcprog_t prog;
469 - rpcvers_t vers;
470 - rpcproc_t proc;
471 - int success;
472 - int failure;
473 - int indirect;
474 - char *netid;
475 - struct rpcbs_rmtcalllist *next;
477 -typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
478 -#ifdef __cplusplus
479 -extern "C" bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*);
480 -#elif __STDC__
481 -extern bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*);
482 -#else /* Old Style C */
483 -bool_t xdr_rpcbs_rmtcalllist();
484 -#endif /* Old Style C */
487 -typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
488 -#ifdef __cplusplus
489 -extern "C" bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc);
490 -#elif __STDC__
491 -extern bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc);
492 -#else /* Old Style C */
493 -bool_t xdr_rpcbs_proc();
494 -#endif /* Old Style C */
497 -typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
498 -#ifdef __cplusplus
499 -extern "C" bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*);
500 -#elif __STDC__
501 -extern bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*);
502 -#else /* Old Style C */
503 -bool_t xdr_rpcbs_addrlist_ptr();
504 -#endif /* Old Style C */
507 -typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
508 -#ifdef __cplusplus
509 -extern "C" bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*);
510 -#elif __STDC__
511 -extern bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*);
512 -#else /* Old Style C */
513 -bool_t xdr_rpcbs_rmtcalllist_ptr();
514 -#endif /* Old Style C */
517 -struct rpcb_stat {
518 - rpcbs_proc info;
519 - int setinfo;
520 - int unsetinfo;
521 - rpcbs_addrlist_ptr addrinfo;
522 - rpcbs_rmtcalllist_ptr rmtinfo;
524 -typedef struct rpcb_stat rpcb_stat;
525 -#ifdef __cplusplus
526 -extern "C" bool_t xdr_rpcb_stat(XDR *, rpcb_stat*);
527 -#elif __STDC__
528 -extern bool_t xdr_rpcb_stat(XDR *, rpcb_stat*);
529 -#else /* Old Style C */
530 -bool_t xdr_rpcb_stat();
531 -#endif /* Old Style C */
535 - * One rpcb_stat structure is returned for each version of rpcbind
536 - * being monitored.
537 - */
539 -typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
540 -#ifdef __cplusplus
541 -extern "C" bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers);
542 -#elif __STDC__
543 -extern bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers);
544 -#else /* Old Style C */
545 -bool_t xdr_rpcb_stat_byvers();
546 -#endif /* Old Style C */
550 - * We don't define netbuf in RPCL, since it would contain structure member
551 - * names that would conflict with the definition of struct netbuf in
552 - * <tiuser.h>. Instead we merely declare the XDR routine xdr_netbuf() here,
553 - * and implement it ourselves in rpc/rpcb_prot.c.
554 - */
555 -#ifdef __cplusplus
556 -extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *);
558 -#else /* __STDC__ */
559 -extern bool_t xdr_netbuf(XDR *, struct netbuf *);
561 -#endif
563 -#define RPCBVERS_3 RPCBVERS
564 -#define RPCBVERS_4 RPCBVERS4
566 -#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock"
568 -#else /* ndef _KERNEL */
569 -#ifdef __cplusplus
570 -extern "C" {
571 -#endif
574 - * A mapping of (program, version, network ID) to address
575 - */
576 -struct rpcb {
577 - rpcprog_t r_prog; /* program number */
578 - rpcvers_t r_vers; /* version number */
579 - char *r_netid; /* network id */
580 - char *r_addr; /* universal address */
581 - char *r_owner; /* owner of the mapping */
583 -typedef struct rpcb RPCB;
586 - * A list of mappings
587 - */
588 -struct rpcblist {
589 - RPCB rpcb_map;
590 - struct rpcblist *rpcb_next;
592 -typedef struct rpcblist RPCBLIST;
593 -typedef struct rpcblist *rpcblist_ptr;
596 - * Remote calls arguments
597 - */
598 -struct rpcb_rmtcallargs {
599 - rpcprog_t prog; /* program number */
600 - rpcvers_t vers; /* version number */
601 - rpcproc_t proc; /* procedure number */
602 - u_int32_t arglen; /* arg len */
603 - caddr_t args_ptr; /* argument */
604 - xdrproc_t xdr_args; /* XDR routine for argument */
606 -typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
609 - * Remote calls results
610 - */
611 -struct rpcb_rmtcallres {
612 - char *addr_ptr; /* remote universal address */
613 - u_int32_t resultslen; /* results length */
614 - caddr_t results_ptr; /* results */
615 - xdrproc_t xdr_results; /* XDR routine for result */
617 -typedef struct rpcb_rmtcallres rpcb_rmtcallres;
619 -struct rpcb_entry {
620 - char *r_maddr;
621 - char *r_nc_netid;
622 - unsigned int r_nc_semantics;
623 - char *r_nc_protofmly;
624 - char *r_nc_proto;
626 -typedef struct rpcb_entry rpcb_entry;
629 - * A list of addresses supported by a service.
630 - */
632 -struct rpcb_entry_list {
633 - rpcb_entry rpcb_entry_map;
634 - struct rpcb_entry_list *rpcb_entry_next;
636 -typedef struct rpcb_entry_list rpcb_entry_list;
638 -typedef rpcb_entry_list *rpcb_entry_list_ptr;
641 - * rpcbind statistics
642 - */
644 -#define rpcb_highproc_2 RPCBPROC_CALLIT
645 -#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
646 -#define rpcb_highproc_4 RPCBPROC_GETSTAT
647 -#define RPCBSTAT_HIGHPROC 13
648 -#define RPCBVERS_STAT 3
649 -#define RPCBVERS_4_STAT 2
650 -#define RPCBVERS_3_STAT 1
651 -#define RPCBVERS_2_STAT 0
653 -/* Link list of all the stats about getport and getaddr */
655 -struct rpcbs_addrlist {
656 - rpcprog_t prog;
657 - rpcvers_t vers;
658 - int success;
659 - int failure;
660 - char *netid;
661 - struct rpcbs_addrlist *next;
663 -typedef struct rpcbs_addrlist rpcbs_addrlist;
665 -/* Link list of all the stats about rmtcall */
667 -struct rpcbs_rmtcalllist {
668 - rpcprog_t prog;
669 - rpcvers_t vers;
670 - rpcproc_t proc;
671 - int success;
672 - int failure;
673 - int indirect;
674 - char *netid;
675 - struct rpcbs_rmtcalllist *next;
677 -typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
679 -typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
681 -typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
683 -typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
685 -struct rpcb_stat {
686 - rpcbs_proc info;
687 - int setinfo;
688 - int unsetinfo;
689 - rpcbs_addrlist_ptr addrinfo;
690 - rpcbs_rmtcalllist_ptr rmtinfo;
692 -typedef struct rpcb_stat rpcb_stat;
695 - * One rpcb_stat structure is returned for each version of rpcbind
696 - * being monitored.
697 - */
699 -typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
701 -#ifdef __cplusplus
703 -#endif
705 -#endif /* ndef _KERNEL */
707 -#define RPCBPROG ((u_int32_t)100000)
708 -#define RPCBVERS ((u_int32_t)3)
710 -#ifdef __cplusplus
711 -#define RPCBPROC_SET ((u_int32_t)1)
712 -extern "C" bool_t * rpcbproc_set_3(rpcb *, CLIENT *);
713 -extern "C" bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *);
714 -#define RPCBPROC_UNSET ((u_int32_t)2)
715 -extern "C" bool_t * rpcbproc_unset_3(rpcb *, CLIENT *);
716 -extern "C" bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *);
717 -#define RPCBPROC_GETADDR ((u_int32_t)3)
718 -extern "C" char ** rpcbproc_getaddr_3(rpcb *, CLIENT *);
719 -extern "C" char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *);
720 -#define RPCBPROC_DUMP ((u_int32_t)4)
721 -extern "C" rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);
722 -extern "C" rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);
723 -#define RPCBPROC_CALLIT ((u_int32_t)5)
724 -extern "C" rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);
725 -extern "C" rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);
726 -#define RPCBPROC_GETTIME ((u_int32_t)6)
727 -extern "C" u_int * rpcbproc_gettime_3(void *, CLIENT *);
728 -extern "C" u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);
729 -#define RPCBPROC_UADDR2TADDR ((u_int32_t)7)
730 -extern "C" struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);
731 -extern "C" struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);
732 -#define RPCBPROC_TADDR2UADDR ((u_int32_t)8)
733 -extern "C" char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);
734 -extern "C" char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);
736 -#elif __STDC__
737 -#define RPCBPROC_SET ((u_int32_t)1)
738 -extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *);
739 -extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *);
740 -#define RPCBPROC_UNSET ((u_int32_t)2)
741 -extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *);
742 -extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *);
743 -#define RPCBPROC_GETADDR ((u_int32_t)3)
744 -extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *);
745 -extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *);
746 -#define RPCBPROC_DUMP ((u_int32_t)4)
747 -extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);
748 -extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);
749 -#define RPCBPROC_CALLIT ((u_int32_t)5)
750 -extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);
751 -extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);
752 -#define RPCBPROC_GETTIME ((u_int32_t)6)
753 -extern u_int * rpcbproc_gettime_3(void *, CLIENT *);
754 -extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);
755 -#define RPCBPROC_UADDR2TADDR ((u_int32_t)7)
756 -extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);
757 -extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);
758 -#define RPCBPROC_TADDR2UADDR ((u_int32_t)8)
759 -extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);
760 -extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);
762 -#else /* Old Style C */
763 -#define RPCBPROC_SET ((u_int32_t)1)
764 -extern bool_t * rpcbproc_set_3();
765 -extern bool_t * rpcbproc_set_3_svc();
766 -#define RPCBPROC_UNSET ((u_int32_t)2)
767 -extern bool_t * rpcbproc_unset_3();
768 -extern bool_t * rpcbproc_unset_3_svc();
769 -#define RPCBPROC_GETADDR ((u_int32_t)3)
770 -extern char ** rpcbproc_getaddr_3();
771 -extern char ** rpcbproc_getaddr_3_svc();
772 -#define RPCBPROC_DUMP ((u_int32_t)4)
773 -extern rpcblist_ptr * rpcbproc_dump_3();
774 -extern rpcblist_ptr * rpcbproc_dump_3_svc();
775 -#define RPCBPROC_CALLIT ((u_int32_t)5)
776 -extern rpcb_rmtcallres * rpcbproc_callit_3();
777 -extern rpcb_rmtcallres * rpcbproc_callit_3_svc();
778 -#define RPCBPROC_GETTIME ((u_int32_t)6)
779 -extern u_int * rpcbproc_gettime_3();
780 -extern u_int * rpcbproc_gettime_3_svc();
781 -#define RPCBPROC_UADDR2TADDR ((u_int32_t)7)
782 -extern struct netbuf * rpcbproc_uaddr2taddr_3();
783 -extern struct netbuf * rpcbproc_uaddr2taddr_3_svc();
784 -#define RPCBPROC_TADDR2UADDR ((u_int32_t)8)
785 -extern char ** rpcbproc_taddr2uaddr_3();
786 -extern char ** rpcbproc_taddr2uaddr_3_svc();
787 -#endif /* Old Style C */
788 -#define RPCBVERS4 ((u_int32_t)4)
790 -#ifdef __cplusplus
791 -extern "C" bool_t * rpcbproc_set_4(rpcb *, CLIENT *);
792 -extern "C" bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *);
793 -extern "C" bool_t * rpcbproc_unset_4(rpcb *, CLIENT *);
794 -extern "C" bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *);
795 -extern "C" char ** rpcbproc_getaddr_4(rpcb *, CLIENT *);
796 -extern "C" char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *);
797 -extern "C" rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);
798 -extern "C" rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);
799 -#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT)
800 -extern "C" rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);
801 -extern "C" rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);
802 -extern "C" u_int * rpcbproc_gettime_4(void *, CLIENT *);
803 -extern "C" u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *);
804 -extern "C" struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);
805 -extern "C" struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);
806 -extern "C" char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);
807 -extern "C" char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);
808 -#define RPCBPROC_GETVERSADDR ((u_int32_t)9)
809 -extern "C" char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *);
810 -extern "C" char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *);
811 -#define RPCBPROC_INDIRECT ((u_int32_t)10)
812 -extern "C" rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);
813 -extern "C" rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);
814 -#define RPCBPROC_GETADDRLIST ((u_int32_t)11)
815 -extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *);
816 -extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *);
817 -#define RPCBPROC_GETSTAT ((u_int32_t)12)
818 -extern "C" rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);
819 -extern "C" rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);
821 -#elif __STDC__
822 -extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *);
823 -extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *);
824 -extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *);
825 -extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *);
826 -extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *);
827 -extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *);
828 -extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);
829 -extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);
830 -#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT)
831 -extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);
832 -extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);
833 -extern u_int * rpcbproc_gettime_4(void *, CLIENT *);
834 -extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *);
835 -extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);
836 -extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);
837 -extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);
838 -extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);
839 -#define RPCBPROC_GETVERSADDR ((u_int32_t)9)
840 -extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *);
841 -extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *);
842 -#define RPCBPROC_INDIRECT ((u_int32_t)10)
843 -extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);
844 -extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);
845 -#define RPCBPROC_GETADDRLIST ((u_int32_t)11)
846 -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *);
847 -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *);
848 -#define RPCBPROC_GETSTAT ((u_int32_t)12)
849 -extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);
850 -extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);
852 -#else /* Old Style C */
853 -extern bool_t * rpcbproc_set_4();
854 -extern bool_t * rpcbproc_set_4_svc();
855 -extern bool_t * rpcbproc_unset_4();
856 -extern bool_t * rpcbproc_unset_4_svc();
857 -extern char ** rpcbproc_getaddr_4();
858 -extern char ** rpcbproc_getaddr_4_svc();
859 -extern rpcblist_ptr * rpcbproc_dump_4();
860 -extern rpcblist_ptr * rpcbproc_dump_4_svc();
861 -#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT)
862 -extern rpcb_rmtcallres * rpcbproc_bcast_4();
863 -extern rpcb_rmtcallres * rpcbproc_bcast_4_svc();
864 -extern u_int * rpcbproc_gettime_4();
865 -extern u_int * rpcbproc_gettime_4_svc();
866 -extern struct netbuf * rpcbproc_uaddr2taddr_4();
867 -extern struct netbuf * rpcbproc_uaddr2taddr_4_svc();
868 -extern char ** rpcbproc_taddr2uaddr_4();
869 -extern char ** rpcbproc_taddr2uaddr_4_svc();
870 -#define RPCBPROC_GETVERSADDR ((u_int32_t)9)
871 -extern char ** rpcbproc_getversaddr_4();
872 -extern char ** rpcbproc_getversaddr_4_svc();
873 -#define RPCBPROC_INDIRECT ((u_int32_t)10)
874 -extern rpcb_rmtcallres * rpcbproc_indirect_4();
875 -extern rpcb_rmtcallres * rpcbproc_indirect_4_svc();
876 -#define RPCBPROC_GETADDRLIST ((u_int32_t)11)
877 -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4();
878 -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc();
879 -#define RPCBPROC_GETSTAT ((u_int32_t)12)
880 -extern rpcb_stat * rpcbproc_getstat_4();
881 -extern rpcb_stat * rpcbproc_getstat_4_svc();
882 -#endif /* Old Style C */
884 -#endif /* !_RPCB_PROT_H_RPCGEN */
885 diff --git a/tirpc/rpcsvc/crypt.h b/tirpc/rpcsvc/crypt.h
886 deleted file mode 100644
887 index da1f9cc..0000000
888 --- a/tirpc/rpcsvc/crypt.h
889 +++ /dev/null
890 @@ -1,109 +0,0 @@
892 - * Please do not edit this file.
893 - * It was generated using rpcgen.
894 - */
896 -#ifndef _CRYPT_H_RPCGEN
897 -#define _CRYPT_H_RPCGEN
899 -#include <rpc/rpc.h>
901 -#ifndef IXDR_GET_INT32
902 -#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))
903 -#endif
904 -#ifndef IXDR_PUT_INT32
905 -#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))
906 -#endif
907 -#ifndef IXDR_GET_U_INT32
908 -#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))
909 -#endif
910 -#ifndef IXDR_PUT_U_INT32
911 -#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))
912 -#endif
914 -enum des_dir {
915 - ENCRYPT_DES = 0,
916 - DECRYPT_DES = 1,
918 -typedef enum des_dir des_dir;
919 -#ifdef __cplusplus
920 -extern "C" bool_t xdr_des_dir(XDR *, des_dir*);
921 -#elif __STDC__
922 -extern bool_t xdr_des_dir(XDR *, des_dir*);
923 -#else /* Old Style C */
924 -bool_t xdr_des_dir();
925 -#endif /* Old Style C */
928 -enum des_mode {
929 - CBC_DES = 0,
930 - ECB_DES = 1,
932 -typedef enum des_mode des_mode;
933 -#ifdef __cplusplus
934 -extern "C" bool_t xdr_des_mode(XDR *, des_mode*);
935 -#elif __STDC__
936 -extern bool_t xdr_des_mode(XDR *, des_mode*);
937 -#else /* Old Style C */
938 -bool_t xdr_des_mode();
939 -#endif /* Old Style C */
942 -struct desargs {
943 - u_char des_key[8];
944 - des_dir des_dir;
945 - des_mode des_mode;
946 - u_char des_ivec[8];
947 - struct {
948 - u_int desbuf_len;
949 - char *desbuf_val;
950 - } desbuf;
952 -typedef struct desargs desargs;
953 -#ifdef __cplusplus
954 -extern "C" bool_t xdr_desargs(XDR *, desargs*);
955 -#elif __STDC__
956 -extern bool_t xdr_desargs(XDR *, desargs*);
957 -#else /* Old Style C */
958 -bool_t xdr_desargs();
959 -#endif /* Old Style C */
962 -struct desresp {
963 - struct {
964 - u_int desbuf_len;
965 - char *desbuf_val;
966 - } desbuf;
967 - u_char des_ivec[8];
968 - int stat;
970 -typedef struct desresp desresp;
971 -#ifdef __cplusplus
972 -extern "C" bool_t xdr_desresp(XDR *, desresp*);
973 -#elif __STDC__
974 -extern bool_t xdr_desresp(XDR *, desresp*);
975 -#else /* Old Style C */
976 -bool_t xdr_desresp();
977 -#endif /* Old Style C */
980 -#define CRYPT_PROG ((u_int32_t)600100029)
981 -#define CRYPT_VERS ((u_int32_t)1)
983 -#ifdef __cplusplus
984 -#define DES_CRYPT ((u_int32_t)1)
985 -extern "C" desresp * des_crypt_1(desargs *, CLIENT *);
986 -extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *);
988 -#elif __STDC__
989 -#define DES_CRYPT ((u_int32_t)1)
990 -extern desresp * des_crypt_1(desargs *, CLIENT *);
991 -extern desresp * des_crypt_1_svc(desargs *, struct svc_req *);
993 -#else /* Old Style C */
994 -#define DES_CRYPT ((u_int32_t)1)
995 -extern desresp * des_crypt_1();
996 -extern desresp * des_crypt_1_svc();
997 -#endif /* Old Style C */
999 -#endif /* !_CRYPT_H_RPCGEN */
1001 1.9.1