(root)/
glibc-2.38/
include/
rpc/
rpc.h
       1  #ifndef _RPC_RPC_H
       2  #include <sunrpc/rpc/rpc.h>
       3  
       4  # ifndef _ISOMAC
       5  
       6  #include <libc-tsd.h>
       7  
       8  /* Now define the internal interfaces.  */
       9  extern unsigned long _create_xid (void);
      10  
      11  /*
      12   * Multi-threaded support
      13   * Group all global and static variables into a single spot.
      14   * This area is allocated on a per-thread basis
      15   */
      16  struct rpc_thread_variables {
      17  	fd_set		svc_fdset_s;		/* Global, rpc_common.c */
      18  	struct rpc_createerr rpc_createerr_s;	/* Global, rpc_common.c */
      19  	struct pollfd	*svc_pollfd_s;		/* Global, rpc_common.c */
      20  	int		svc_max_pollfd_s;	/* Global, rpc_common.c */
      21  
      22  	char		*clnt_perr_buf_s;	/* clnt_perr.c */
      23  
      24  	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
      25  
      26  	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
      27  
      28  	struct key_call_private *key_call_private_s;	/* key_call.c */
      29  
      30  	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
      31  	int		*authdes_lru_s;		/* svcauth_des.c */
      32  
      33  	SVCXPRT		**svc_xports_s;		/* svc.c */
      34  	struct svc_callout *svc_head_s;		/* svc.c */
      35  
      36  	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
      37  
      38  	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
      39  	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
      40  };
      41  
      42  extern struct rpc_thread_variables *__rpc_thread_variables(void)
      43       __attribute__ ((const)) attribute_hidden;
      44  extern void __rpc_thread_svc_cleanup (void) attribute_hidden;
      45  extern void __rpc_thread_clnt_cleanup (void) attribute_hidden;
      46  extern void __rpc_thread_key_cleanup (void) attribute_hidden;
      47  
      48  extern void __rpc_thread_destroy (void) attribute_hidden;
      49  
      50  __libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS)
      51  
      52  #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
      53  
      54  libc_hidden_proto (__rpc_thread_svc_max_pollfd)
      55  libc_hidden_proto (__rpc_thread_svc_pollfd)
      56  libc_hidden_proto (__rpc_thread_svc_fdset)
      57  libc_hidden_proto (__rpc_thread_createerr)
      58  
      59  /* Perform a host name lookup for NAME and return the first IPv4
      60     address in *ADDR.  Return 0 on success and -1 on error (and set an
      61     RPC error).  */
      62  int __libc_rpc_gethostbyname (const char *host, struct sockaddr_in *addr)
      63    attribute_hidden;
      64  
      65  # endif /* !_ISOMAC */
      66  #endif