nis_callback.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. #ifndef _RPCSVC_NIS_CALLBACK_H
  32. #define _RPCSVC_NIS_CALLBACK_H 1
  33. #include <rpc/rpc.h>
  34. #include <rpcsvc/nis.h>
  35. __BEGIN_DECLS
  36. typedef nis_object *obj_p;
  37. struct cback_data {
  38. struct {
  39. u_int entries_len;
  40. obj_p *entries_val;
  41. } entries;
  42. };
  43. typedef struct cback_data cback_data;
  44. #define CB_PROG 100302
  45. #define CB_VERS 1
  46. #define CBPROC_RECEIVE 1
  47. extern bool_t * cbproc_receive_1 (cback_data *, CLIENT *) __THROW;
  48. extern bool_t * cbproc_receive_1_svc (cback_data *, struct svc_req *) __THROW;
  49. #define CBPROC_FINISH 2
  50. extern void * cbproc_finish_1 (void *, CLIENT *) __THROW;
  51. extern void * cbproc_finish_1_svc (void *, struct svc_req *) __THROW;
  52. #define CBPROC_ERROR 3
  53. extern void * cbproc_error_1 (nis_error *, CLIENT *) __THROW;
  54. extern void * cbproc_error_1_svc (nis_error *, struct svc_req *) __THROW;
  55. extern int cb_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t) __THROW;
  56. /* the xdr functions */
  57. extern bool_t xdr_obj_p (XDR *, obj_p*) __THROW;
  58. extern bool_t xdr_cback_data (XDR *, cback_data*) __THROW;
  59. __END_DECLS
  60. #endif /* !_RPCVSC_NIS_CALLBACK_H */