2 * Copyright (c) 2010, Linux Box Corporation.
5 * Portions Copyright (c) 2007, Hartmut Reuter,
6 * RZG, Max-Planck-Institut f. Plasmaphysik.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef _RPC_TEST_PROCS_H
32 #define _RPC_TEST_PROCS_H
34 #include <afsconfig.h>
35 #include <afs/param.h>
38 #include <afs/afsutil.h>
41 #include <afs/afs_consts.h>
42 #include <afs/afsint.h>
43 #define FSINT_COMMON_XG 1
44 #include <afs/afscbint.h>
47 #define RPC_TEST_REQ_CTX_FLAG_NONE 0x0000
48 #define RPC_TEST_REQ_CTX_FLAG_XCB 0x0001
50 typedef struct rpc_test_request_ctx
{
55 char cb_svc_name
[256];
57 char cb_listen_addr_s
[256];
58 char cb_prefix_s
[256];
60 interfaceAddr cb_listen_addr
;
61 interfaceAddr fs_addr
;
65 struct rx_connection
*conn
;
66 struct rx_securityClass
*sc
;
67 struct rx_service
*svc
; /* until rx fixes client socket mgmt */
71 } rpc_test_request_ctx
;
74 #define CTX_FOR_RXCALL(call) \
75 (rx_GetServiceSpecific((rx_ServiceOf(rx_ConnectionOf(call))), ctx_key))
77 afs_int32
rpc_test_PkgInit(void);
78 void rpc_test_PkgShutdown(void);
80 /* call channel, callback RPC server multiplexing */
81 afs_int32
init_fs_channel(rpc_test_request_ctx
**ctx
/* out */, char *cb_if
,
82 char *listen_addr_s
, char *prefix
, char *fs_addr_s
, afs_uint32 flags
);
83 afs_int32
destroy_fs_channel(rpc_test_request_ctx
*ctx
);
85 /* test proc wrappers */
86 afs_int32
rpc_test_fetch_status(void);
87 afs_int32
rpc_test_afs_fetch_status(rpc_test_request_ctx
*ctx
, AFSFid
*fid
,
88 AFSFetchStatus
*outstatus
);
89 #if defined(AFS_BYTE_RANGE_FLOCKS) /* when will then be now? soon. */
90 afs_int32
rpc_test_afs_set_byterangelock(rpc_test_request_ctx
*ctx
,
91 AFSByteRangeLock
* Lock
);
92 afs_int32
rpc_test_afs_release_byterangelock(rpc_test_request_ctx
*ctx
,
93 AFSByteRangeLock
* Lock
);
94 afs_int32
rpc_test_afs_upgrade_byterangelock(rpc_test_request_ctx
*ctx
,
95 AFSByteRangeLock
* Lock
);
96 afs_int32
rpc_test_afs_downgrade_byterangelock(rpc_test_request_ctx
*ctx
,
97 AFSByteRangeLock
* Lock
);
98 #endif /* AFS_BYTE_RANGE_FLOCKS */
100 afs_int32
rpc_test_afs_store_status(rpc_test_request_ctx
*ctx
, AFSFid
*fid
,
101 AFSStoreStatus
*instatus
, AFSFetchStatus
*outstatus
);
102 afs_int32
rpc_test_afs_storedata_range(rpc_test_request_ctx
*ctx
, AFSFid
*fid
,
105 #endif /* _RPC_TEST_PROCS_H */