|
||||
File indexing completed on 2025-01-18 10:13:02
0001 /* $NetBSD: svc_soc.h,v 1.1 2000/06/02 22:57:57 fvdl Exp $ */ 0002 /* $FreeBSD: src/include/rpc/svc_soc.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */ 0003 0004 /* 0005 * Copyright (c) 2009, Sun Microsystems, Inc. 0006 * All rights reserved. 0007 * 0008 * Redistribution and use in source and binary forms, with or without 0009 * modification, are permitted provided that the following conditions are met: 0010 * - Redistributions of source code must retain the above copyright notice, 0011 * this list of conditions and the following disclaimer. 0012 * - Redistributions in binary form must reproduce the above copyright notice, 0013 * this list of conditions and the following disclaimer in the documentation 0014 * and/or other materials provided with the distribution. 0015 * - Neither the name of Sun Microsystems, Inc. nor the names of its 0016 * contributors may be used to endorse or promote products derived 0017 * from this software without specific prior written permission. 0018 * 0019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0021 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 0023 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0024 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0025 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0026 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0027 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0028 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0029 * POSSIBILITY OF SUCH DAMAGE. 0030 */ 0031 /* 0032 * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 0033 */ 0034 0035 /* 0036 * svc.h, Server-side remote procedure call interface. 0037 */ 0038 0039 #ifndef _RPC_SVC_SOC_H 0040 #define _RPC_SVC_SOC_H 0041 0042 /* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */ 0043 /* svc_soc.h 1.8 89/05/01 SMI */ 0044 0045 /* 0046 * All the following declarations are only for backward compatibility 0047 * with TS-RPC 0048 */ 0049 0050 /* 0051 * Approved way of getting address of caller 0052 */ 0053 #define svc_getcaller(x) (&(x)->xp_raddr) 0054 /* Getting address of a caller using netbuf xp_rtaddr */ 0055 #define svc_getcaller_netbuf(x) (&(x)->xp_rtaddr) 0056 /* 0057 * Service registration 0058 * 0059 * svc_register(xprt, prog, vers, dispatch, protocol) 0060 * SVCXPRT *xprt; 0061 * u_long prog; 0062 * u_long vers; 0063 * void (*dispatch)(); 0064 * int protocol; like TCP or UDP, zero means do not register 0065 */ 0066 #ifdef __cplusplus 0067 extern "C" { 0068 #endif 0069 extern bool_t svc_register(SVCXPRT *, u_long, u_long, 0070 void (*)(struct svc_req *, SVCXPRT *), int); 0071 #ifdef __cplusplus 0072 } 0073 #endif 0074 0075 /* 0076 * Service un-registration 0077 * 0078 * svc_unregister(prog, vers) 0079 * u_long prog; 0080 * u_long vers; 0081 */ 0082 #ifdef __cplusplus 0083 extern "C" { 0084 #endif 0085 extern void svc_unregister(u_long, u_long); 0086 #ifdef __cplusplus 0087 } 0088 #endif 0089 0090 0091 /* 0092 * Memory based rpc for testing and timing. 0093 */ 0094 #ifdef __cplusplus 0095 extern "C" { 0096 #endif 0097 extern SVCXPRT *svcraw_create(void); 0098 #ifdef __cplusplus 0099 } 0100 #endif 0101 0102 0103 /* 0104 * Udp based rpc. 0105 */ 0106 #ifdef __cplusplus 0107 extern "C" { 0108 #endif 0109 extern SVCXPRT *svcudp_create(int); 0110 extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int); 0111 extern int svcudp_enablecache(SVCXPRT *, u_long); 0112 extern SVCXPRT *svcudp6_create(int); 0113 extern SVCXPRT *svcudp6_bufcreate(int, u_int, u_int); 0114 #ifdef __cplusplus 0115 } 0116 #endif 0117 0118 0119 /* 0120 * Tcp based rpc. 0121 */ 0122 #ifdef __cplusplus 0123 extern "C" { 0124 #endif 0125 extern SVCXPRT *svctcp_create(int, u_int, u_int); 0126 extern SVCXPRT *svctcp6_create(int, u_int, u_int); 0127 #ifdef __cplusplus 0128 } 0129 #endif 0130 0131 /* 0132 * Fd based rpc. 0133 */ 0134 #ifdef __cplusplus 0135 extern "C" { 0136 #endif 0137 extern SVCXPRT *svcfd_create(int, u_int, u_int); 0138 #ifdef __cplusplus 0139 } 0140 #endif 0141 0142 #endif /* !_RPC_SVC_SOC_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |