Home | History | Annotate | Line # | Download | only in rpc
svc_soc.h revision 1.4
      1  1.4  dholland /*	$NetBSD: svc_soc.h,v 1.4 2016/01/23 02:34:09 dholland Exp $	*/
      2  1.1      fvdl 
      3  1.1      fvdl /*
      4  1.1      fvdl  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
      5  1.1      fvdl  * unrestricted use provided that this legend is included on all tape
      6  1.1      fvdl  * media and as a part of the software program in whole or part.  Users
      7  1.1      fvdl  * may copy or modify Sun RPC without charge, but are not authorized
      8  1.1      fvdl  * to license or distribute it to anyone else except as part of a product or
      9  1.1      fvdl  * program developed by the user.
     10  1.1      fvdl  *
     11  1.1      fvdl  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
     12  1.1      fvdl  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
     13  1.1      fvdl  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
     14  1.1      fvdl  *
     15  1.1      fvdl  * Sun RPC is provided with no support and without any obligation on the
     16  1.1      fvdl  * part of Sun Microsystems, Inc. to assist in its use, correction,
     17  1.1      fvdl  * modification or enhancement.
     18  1.1      fvdl  *
     19  1.1      fvdl  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
     20  1.1      fvdl  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
     21  1.1      fvdl  * OR ANY PART THEREOF.
     22  1.1      fvdl  *
     23  1.1      fvdl  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
     24  1.1      fvdl  * or profits or other special, indirect and consequential damages, even if
     25  1.1      fvdl  * Sun has been advised of the possibility of such damages.
     26  1.1      fvdl  *
     27  1.1      fvdl  * Sun Microsystems, Inc.
     28  1.1      fvdl  * 2550 Garcia Avenue
     29  1.1      fvdl  * Mountain View, California  94043
     30  1.1      fvdl  */
     31  1.1      fvdl /*
     32  1.1      fvdl  * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
     33  1.1      fvdl  */
     34  1.1      fvdl 
     35  1.1      fvdl /*
     36  1.1      fvdl  * svc.h, Server-side remote procedure call interface.
     37  1.1      fvdl  */
     38  1.1      fvdl 
     39  1.1      fvdl #ifndef _RPC_SVC_SOC_H
     40  1.1      fvdl #define _RPC_SVC_SOC_H
     41  1.1      fvdl #include <sys/cdefs.h>
     42  1.1      fvdl 
     43  1.1      fvdl /* #pragma ident   "@(#)svc_soc.h  1.11    94/04/25 SMI" */
     44  1.1      fvdl /*      svc_soc.h 1.8 89/05/01 SMI      */
     45  1.1      fvdl 
     46  1.1      fvdl /*
     47  1.1      fvdl  * All the following declarations are only for backward compatibility
     48  1.1      fvdl  * with TS-RPC
     49  1.1      fvdl  */
     50  1.1      fvdl 
     51  1.1      fvdl /*
     52  1.1      fvdl  *  Approved way of getting address of caller
     53  1.1      fvdl  */
     54  1.1      fvdl #define svc_getcaller(x) (&(x)->xp_raddr)
     55  1.1      fvdl 
     56  1.1      fvdl /*
     57  1.1      fvdl  * Service registration
     58  1.1      fvdl  *
     59  1.1      fvdl  * svc_register(xprt, prog, vers, dispatch, protocol)
     60  1.1      fvdl  *	SVCXPRT *xprt;
     61  1.3  dholland  *	unsigned long prog;
     62  1.3  dholland  *	unsigned long vers;
     63  1.1      fvdl  *	void (*dispatch)();
     64  1.1      fvdl  *	int protocol;    like TCP or UDP, zero means do not register
     65  1.1      fvdl  */
     66  1.1      fvdl __BEGIN_DECLS
     67  1.3  dholland extern bool_t	svc_register(SVCXPRT *, unsigned long, unsigned long,
     68  1.2     perry 		    void (*)(struct svc_req *, SVCXPRT *), int);
     69  1.1      fvdl __END_DECLS
     70  1.1      fvdl 
     71  1.1      fvdl /*
     72  1.1      fvdl  * Service un-registration
     73  1.1      fvdl  *
     74  1.1      fvdl  * svc_unregister(prog, vers)
     75  1.3  dholland  *	unsigned long prog;
     76  1.3  dholland  *	unsigned long vers;
     77  1.1      fvdl  */
     78  1.1      fvdl __BEGIN_DECLS
     79  1.3  dholland extern void	svc_unregister(unsigned long, unsigned long);
     80  1.1      fvdl __END_DECLS
     81  1.1      fvdl 
     82  1.1      fvdl 
     83  1.1      fvdl /*
     84  1.1      fvdl  * Memory based rpc for testing and timing.
     85  1.1      fvdl  */
     86  1.1      fvdl __BEGIN_DECLS
     87  1.2     perry extern SVCXPRT *svcraw_create(void);
     88  1.1      fvdl __END_DECLS
     89  1.1      fvdl 
     90  1.1      fvdl 
     91  1.1      fvdl /*
     92  1.1      fvdl  * Udp based rpc.
     93  1.1      fvdl  */
     94  1.1      fvdl __BEGIN_DECLS
     95  1.2     perry extern SVCXPRT *svcudp_create(int);
     96  1.4  dholland extern SVCXPRT *svcudp_bufcreate(int, unsigned int, unsigned int);
     97  1.3  dholland extern int svcudp_enablecache(SVCXPRT *, unsigned long);
     98  1.1      fvdl __END_DECLS
     99  1.1      fvdl 
    100  1.1      fvdl 
    101  1.1      fvdl /*
    102  1.1      fvdl  * Tcp based rpc.
    103  1.1      fvdl  */
    104  1.1      fvdl __BEGIN_DECLS
    105  1.4  dholland extern SVCXPRT *svctcp_create(int, unsigned int, unsigned int);
    106  1.1      fvdl __END_DECLS
    107  1.1      fvdl 
    108  1.1      fvdl /*
    109  1.1      fvdl  * Fd based rpc.
    110  1.1      fvdl  */
    111  1.1      fvdl __BEGIN_DECLS
    112  1.4  dholland extern SVCXPRT *svcfd_create(int, unsigned int, unsigned int);
    113  1.1      fvdl __END_DECLS
    114  1.1      fvdl 
    115  1.1      fvdl #endif /* !_RPC_SVC_SOC_H */
    116