rpc.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* @(#)rpc.h 2.3 88/08/10 4.0 RPCSRC; from 1.9 88/02/08 SMI */
  2. /*
  3. * Copyright (c) 2010, Oracle America, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions are met:
  9. *
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. *
  13. * * Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. *
  18. * * Neither the name of the "Oracle America, Inc." nor the names of
  19. * its contributors may be used to endorse or promote products
  20. * derived from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  23. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  24. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  25. * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  26. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  27. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
  28. * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  29. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  30. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  31. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. /*
  35. * rpc.h, Just includes the billions of rpc header files necessary to
  36. * do remote procedure calling.
  37. */
  38. #ifndef GSSRPC_RPC_H
  39. #define GSSRPC_RPC_H
  40. #include <gssrpc/types.h> /* some typedefs */
  41. #include <netinet/in.h>
  42. /* external data representation interfaces */
  43. #include <gssrpc/xdr.h> /* generic (de)serializer */
  44. /* Client side only authentication */
  45. #include <gssrpc/auth.h> /* generic authenticator (client side) */
  46. /* Client side (mostly) remote procedure call */
  47. #include <gssrpc/clnt.h> /* generic rpc stuff */
  48. /* semi-private protocol headers */
  49. #include <gssrpc/rpc_msg.h> /* protocol for rpc messages */
  50. #include <gssrpc/auth_unix.h> /* protocol for unix style cred */
  51. #include <gssrpc/auth_gss.h> /* RPCSEC_GSS */
  52. /*
  53. * Uncomment-out the next line if you are building the rpc library with
  54. * DES Authentication (see the README file in the secure_rpc/ directory).
  55. */
  56. #if 0
  57. #include <gssrpc/auth_des.h> protocol for des style cred
  58. #endif
  59. /* Server side only remote procedure callee */
  60. #include <gssrpc/svc_auth.h> /* service side authenticator */
  61. #include <gssrpc/svc.h> /* service manager and multiplexer */
  62. /*
  63. * Punt the rpc/netdb.h everywhere because it just makes things much more
  64. * difficult. We don't use the *rpcent functions anyway.
  65. */
  66. #if 0
  67. /*
  68. * COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION
  69. * OF UNIX BASED ON NFSSRC. These systems will already have the structures
  70. * defined by <rpc/netdb.h> included in <netdb.h>.
  71. */
  72. /* routines for parsing /etc/rpc */
  73. #if 0 /* netdb.h already included in rpc/types.h */
  74. #include <netdb.h>
  75. #endif
  76. #include <gssrpc/netdb.h> /* structures and routines to parse /etc/rpc */
  77. #endif
  78. /*
  79. * get the local host's IP address without consulting
  80. * name service library functions
  81. */
  82. GSSRPC__BEGIN_DECLS
  83. extern int get_myaddress(struct sockaddr_in *);
  84. extern int bindresvport(int, struct sockaddr_in *);
  85. extern int callrpc(char *, rpcprog_t, rpcvers_t, rpcproc_t, xdrproc_t,
  86. char *, xdrproc_t , char *);
  87. extern int getrpcport(char *, rpcprog_t, rpcvers_t, rpcprot_t);
  88. extern int gssrpc__rpc_dtablesize(void);
  89. GSSRPC__END_DECLS
  90. #endif /* !defined(GSSRPC_RPC_H) */