pmap.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef __RPC_PMAP_PROT_H__
  2. #define __RPC_PMAP_PROT_H__
  3. #include <rpc/xdr.h>
  4. /* The following procedures are supported by the protocol:
  5. *
  6. * PMAPPROC_NULL() returns ()
  7. * takes nothing, returns nothing
  8. *
  9. * PMAPPROC_SET(struct pmap) returns (bool_t)
  10. * TRUE is success, FALSE is failure. Registers the tuple
  11. * [prog, vers, prot, port].
  12. *
  13. * PMAPPROC_UNSET(struct pmap) returns (bool_t)
  14. * TRUE is success, FALSE is failure. Un-registers pair
  15. * [prog, vers]. prot and port are ignored.
  16. *
  17. * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
  18. * 0 is failure. Otherwise returns the port number where the pair
  19. * [prog, vers] is registered. It may lie!
  20. *
  21. * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
  22. *
  23. * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
  24. * RETURNS (port, string<>);
  25. * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
  26. * Calls the procedure on the local machine. If it is not registered,
  27. * this procedure is quite; ie it does not return error information!!!
  28. * This procedure only is supported on rpc/udp and calls via
  29. * rpc/udp. This routine only passes null authentication parameters.
  30. * This file has no interface to xdr routines for PMAPPROC_CALLIT.
  31. *
  32. * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
  33. */
  34. #define PMAPPORT ((unsigned short)111)
  35. #define PMAPPROG ((unsigned long)100000)
  36. #define PMAPVERS ((unsigned long)2)
  37. #define PMAPVERS_PROTO ((unsigned long)2)
  38. #define PMAPVERS_ORIG ((unsigned long)1)
  39. #define PMAPPROC_NULL ((unsigned long)0)
  40. #define PMAPPROC_SET ((unsigned long)1)
  41. #define PMAPPROC_UNSET ((unsigned long)2)
  42. #define PMAPPROC_GETPORT ((unsigned long)3)
  43. #define PMAPPROC_DUMP ((unsigned long)4)
  44. #define PMAPPROC_CALLIT ((unsigned long)5)
  45. struct pmap {
  46. long unsigned pm_prog;
  47. long unsigned pm_vers;
  48. long unsigned pm_prot;
  49. long unsigned pm_port;
  50. };
  51. extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs);
  52. #endif