3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
[unleashed.git] / usr / src / uts / common / rpc / svc_soc.h
blobf22803d3d64b25412e1bee287396774fe05ba4b8
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
29 * Portions of this source code were derived from Berkeley
30 * 4.3 BSD under license from the Regents of the University of
31 * California.
35 * svc_soc.h, Server-side remote procedure call interface.
37 * All the following declarations are only for backward compatibility
38 * with SUNOS 4.0.
41 #ifndef _RPC_SVC_SOC_H
42 #define _RPC_SVC_SOC_H
44 #pragma ident "%Z%%M% %I% %E% SMI"
46 #ifndef _KERNEL
48 #include <sys/socket.h>
49 #include <netinet/in.h>
50 #include <rpc/svc.h>
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
57 * Approved way of getting address of caller
59 #define svc_getcaller(x) ((struct sockaddr_in *)(x)->xp_rtaddr.buf)
62 * Service registration and unregistration.
64 * svc_register(xprt, prog, vers, dispatch, protocol)
65 * svc_unregister(prog, vers);
67 #ifdef __STDC__
68 extern bool_t svc_register(SVCXPRT *, rpcprog_t, rpcvers_t,
69 void (*)(struct svc_req *, SVCXPRT *), int);
70 extern void svc_unregister(rpcprog_t, rpcvers_t);
73 * Memory based rpc for testing and timing.
75 extern SVCXPRT *svcraw_create(void);
78 * Udp based rpc. For compatibility reasons
80 extern SVCXPRT *svcudp_create(int);
81 extern SVCXPRT *svcudp_bufcreate(int, uint_t, uint_t);
84 * Tcp based rpc.
86 extern SVCXPRT *svctcp_create(int, uint_t, uint_t);
87 extern SVCXPRT *svcfd_create(int, uint_t, uint_t);
90 * For connectionless kind of transport. Obsoleted by rpc_reg()
92 * registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
93 * rpcprog_t prognum;
94 * rpcvers_t versnum;
95 * rpcproc_t procnum;
96 * char *(*progname)();
97 * xdrproc_t inproc, outproc;
99 extern int registerrpc(rpcprog_t, rpcvers_t, rpcproc_t, char *(*)(),
100 xdrproc_t, xdrproc_t);
101 #else /* __STDC__ */
102 extern bool_t svc_register();
103 extern void svc_unregister();
104 extern SVCXPRT *svcraw_create();
105 extern SVCXPRT *svcudp_create();
106 extern SVCXPRT *svcudp_bufcreate();
107 extern SVCXPRT *svctcp_create();
108 extern SVCXPRT *svcfd_create();
109 extern int registerrpc();
110 #endif /* __STDC__ */
112 #ifdef __cplusplus
114 #endif
115 #endif /* _KERNEL */
117 #endif /* !_RPC_SVC_SOC_H */