Home | History | Annotate | Line # | Download | only in rpcbind
rpcbind.h revision 1.1.4.2
      1  1.1.4.2  minoura /*	$NetBSD: rpcbind.h,v 1.1.4.2 2000/06/22 18:01:12 minoura Exp $	*/
      2  1.1.4.2  minoura 
      3  1.1.4.2  minoura /*
      4  1.1.4.2  minoura  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
      5  1.1.4.2  minoura  * unrestricted use provided that this legend is included on all tape
      6  1.1.4.2  minoura  * media and as a part of the software program in whole or part.  Users
      7  1.1.4.2  minoura  * may copy or modify Sun RPC without charge, but are not authorized
      8  1.1.4.2  minoura  * to license or distribute it to anyone else except as part of a product or
      9  1.1.4.2  minoura  * program developed by the user.
     10  1.1.4.2  minoura  *
     11  1.1.4.2  minoura  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
     12  1.1.4.2  minoura  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
     13  1.1.4.2  minoura  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
     14  1.1.4.2  minoura  *
     15  1.1.4.2  minoura  * Sun RPC is provided with no support and without any obligation on the
     16  1.1.4.2  minoura  * part of Sun Microsystems, Inc. to assist in its use, correction,
     17  1.1.4.2  minoura  * modification or enhancement.
     18  1.1.4.2  minoura  *
     19  1.1.4.2  minoura  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
     20  1.1.4.2  minoura  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
     21  1.1.4.2  minoura  * OR ANY PART THEREOF.
     22  1.1.4.2  minoura  *
     23  1.1.4.2  minoura  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
     24  1.1.4.2  minoura  * or profits or other special, indirect and consequential damages, even if
     25  1.1.4.2  minoura  * Sun has been advised of the possibility of such damages.
     26  1.1.4.2  minoura  *
     27  1.1.4.2  minoura  * Sun Microsystems, Inc.
     28  1.1.4.2  minoura  * 2550 Garcia Avenue
     29  1.1.4.2  minoura  * Mountain View, California  94043
     30  1.1.4.2  minoura  */
     31  1.1.4.2  minoura /*
     32  1.1.4.2  minoura  * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
     33  1.1.4.2  minoura  */
     34  1.1.4.2  minoura 
     35  1.1.4.2  minoura /* #ident	"@(#)rpcbind.h 1.4 90/04/12 SMI" */
     36  1.1.4.2  minoura 
     37  1.1.4.2  minoura /*
     38  1.1.4.2  minoura  * rpcbind.h
     39  1.1.4.2  minoura  * The common header declarations
     40  1.1.4.2  minoura  */
     41  1.1.4.2  minoura 
     42  1.1.4.2  minoura #ifndef rpcbind_h
     43  1.1.4.2  minoura #define	rpcbind_h
     44  1.1.4.2  minoura 
     45  1.1.4.2  minoura #ifdef PORTMAP
     46  1.1.4.2  minoura #include <rpc/pmap_prot.h>
     47  1.1.4.2  minoura #endif
     48  1.1.4.2  minoura #include <rpc/rpcb_prot.h>
     49  1.1.4.2  minoura 
     50  1.1.4.2  minoura /*
     51  1.1.4.2  minoura  * Stuff for the rmtcall service
     52  1.1.4.2  minoura  */
     53  1.1.4.2  minoura struct encap_parms {
     54  1.1.4.2  minoura 	u_int32_t arglen;
     55  1.1.4.2  minoura 	char *args;
     56  1.1.4.2  minoura };
     57  1.1.4.2  minoura 
     58  1.1.4.2  minoura struct r_rmtcall_args {
     59  1.1.4.2  minoura 	u_int32_t  rmt_prog;
     60  1.1.4.2  minoura 	u_int32_t  rmt_vers;
     61  1.1.4.2  minoura 	u_int32_t  rmt_proc;
     62  1.1.4.2  minoura 	int     rmt_localvers;  /* whether to send port # or uaddr */
     63  1.1.4.2  minoura 	char    *rmt_uaddr;
     64  1.1.4.2  minoura 	struct encap_parms rmt_args;
     65  1.1.4.2  minoura };
     66  1.1.4.2  minoura 
     67  1.1.4.2  minoura extern int debugging;
     68  1.1.4.2  minoura extern int doabort;
     69  1.1.4.2  minoura extern int verboselog;
     70  1.1.4.2  minoura extern int insecure;
     71  1.1.4.2  minoura extern int oldstyle_local;
     72  1.1.4.2  minoura extern rpcblist_ptr list_rbl;	/* A list of version 3 & 4 rpcbind services */
     73  1.1.4.2  minoura 
     74  1.1.4.2  minoura #ifdef PORTMAP
     75  1.1.4.2  minoura extern struct pmaplist *list_pml; /* A list of version 2 rpcbind services */
     76  1.1.4.2  minoura extern char *udptrans;		/* Name of UDP transport */
     77  1.1.4.2  minoura extern char *tcptrans;		/* Name of TCP transport */
     78  1.1.4.2  minoura extern char *udp_uaddr;		/* Universal UDP address */
     79  1.1.4.2  minoura extern char *tcp_uaddr;		/* Universal TCP address */
     80  1.1.4.2  minoura #endif
     81  1.1.4.2  minoura 
     82  1.1.4.2  minoura int add_bndlist __P((struct netconfig *, struct netbuf *));
     83  1.1.4.2  minoura bool_t is_bound __P((char *, char *));
     84  1.1.4.2  minoura char *mergeaddr __P((SVCXPRT *, char *, char *, char *));
     85  1.1.4.2  minoura struct netconfig *rpcbind_get_conf __P((char *));
     86  1.1.4.2  minoura 
     87  1.1.4.2  minoura void rpcbs_init __P((void));
     88  1.1.4.2  minoura void rpcbs_procinfo __P((rpcvers_t, rpcproc_t));
     89  1.1.4.2  minoura void rpcbs_set __P((rpcvers_t, bool_t));
     90  1.1.4.2  minoura void rpcbs_unset __P((rpcvers_t, bool_t));
     91  1.1.4.2  minoura void rpcbs_getaddr __P((rpcvers_t, rpcprog_t, rpcvers_t, char *, char *));
     92  1.1.4.2  minoura void rpcbs_rmtcall __P((rpcvers_t, rpcproc_t, rpcprog_t, rpcvers_t, rpcproc_t,
     93  1.1.4.2  minoura 			char *, rpcblist_ptr));
     94  1.1.4.2  minoura void *rpcbproc_getstat __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
     95  1.1.4.2  minoura 
     96  1.1.4.2  minoura void rpcb_service_3 __P((struct svc_req *, SVCXPRT *));
     97  1.1.4.2  minoura void rpcb_service_4 __P((struct svc_req *, SVCXPRT *));
     98  1.1.4.2  minoura 
     99  1.1.4.2  minoura /* Common functions shared between versions */
    100  1.1.4.2  minoura void *rpcbproc_set_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
    101  1.1.4.2  minoura void *rpcbproc_unset_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
    102  1.1.4.2  minoura bool_t map_set __P((RPCB *, char *));
    103  1.1.4.2  minoura bool_t map_unset __P((RPCB *, char *));
    104  1.1.4.2  minoura void delete_prog __P((int));
    105  1.1.4.2  minoura void *rpcbproc_getaddr_com __P((RPCB *, struct svc_req *, SVCXPRT *, rpcvers_t,
    106  1.1.4.2  minoura 				 rpcvers_t));
    107  1.1.4.2  minoura void *rpcbproc_gettime_com __P((void *, struct svc_req *, SVCXPRT *,
    108  1.1.4.2  minoura 				rpcvers_t));
    109  1.1.4.2  minoura void *rpcbproc_uaddr2taddr_com __P((void *, struct svc_req *,
    110  1.1.4.2  minoura 					     SVCXPRT *, rpcvers_t));
    111  1.1.4.2  minoura void *rpcbproc_taddr2uaddr_com __P((void *, struct svc_req *, SVCXPRT *,
    112  1.1.4.2  minoura 				    rpcvers_t));
    113  1.1.4.2  minoura int create_rmtcall_fd __P((struct netconfig *));
    114  1.1.4.2  minoura void rpcbproc_callit_com __P((struct svc_req *, SVCXPRT *, rpcvers_t,
    115  1.1.4.2  minoura 			      rpcvers_t));
    116  1.1.4.2  minoura void my_svc_run __P((void));
    117  1.1.4.2  minoura 
    118  1.1.4.2  minoura void rpcbind_abort __P((void));
    119  1.1.4.2  minoura void reap __P((int));
    120  1.1.4.2  minoura void toggle_verboselog __P((int));
    121  1.1.4.2  minoura 
    122  1.1.4.2  minoura int check_access __P((SVCXPRT *, rpcproc_t, void *, int));
    123  1.1.4.2  minoura int check_callit __P((SVCXPRT *, struct r_rmtcall_args *, int));
    124  1.1.4.2  minoura void logit __P((int, struct sockaddr *, rpcproc_t, rpcprog_t, const char *));
    125  1.1.4.2  minoura int is_loopback __P((struct netbuf *));
    126  1.1.4.2  minoura 
    127  1.1.4.2  minoura #ifdef PORTMAP
    128  1.1.4.2  minoura extern void pmap_service __P((struct svc_req *, SVCXPRT *));
    129  1.1.4.2  minoura #endif
    130  1.1.4.2  minoura 
    131  1.1.4.2  minoura void write_warmstart __P((void));
    132  1.1.4.2  minoura void read_warmstart __P((void));
    133  1.1.4.2  minoura 
    134  1.1.4.2  minoura char *addrmerge __P((struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
    135  1.1.4.2  minoura 		     char *netid));
    136  1.1.4.2  minoura void network_init __P((void));
    137  1.1.4.2  minoura struct sockaddr *local_sa __P((int));
    138  1.1.4.2  minoura 
    139  1.1.4.2  minoura /* For different getaddr semantics */
    140  1.1.4.2  minoura #define	RPCB_ALLVERS 0
    141  1.1.4.2  minoura #define	RPCB_ONEVERS 1
    142  1.1.4.2  minoura 
    143  1.1.4.2  minoura #endif /* rpcbind_h */
    144