/include/rpc/rpc.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 108 lines · 39 code · 16 blank · 53 comment · 0 complexity · 5144b1ee388d65870f0fbd72f4d349dd MD5 · raw file

  1. /* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */
  2. /*
  3. * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  4. * unrestricted use provided that this legend is included on all tape
  5. * media and as a part of the software program in whole or part. Users
  6. * may copy or modify Sun RPC without charge, but are not authorized
  7. * to license or distribute it to anyone else except as part of a product or
  8. * program developed by the user.
  9. *
  10. * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  11. * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  12. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  13. *
  14. * Sun RPC is provided with no support and without any obligation on the
  15. * part of Sun Microsystems, Inc. to assist in its use, correction,
  16. * modification or enhancement.
  17. *
  18. * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  19. * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  20. * OR ANY PART THEREOF.
  21. *
  22. * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  23. * or profits or other special, indirect and consequential damages, even if
  24. * Sun has been advised of the possibility of such damages.
  25. *
  26. * Sun Microsystems, Inc.
  27. * 2550 Garcia Avenue
  28. * Mountain View, California 94043
  29. *
  30. * from: @(#)rpc.h 1.9 88/02/08 SMI
  31. * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
  32. * $FreeBSD$
  33. */
  34. /*
  35. * rpc.h, Just includes the billions of rpc header files necessary to
  36. * do remote procedure calling.
  37. *
  38. * Copyright (C) 1984, Sun Microsystems, Inc.
  39. */
  40. #ifndef _RPC_RPC_H
  41. #define _RPC_RPC_H
  42. #include <rpc/types.h> /* some typedefs */
  43. #include <sys/socket.h>
  44. #include <netinet/in.h>
  45. /* external data representation interfaces */
  46. #include <rpc/xdr.h> /* generic (de)serializer */
  47. /* Client side only authentication */
  48. #include <rpc/auth.h> /* generic authenticator (client side) */
  49. /* Client side (mostly) remote procedure call */
  50. #include <rpc/clnt.h> /* generic rpc stuff */
  51. /* semi-private protocol headers */
  52. #include <rpc/rpc_msg.h> /* protocol for rpc messages */
  53. #include <rpc/auth_unix.h> /* protocol for unix style cred */
  54. /*
  55. * Uncomment-out the next line if you are building the rpc library with
  56. * DES Authentication (see the README file in the secure_rpc/ directory).
  57. */
  58. #include <rpc/auth_des.h> /* protocol for des style cred */
  59. /* Server side only remote procedure callee */
  60. #include <rpc/svc.h> /* service manager and multiplexer */
  61. #include <rpc/svc_auth.h> /* service side authenticator */
  62. /* Portmapper client, server, and protocol headers */
  63. #include <rpc/pmap_clnt.h>
  64. #include <rpc/pmap_prot.h>
  65. #ifndef _KERNEL
  66. #include <rpc/rpcb_clnt.h> /* rpcbind interface functions */
  67. #endif
  68. #include <rpc/rpcent.h>
  69. __BEGIN_DECLS
  70. extern int get_myaddress(struct sockaddr_in *);
  71. extern int bindresvport(int, struct sockaddr_in *);
  72. extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
  73. xdrproc_t, xdrproc_t);
  74. extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
  75. xdrproc_t , void *);
  76. extern int getrpcport(char *, int, int, int);
  77. char *taddr2uaddr(const struct netconfig *, const struct netbuf *);
  78. struct netbuf *uaddr2taddr(const struct netconfig *, const char *);
  79. struct sockaddr;
  80. extern int bindresvport_sa(int, struct sockaddr *);
  81. __END_DECLS
  82. /*
  83. * The following are not exported interfaces, they are for internal library
  84. * and rpcbind use only. Do not use, they may change without notice.
  85. */
  86. __BEGIN_DECLS
  87. int __rpc_nconf2fd(const struct netconfig *);
  88. int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
  89. int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
  90. u_int __rpc_get_t_size(int, int, int);
  91. __END_DECLS
  92. #endif /* !_RPC_RPC_H */