0004-Automatically-generate-XDR-header-files-from-.x-sour.patch
31.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
From eba198c27f2b8d3f0b27ea4a42f3dc79d397440c Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
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 <thomas.petazzoni@free-electrons.com>
[yann.morin.1998@free.fr: update for 0.3.1]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Makefile.am | 19 +-
src/Makefile.am | 2 +-
tirpc/rpc/rpcb_prot.h | 797 --------------------------------------------------
tirpc/rpcsvc/crypt.h | 109 -------
4 files changed, 17 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 8558289..aa5908e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
SUBDIRS = src man doc rpcgen
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 \
@@ -20,7 +22,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 \
@@ -51,5 +52,17 @@ endif
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = libtirpc.pc
-CLEANFILES = cscope.* *~
+nobase_nodist_include_HEADERS = $(GENFILES)
+BUILT_SOURCES = $(GENFILES)
+
+$(GENFILES): %.h: %.x $(top_builddir)/rpcgen/rpcgen
+ mkdir -p $(dir $@)
+ $(top_builddir)/rpcgen/rpcgen -h -o $@ $<
+
+$(top_builddir)/rpcgen/rpcgen: force
+ cd rpcgen && $(MAKE)
+
+force:
+
+CLEANFILES = cscope.* *~ $(GENFILES)
DISTCLEANFILES = Makefile.in libtirpc*.tar.gz
diff --git a/src/Makefile.am b/src/Makefile.am
index 7428e92..0356171 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 7ae48b8..0000000
--- 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 <rpc/rpc.h>
-
-#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
- * <tiuser.h>. 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 da1f9cc..0000000
--- 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 <rpc/rpc.h>
-
-#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 */
--
1.9.1