ypupd.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (c) 2010, Oracle America, Inc.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are
  6. * met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above
  11. * copyright notice, this list of conditions and the following
  12. * disclaimer in the documentation and/or other materials
  13. * provided with the distribution.
  14. * * Neither the name of the "Oracle America, Inc." nor the names of its
  15. * contributors may be used to endorse or promote products derived
  16. * from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  21. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  22. * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  23. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  25. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  27. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  28. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. /* from @(#)ypupdate_prot.x 1.3 91/03/11 TIRPC 1.0 */
  32. #ifndef __RPCSVC_YPUPD_H__
  33. #define __RPCSVC_YPUPD_H__
  34. #include <features.h>
  35. #include <rpc/rpc.h>
  36. #define MAXMAPNAMELEN 255
  37. #define MAXYPDATALEN 1023
  38. #define MAXERRMSGLEN 255
  39. __BEGIN_DECLS
  40. typedef struct {
  41. u_int yp_buf_len;
  42. char *yp_buf_val;
  43. } yp_buf;
  44. extern bool_t xdr_yp_buf (XDR *, yp_buf*);
  45. struct ypupdate_args {
  46. char *mapname;
  47. yp_buf key;
  48. yp_buf datum;
  49. };
  50. typedef struct ypupdate_args ypupdate_args;
  51. extern bool_t xdr_ypupdate_args (XDR *, ypupdate_args*);
  52. struct ypdelete_args {
  53. char *mapname;
  54. yp_buf key;
  55. };
  56. typedef struct ypdelete_args ypdelete_args;
  57. extern bool_t xdr_ypdelete_args (XDR *, ypdelete_args*);
  58. #define YPU_PROG 100028
  59. #define YPU_VERS 1
  60. #define YPU_CHANGE 1
  61. extern u_int * ypu_change_1 (ypupdate_args *, CLIENT *);
  62. extern u_int * ypu_change_1_svc (ypupdate_args *, struct svc_req *);
  63. #define YPU_INSERT 2
  64. extern u_int * ypu_insert_1 (ypupdate_args *, CLIENT *);
  65. extern u_int * ypu_insert_1_svc (ypupdate_args *, struct svc_req *);
  66. #define YPU_DELETE 3
  67. extern u_int * ypu_delete_1 (ypdelete_args *, CLIENT *);
  68. extern u_int * ypu_delete_1_svc (ypdelete_args *, struct svc_req *);
  69. #define YPU_STORE 4
  70. extern u_int * ypu_store_1 (ypupdate_args *, CLIENT *);
  71. extern u_int * ypu_store_1_svc (ypupdate_args *, struct svc_req *);
  72. __END_DECLS
  73. #endif /* !__RPCSVC_YPUPD_H__ */