key_prot.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /*
  2. * Please do not edit this file.
  3. * It was generated using rpcgen.
  4. */
  5. #ifndef _KEY_PROT_H_RPCGEN
  6. #define _KEY_PROT_H_RPCGEN
  7. #include <rpc/rpc.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #if 0
  12. #pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI"
  13. #endif
  14. /* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
  15. /*
  16. * Compiled from key_prot.x using rpcgen.
  17. * DO NOT EDIT THIS FILE!
  18. * This is NOT source code!
  19. */
  20. #define PROOT 3
  21. #define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b"
  22. #define HEXKEYBYTES 48
  23. #define KEYSIZE 192
  24. #define KEYBYTES 24
  25. #define KEYCHECKSUMSIZE 16
  26. enum keystatus {
  27. KEY_SUCCESS = 0,
  28. KEY_NOSECRET = 1,
  29. KEY_UNKNOWN = 2,
  30. KEY_SYSTEMERR = 3,
  31. };
  32. typedef enum keystatus keystatus;
  33. typedef char keybuf[HEXKEYBYTES];
  34. typedef char *netnamestr;
  35. struct cryptkeyarg {
  36. netnamestr remotename;
  37. des_block deskey;
  38. };
  39. typedef struct cryptkeyarg cryptkeyarg;
  40. struct cryptkeyarg2 {
  41. netnamestr remotename;
  42. netobj remotekey;
  43. des_block deskey;
  44. };
  45. typedef struct cryptkeyarg2 cryptkeyarg2;
  46. struct cryptkeyres {
  47. keystatus status;
  48. union {
  49. des_block deskey;
  50. } cryptkeyres_u;
  51. };
  52. typedef struct cryptkeyres cryptkeyres;
  53. #define MAXGIDS 16
  54. struct unixcred {
  55. u_int uid;
  56. u_int gid;
  57. struct {
  58. u_int gids_len;
  59. u_int *gids_val;
  60. } gids;
  61. };
  62. typedef struct unixcred unixcred;
  63. struct getcredres {
  64. keystatus status;
  65. union {
  66. unixcred cred;
  67. } getcredres_u;
  68. };
  69. typedef struct getcredres getcredres;
  70. struct key_netstarg {
  71. keybuf st_priv_key;
  72. keybuf st_pub_key;
  73. netnamestr st_netname;
  74. };
  75. typedef struct key_netstarg key_netstarg;
  76. struct key_netstres {
  77. keystatus status;
  78. union {
  79. key_netstarg knet;
  80. } key_netstres_u;
  81. };
  82. typedef struct key_netstres key_netstres;
  83. #ifndef opaque
  84. #define opaque char
  85. #endif
  86. #define KEY_PROG 100029
  87. #define KEY_VERS 1
  88. #if defined(__STDC__) || defined(__cplusplus)
  89. #define KEY_SET 1
  90. extern keystatus * key_set_1(char *, CLIENT *);
  91. extern keystatus * key_set_1_svc(char *, struct svc_req *);
  92. #define KEY_ENCRYPT 2
  93. extern cryptkeyres * key_encrypt_1(cryptkeyarg *, CLIENT *);
  94. extern cryptkeyres * key_encrypt_1_svc(cryptkeyarg *, struct svc_req *);
  95. #define KEY_DECRYPT 3
  96. extern cryptkeyres * key_decrypt_1(cryptkeyarg *, CLIENT *);
  97. extern cryptkeyres * key_decrypt_1_svc(cryptkeyarg *, struct svc_req *);
  98. #define KEY_GEN 4
  99. extern des_block * key_gen_1(void *, CLIENT *);
  100. extern des_block * key_gen_1_svc(void *, struct svc_req *);
  101. #define KEY_GETCRED 5
  102. extern getcredres * key_getcred_1(netnamestr *, CLIENT *);
  103. extern getcredres * key_getcred_1_svc(netnamestr *, struct svc_req *);
  104. extern int key_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  105. #else /* K&R C */
  106. #define KEY_SET 1
  107. extern keystatus * key_set_1();
  108. extern keystatus * key_set_1_svc();
  109. #define KEY_ENCRYPT 2
  110. extern cryptkeyres * key_encrypt_1();
  111. extern cryptkeyres * key_encrypt_1_svc();
  112. #define KEY_DECRYPT 3
  113. extern cryptkeyres * key_decrypt_1();
  114. extern cryptkeyres * key_decrypt_1_svc();
  115. #define KEY_GEN 4
  116. extern des_block * key_gen_1();
  117. extern des_block * key_gen_1_svc();
  118. #define KEY_GETCRED 5
  119. extern getcredres * key_getcred_1();
  120. extern getcredres * key_getcred_1_svc();
  121. extern int key_prog_1_freeresult ();
  122. #endif /* K&R C */
  123. #define KEY_VERS2 2
  124. #if defined(__STDC__) || defined(__cplusplus)
  125. extern keystatus * key_set_2(char *, CLIENT *);
  126. extern keystatus * key_set_2_svc(char *, struct svc_req *);
  127. extern cryptkeyres * key_encrypt_2(cryptkeyarg *, CLIENT *);
  128. extern cryptkeyres * key_encrypt_2_svc(cryptkeyarg *, struct svc_req *);
  129. extern cryptkeyres * key_decrypt_2(cryptkeyarg *, CLIENT *);
  130. extern cryptkeyres * key_decrypt_2_svc(cryptkeyarg *, struct svc_req *);
  131. extern des_block * key_gen_2(void *, CLIENT *);
  132. extern des_block * key_gen_2_svc(void *, struct svc_req *);
  133. extern getcredres * key_getcred_2(netnamestr *, CLIENT *);
  134. extern getcredres * key_getcred_2_svc(netnamestr *, struct svc_req *);
  135. #define KEY_ENCRYPT_PK 6
  136. extern cryptkeyres * key_encrypt_pk_2(cryptkeyarg2 *, CLIENT *);
  137. extern cryptkeyres * key_encrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);
  138. #define KEY_DECRYPT_PK 7
  139. extern cryptkeyres * key_decrypt_pk_2(cryptkeyarg2 *, CLIENT *);
  140. extern cryptkeyres * key_decrypt_pk_2_svc(cryptkeyarg2 *, struct svc_req *);
  141. #define KEY_NET_PUT 8
  142. extern keystatus * key_net_put_2(key_netstarg *, CLIENT *);
  143. extern keystatus * key_net_put_2_svc(key_netstarg *, struct svc_req *);
  144. #define KEY_NET_GET 9
  145. extern key_netstres * key_net_get_2(void *, CLIENT *);
  146. extern key_netstres * key_net_get_2_svc(void *, struct svc_req *);
  147. #define KEY_GET_CONV 10
  148. extern cryptkeyres * key_get_conv_2(char *, CLIENT *);
  149. extern cryptkeyres * key_get_conv_2_svc(char *, struct svc_req *);
  150. extern int key_prog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
  151. #else /* K&R C */
  152. extern keystatus * key_set_2();
  153. extern keystatus * key_set_2_svc();
  154. extern cryptkeyres * key_encrypt_2();
  155. extern cryptkeyres * key_encrypt_2_svc();
  156. extern cryptkeyres * key_decrypt_2();
  157. extern cryptkeyres * key_decrypt_2_svc();
  158. extern des_block * key_gen_2();
  159. extern des_block * key_gen_2_svc();
  160. extern getcredres * key_getcred_2();
  161. extern getcredres * key_getcred_2_svc();
  162. #define KEY_ENCRYPT_PK 6
  163. extern cryptkeyres * key_encrypt_pk_2();
  164. extern cryptkeyres * key_encrypt_pk_2_svc();
  165. #define KEY_DECRYPT_PK 7
  166. extern cryptkeyres * key_decrypt_pk_2();
  167. extern cryptkeyres * key_decrypt_pk_2_svc();
  168. #define KEY_NET_PUT 8
  169. extern keystatus * key_net_put_2();
  170. extern keystatus * key_net_put_2_svc();
  171. #define KEY_NET_GET 9
  172. extern key_netstres * key_net_get_2();
  173. extern key_netstres * key_net_get_2_svc();
  174. #define KEY_GET_CONV 10
  175. extern cryptkeyres * key_get_conv_2();
  176. extern cryptkeyres * key_get_conv_2_svc();
  177. extern int key_prog_2_freeresult ();
  178. #endif /* K&R C */
  179. /* the xdr functions */
  180. #if defined(__STDC__) || defined(__cplusplus)
  181. extern bool_t xdr_keystatus (XDR *, keystatus*);
  182. extern bool_t xdr_keybuf (XDR *, keybuf);
  183. extern bool_t xdr_netnamestr (XDR *, netnamestr*);
  184. extern bool_t xdr_cryptkeyarg (XDR *, cryptkeyarg*);
  185. extern bool_t xdr_cryptkeyarg2 (XDR *, cryptkeyarg2*);
  186. extern bool_t xdr_cryptkeyres (XDR *, cryptkeyres*);
  187. extern bool_t xdr_unixcred (XDR *, unixcred*);
  188. extern bool_t xdr_getcredres (XDR *, getcredres*);
  189. extern bool_t xdr_key_netstarg (XDR *, key_netstarg*);
  190. extern bool_t xdr_key_netstres (XDR *, key_netstres*);
  191. #else /* K&R C */
  192. extern bool_t xdr_keystatus ();
  193. extern bool_t xdr_keybuf ();
  194. extern bool_t xdr_netnamestr ();
  195. extern bool_t xdr_cryptkeyarg ();
  196. extern bool_t xdr_cryptkeyarg2 ();
  197. extern bool_t xdr_cryptkeyres ();
  198. extern bool_t xdr_unixcred ();
  199. extern bool_t xdr_getcredres ();
  200. extern bool_t xdr_key_netstarg ();
  201. extern bool_t xdr_key_netstres ();
  202. #endif /* K&R C */
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #endif /* !_KEY_PROT_H_RPCGEN */