ReactOS 0.4.15-dev-8428-g6910fa6
rpc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009, Sun Microsystems, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * - Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 * - Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12 * - Neither the name of Sun Microsystems, Inc. nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * rpc.h, Just includes the billions of rpc header files necessary to
31 * do remote procedure calling.
32 *
33 * Copyright (C) 1984, Sun Microsystems, Inc.
34 */
35#ifndef _TIRPC_RPC_H
36#define _TIRPC_RPC_H
37
38#include <rpc/types.h> /* some typedefs */
39#include "winsock2.h"
40//#include <sys/socket.h>
41//#include <netinet/in.h>
42
43/* external data representation interfaces */
44#include <rpc/xdr.h> /* generic (de)serializer */
45
46/* Client side only authentication */
47#include <rpc/auth.h> /* generic authenticator (client side) */
48
49/* Client side (mostly) remote procedure call */
50#include <rpc/clnt.h> /* generic rpc stuff */
51
52/* semi-private protocol headers */
53#include <rpc/rpc_msg.h> /* protocol for rpc messages */
54#include <rpc/auth_unix.h> /* protocol for unix style cred */
55
56/*
57 * Uncomment-out the next line if you are building the rpc library with
58 * DES Authentication (see the README file in the secure_rpc/ directory).
59 */
60#include <rpc/auth_des.h> /* protocol for des style cred */
61
62#ifdef HAVE_RPCSEC_GSS
63#include <rpc/auth_gss.h> /* RPCSEC_GSS */
64#endif
65
66/* Server side only remote procedure callee */
67#include <rpc/svc_auth.h> /* service side authenticator */
68#include <rpc/svc.h> /* service manager and multiplexer */
69
70/* Portmapper client, server, and protocol headers */
71#include <rpc/pmap_clnt.h>
72#include <rpc/pmap_prot.h>
73
74#ifndef _KERNEL
75#include <rpc/rpcb_clnt.h> /* rpcbind interface functions */
76#endif
77#include <rpc/rpcent.h>
78
79#ifndef UDPMSGSIZE
80#define UDPMSGSIZE 8800
81#endif
82
84extern int get_myaddress(struct sockaddr_in *);
85extern int bindresvport(SOCKET, struct sockaddr_in *) __THROW;
86extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
88extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
89 xdrproc_t , void *);
90extern int getrpcport(char *, int, int, int);
91
92char *taddr2uaddr(const struct netconfig *, const struct netbuf *);
93struct netbuf *uaddr2taddr(const struct netconfig *, const char *);
94
95void freeuaddr(char *); /* free memory allocated by taddr2uaddr */
96void freenetbuf(struct netbuf *); /* free memory allocated by uaddr2taddr */
97
98struct sockaddr;
99extern int bindresvport_sa(SOCKET, struct sockaddr *);
101
102/*
103 * The following are not exported interfaces, they are for internal library
104 * and rpcbind use only. Do not use, they may change without notice.
105 */
107SOCKET __rpc_nconf2fd(const struct netconfig *);
108int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
110u_int __rpc_get_t_size(int, int, int);
112
113#endif /* !_RPC_RPC_H */
char * taddr2uaddr(const struct netconfig *, const struct netbuf *)
Definition: rpc_generic.c:609
int callrpc(const char *, int, int, int, xdrproc_t, void *, xdrproc_t, void *)
int __rpc_fd2sockinfo(SOCKET, struct __rpc_sockinfo *)
Definition: rpc_generic.c:481
int bindresvport_sa(SOCKET, struct sockaddr *)
Definition: bindresvport.c:161
u_int __rpc_get_t_size(int, int, int)
Definition: rpc_generic.c:139
int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *)
Definition: rpc_generic.c:540
int bindresvport(SOCKET, struct sockaddr_in *) __THROW
Definition: bindresvport.c:53
__BEGIN_DECLS int get_myaddress(struct sockaddr_in *)
void freeuaddr(char *)
Definition: rpc_generic.c:628
void freenetbuf(struct netbuf *)
Definition: rpc_generic.c:633
struct netbuf * uaddr2taddr(const struct netconfig *, const char *)
Definition: rpc_generic.c:619
__END_DECLS __BEGIN_DECLS SOCKET __rpc_nconf2fd(const struct netconfig *)
Definition: rpc_generic.c:562
#define UDPMSGSIZE
Definition: rpc.h:80
int registerrpc(int, int, int, char *(*)(char[UDPMSGSIZE]), xdrproc_t, xdrproc_t)
int getrpcport(char *, int, int, int)
Definition: getrpcport.c:47
UINT32 u_int
Definition: types.h:82
Definition: types.h:144
UINT_PTR SOCKET
Definition: winsock.h:47
#define __END_DECLS
Definition: wintirpc.h:63
#define __BEGIN_DECLS
Definition: wintirpc.h:62
#define __THROW
Definition: wintirpc.h:64
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144