rename.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. /* include/gssrpc/rename.h */
  2. /*
  3. * Copyright (C) 2004 by the Massachusetts Institute of Technology.
  4. * All rights reserved.
  5. *
  6. * Export of this software from the United States of America may
  7. * require a specific license from the United States Government.
  8. * It is the responsibility of any person or organization contemplating
  9. * export to obtain such a license before exporting.
  10. *
  11. * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
  12. * distribute this software and its documentation for any purpose and
  13. * without fee is hereby granted, provided that the above copyright
  14. * notice appear in all copies and that both that copyright notice and
  15. * this permission notice appear in supporting documentation, and that
  16. * the name of M.I.T. not be used in advertising or publicity pertaining
  17. * to distribution of the software without specific, written prior
  18. * permission. Furthermore if you modify this software you must label
  19. * your software as modified software and not distribute it in such a
  20. * fashion that it might be confused with the original M.I.T. software.
  21. * M.I.T. makes no representations about the suitability of
  22. * this software for any purpose. It is provided "as is" without express
  23. * or implied warranty.
  24. */
  25. /*
  26. *
  27. * Namespace mangling for various purposes.
  28. *
  29. * Symbols in the object code need to be renamed to not conflict with
  30. * an OS-provided RPC implementation. Without renaming, the conflicts
  31. * can cause problems with things like RPC-enabled NSS
  32. * implementations.
  33. *
  34. * Symbols in headers should not conflict with implementation-reserved
  35. * namespace (prefixes "_[A-Z_]" for any purpose; prefix "_"
  36. * for file scope identifiers and tag names), or unnecessarily impinge
  37. * on user namespace.
  38. *
  39. * The renaming of the header directory is done to avoid problems when
  40. * the OS header files include <rpc/foo.h> and might get ours instead.
  41. * OS vendors should replace all the <gssrpc/foo.h> inclusions with
  42. * <rpc/foo.h> inclusions, as appropriate. Additionally, vendors
  43. * should probably put some symbols into the implementation namespace.
  44. *
  45. * For example, inclusion protection should change from "GSSRPC_*_H"
  46. * to "_RPC_*_H", struct tags should get "__" prefixes, etc.
  47. *
  48. * This implementation reserves the object code prefix "gssrpc_".
  49. * External names in the RPC API not beginning with "_" get renamed
  50. * with the prefix "gssrpc_" via #define, e.g., "foo" -> "gssrpc_foo".
  51. * External names in the RPC API beginning with "_" get textually
  52. * rewritten, with "#if 0"-disabled #defines mapping them back to
  53. * their original forms, e.g., "_foo" is rewrittten to "gssrpc__foo"
  54. * in the original files, with an unused "#define gssrpc__foo _foo"
  55. * here.
  56. */
  57. #ifndef GSSRPC_RENAME_H
  58. #define GSSRPC_RENAME_H
  59. /* auth.h */
  60. #define xdr_des_block gssrpc_xdr_des_block
  61. #define authany_wrap gssrpc_authany_wrap
  62. #define authany_unwrap gssrpc_authany_unwrap
  63. #define authunix_create gssrpc_authunix_create
  64. #define authunix_create_default gssrpc_authunix_create_default
  65. #define authnone_create gssrpc_authnone_create
  66. #define authdes_create gssrpc_authdes_create
  67. #define xdr_opaque_auth gssrpc_xdr_opaque_auth
  68. #if 0
  69. #define gssrpc__null_auth _null_auth
  70. #endif
  71. /* auth_gss.c */
  72. #define auth_debug_gss gssrpc_auth_debug_gss
  73. #define misc_debug_gss gssrpc_misc_debug_gss
  74. /* auth_gss.h */
  75. #define xdr_rpc_gss_buf gssrpc_xdr_rpc_gss_buf
  76. #define xdr_rpc_gss_cred gssrpc_xdr_rpc_gss_cred
  77. #define xdr_rpc_gss_init_args gssrpc_xdr_rpc_gss_init_args
  78. #define xdr_rpc_gss_init_res gssrpc_xdr_rpc_gss_init_res
  79. #define xdr_rpc_gss_data gssrpc_xdr_rpc_gss_data
  80. #define xdr_rpc_gss_wrap_data gssrpc_xdr_rpc_gss_wrap_data
  81. #define xdr_rpc_gss_unwrap_data gssrpc_xdr_rpc_gss_unwrap_data
  82. #define authgss_create gssrpc_authgss_create
  83. #define authgss_create_default gssrpc_authgss_create_default
  84. #define authgss_get_private_data gssrpc_authgss_get_private_data
  85. #define authgss_service gssrpc_authgss_service
  86. #ifdef GSSRPC__IMPL
  87. #define log_debug gssrpc_log_debug
  88. #define log_status gssrpc_log_status
  89. #define log_hexdump gssrpc_log_hexdump
  90. #endif
  91. /* auth_gssapi.c */
  92. #define auth_debug_gssapi gssrpc_auth_debug_gssapi
  93. #define misc_debug_gssapi gssrpc_misc_debug_gssapi
  94. /* auth_gssapi.h */
  95. #define xdr_gss_buf gssrpc_xdr_gss_buf
  96. #define xdr_authgssapi_creds gssrpc_xdr_authgssapi_creds
  97. #define xdr_authgssapi_init_arg gssrpc_xdr_authgssapi_init_arg
  98. #define xdr_authgssapi_init_res gssrpc_xdr_authgssapi_init_res
  99. #define auth_gssapi_wrap_data gssrpc_auth_gssapi_wrap_data
  100. #define auth_gssapi_unwrap_data gssrpc_auth_gssapi_unwrap_data
  101. #define auth_gssapi_create gssrpc_auth_gssapi_create
  102. #define auth_gssapi_create_default gssrpc_auth_gssapi_create_default
  103. #define auth_gssapi_display_status gssrpc_auth_gssapi_display_status
  104. #define auth_gssapi_seal_seq gssrpc_auth_gssapi_seal_seq
  105. #define auth_gssapi_unseal_seq gssrpc_auth_gssapi_unseal_seq
  106. #define svcauth_gssapi_set_names gssrpc_svcauth_gssapi_set_names
  107. #define svcauth_gssapi_unset_names gssrpc_svcauth_gssapi_unset_names
  108. #define svcauth_gssapi_set_log_badauth_func gssrpc_svcauth_gssapi_set_log_badauth_func
  109. #define svcauth_gssapi_set_log_badverf_func gssrpc_svcauth_gssapi_set_log_badverf_func
  110. #define svcauth_gssapi_set_log_miscerr_func gssrpc_svcauth_gssapi_set_log_miscerr_func
  111. #define svcauth_gss_set_log_badauth_func gssrpc_svcauth_gss_set_log_badauth_func
  112. #define svcauth_gss_set_log_badverf_func gssrpc_svcauth_gss_set_log_badverf_func
  113. #define svcauth_gss_set_log_miscerr_func gssrpc_svcauth_gss_set_log_miscerr_func
  114. /* auth_unix.h */
  115. #define xdr_authunix_parms gssrpc_xdr_authunix_parms
  116. /* clnt.h */
  117. #define clntraw_create gssrpc_clntraw_create
  118. #define clnt_create gssrpc_clnt_create
  119. #define clnttcp_create gssrpc_clnttcp_create
  120. #define clntudp_create gssrpc_clntudp_create
  121. #define clntudp_bufcreate gssrpc_clntudp_bufcreate
  122. #define clnt_pcreateerror gssrpc_clnt_pcreateerror
  123. #define clnt_spcreateerror gssrpc_clnt_spcreateerror
  124. #define clnt_perrno gssrpc_clnt_perrno
  125. #define clnt_perror gssrpc_clnt_perror
  126. #define clnt_sperror gssrpc_clnt_sperror
  127. /* XXX do we need to rename the struct? */
  128. #define rpc_createerr gssrpc_rpc_createrr
  129. #define clnt_sperrno gssrpc_clnt_sperrno
  130. /* pmap_clnt.h */
  131. #define pmap_set gssrpc_pmap_set
  132. #define pmap_unset gssrpc_pmap_unset
  133. #define pmap_getmaps gssrpc_pmap_getmaps
  134. #define pmap_rmtcall gssrpc_pmap_rmtcall
  135. #define clnt_broadcast gssrpc_clnt_broadcast
  136. #define pmap_getport gssrpc_pmap_getport
  137. /* pmap_prot.h */
  138. #define xdr_pmap gssrpc_xdr_pmap
  139. #define xdr_pmaplist gssrpc_xdr_pmaplist
  140. /* pmap_rmt.h */
  141. #define xdr_rmtcall_args gssrpc_xdr_rmtcall_args
  142. #define xdr_rmtcallres gssrpc_xdr_rmtcallres
  143. /* rpc.h */
  144. #define get_myaddress gssrpc_get_myaddress
  145. #define bindresvport gssrpc_bindresvport
  146. #define callrpc gssrpc_callrpc
  147. #define getrpcport gssrpc_getrpcport
  148. #if 0
  149. #define gssrpc__rpc_getdtablesize _rpc_getdtablesize
  150. #endif
  151. /* rpc_msg.h */
  152. #define xdr_callmsg gssrpc_xdr_callmsg
  153. #define xdr_callhdr gssrpc_xdr_callhdr
  154. #define xdr_replymsg gssrpc_xdr_replymsg
  155. #define xdr_accepted_reply gssrpc_xdr_accepted_reply
  156. #define xdr_rejected_reply gssrpc_xdr_rejected_reply
  157. #if 0
  158. #define gssrpc__seterr_reply _seterr_reply
  159. #endif
  160. /* svc.h */
  161. #define svc_register gssrpc_svc_register
  162. #define registerrpc gssrpc_registerrpc
  163. #define svc_unregister gssrpc_svc_unregister
  164. #define xprt_register gssrpc_xprt_register
  165. #define xprt_unregister gssrpc_xprt_unregister
  166. #define svc_sendreply gssrpc_svc_sendreply
  167. #define svcerr_decode gssrpc_svcerr_decode
  168. #define svcerr_weakauth gssrpc_svcerr_weakauth
  169. #define svcerr_noproc gssrpc_svcerr_noproc
  170. #define svcerr_progvers gssrpc_svcerr_progvers
  171. #define svcerr_auth gssrpc_svcerr_auth
  172. #define svcerr_noprog gssrpc_svcerr_noprog
  173. #define svcerr_systemerr gssrpc_svcerr_systemerr
  174. #define svc_maxfd gssrpc_svc_maxfd
  175. #define svc_fdset gssrpc_svc_fdset
  176. #define svc_fds gssrpc_svc_fds
  177. #define rpctest_service gssrpc_rpctest_service
  178. #define svc_getreq gssrpc_svc_getreq
  179. #define svc_getreqset gssrpc_svc_getreqset
  180. #define svc_getreqset2 gssrpc_svc_getreqset2
  181. #define svc_run gssrpc_svc_run
  182. #define svcraw_create gssrpc_svcraw_create
  183. #define svcudp_create gssrpc_svcudp_create
  184. #define svcudp_bufcreate gssrpc_svcudp_bufcreate
  185. #define svcudp_enablecache gssrpc_svcudp_enablecache
  186. #define svctcp_create gssrpc_svctcp_create
  187. #define svcfd_create gssrpc_svcfd_create
  188. /* svc_auth.h */
  189. #define svc_auth_none_ops gssrpc_svc_auth_none_ops
  190. #define svc_auth_gssapi_ops gssrpc_svc_auth_gssapi_ops
  191. #define svc_auth_gss_ops gssrpc_svc_auth_gss_ops
  192. #define svcauth_gss_set_svc_name gssrpc_svcauth_gss_set_svc_name
  193. #define svcauth_gss_get_principal gssrpc_svcauth_gss_get_principal
  194. #if 0
  195. #define gssrpc__authenticate _authenticate
  196. #define gssrpc__svcauth_none _svcauth_none
  197. #define gssrpc__svcauth_unix _svcauth_unix
  198. #define gssrpc__svcauth_short _svcauth_short
  199. #define gssrpc__svcauth_gssapi _svcauth_gssapi
  200. #define gssrpc__svcauth_gss _svcauth_gss
  201. #endif
  202. /* svc_auth_gss.c */
  203. #define svc_debug_gss gssrpc_svc_debug_gss
  204. #define svcauth_gss_creds gssrpc_svc_auth_gss_creds
  205. /* svc_auth_gssapi.c */
  206. #define svc_debug_gssapi gssrpc_svc_debug_gssapi
  207. /* svc_auth_none.c */
  208. #define svc_auth_none gssrpc_svc_auth_none
  209. /* xdr.h */
  210. #define xdr_void gssrpc_xdr_void
  211. #define xdr_int gssrpc_xdr_int
  212. #define xdr_u_int gssrpc_xdr_u_int
  213. #define xdr_long gssrpc_xdr_long
  214. #define xdr_u_long gssrpc_xdr_u_long
  215. #define xdr_short gssrpc_xdr_short
  216. #define xdr_u_short gssrpc_xdr_u_short
  217. #define xdr_bool gssrpc_xdr_bool
  218. #define xdr_enum gssrpc_xdr_enum
  219. #define xdr_array gssrpc_xdr_array
  220. #define xdr_bytes gssrpc_xdr_bytes
  221. #define xdr_opaque gssrpc_xdr_opaque
  222. #define xdr_string gssrpc_xdr_string
  223. #define xdr_union gssrpc_xdr_union
  224. #define xdr_char gssrpc_xdr_char
  225. #define xdr_u_char gssrpc_xdr_u_char
  226. #define xdr_vector gssrpc_xdr_vector
  227. #define xdr_float gssrpc_xdr_float
  228. #define xdr_double gssrpc_xdr_double
  229. #define xdr_reference gssrpc_xdr_reference
  230. #define xdr_pointer gssrpc_xdr_pointer
  231. #define xdr_wrapstring gssrpc_xdr_wrapstring
  232. #define xdr_free gssrpc_xdr_free
  233. #define xdr_sizeof gssrpc_xdr_sizeof
  234. #define xdr_netobj gssrpc_xdr_netobj
  235. #define xdr_int32 gssrpc_xdr_int32
  236. #define xdr_u_int32 gssrpc_xdr_u_int32
  237. #define xdralloc_create gssrpc_xdralloc_create
  238. #define xdralloc_release gssrpc_xdralloc_release
  239. #define xdralloc_getdata gssrpc_xdralloc_getdata
  240. #define xdrmem_create gssrpc_xdrmem_create
  241. #define xdrstdio_create gssrpc_xdrstdio_create
  242. #define xdrrec_create gssrpc_xdrrec_create
  243. #define xdrrec_endofrecord gssrpc_xdrrec_endofrecord
  244. #define xdrrec_skiprecord gssrpc_xdrrec_skiprecord
  245. #define xdrrec_eof gssrpc_xdrrec_eof
  246. #endif /* !defined(GSSRPC_RENAME_H) */