0003-Automatically-generate-XDR-header-files-from-.x-sour.patch 31 KB

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