-
Notifications
You must be signed in to change notification settings - Fork 1
/
co.h
114 lines (94 loc) · 2.58 KB
/
co.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _CO_H_RPCGEN
#define _CO_H_RPCGEN
#include <rpc/rpc.h>
#include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CID_BUF 20
#define RW_BUF 1048576
struct co_write_in {
char chunkid[CID_BUF];
struct {
u_int buf_len;
char *buf_val;
} buf;
u_long offset;
uint32_t ip;
};
typedef struct co_write_in co_write_in;
struct co_write_out {
int err;
};
typedef struct co_write_out co_write_out;
struct co_read_in {
char chunkid[CID_BUF];
u_int size;
u_long offset;
};
typedef struct co_read_in co_read_in;
struct co_read_out {
struct {
u_int buf_len;
char *buf_val;
} buf;
int err;
};
typedef struct co_read_out co_read_out;
struct co_unlink_in {
char chunkid[CID_BUF];
};
typedef struct co_unlink_in co_unlink_in;
struct co_unlink_out {
int err;
};
typedef struct co_unlink_out co_unlink_out;
#define CO_PROG 0x31230002
#define CO_VERS 1
#if defined(__STDC__) || defined(__cplusplus)
#define co_write 1
extern enum clnt_stat co_write_1(co_write_in *, co_write_out *, CLIENT *);
extern bool_t co_write_1_svc(co_write_in *, co_write_out *, struct svc_req *);
#define co_read 2
extern enum clnt_stat co_read_1(co_read_in *, co_read_out *, CLIENT *);
extern bool_t co_read_1_svc(co_read_in *, co_read_out *, struct svc_req *);
#define co_unlink 3
extern enum clnt_stat co_unlink_1(co_unlink_in *, co_unlink_out *, CLIENT *);
extern bool_t co_unlink_1_svc(co_unlink_in *, co_unlink_out *, struct svc_req *);
extern int co_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define co_write 1
extern enum clnt_stat co_write_1();
extern bool_t co_write_1_svc();
#define co_read 2
extern enum clnt_stat co_read_1();
extern bool_t co_read_1_svc();
#define co_unlink 3
extern enum clnt_stat co_unlink_1();
extern bool_t co_unlink_1_svc();
extern int co_prog_1_freeresult ();
#endif /* K&R C */
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_co_write_in (XDR *, co_write_in*);
extern bool_t xdr_co_write_out (XDR *, co_write_out*);
extern bool_t xdr_co_read_in (XDR *, co_read_in*);
extern bool_t xdr_co_read_out (XDR *, co_read_out*);
extern bool_t xdr_co_unlink_in (XDR *, co_unlink_in*);
extern bool_t xdr_co_unlink_out (XDR *, co_unlink_out*);
#else /* K&R C */
extern bool_t xdr_co_write_in ();
extern bool_t xdr_co_write_out ();
extern bool_t xdr_co_read_in ();
extern bool_t xdr_co_read_out ();
extern bool_t xdr_co_unlink_in ();
extern bool_t xdr_co_unlink_out ();
#endif /* K&R C */
#ifdef __cplusplus
}
#endif
#endif /* !_CO_H_RPCGEN */