summaryrefslogtreecommitdiffstats
path: root/rpc/block.h
blob: 712263276b298ef1910bc94a6be6c65ebfdf76fc (plain)
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _BLOCK_H_RPCGEN
#define _BLOCK_H_RPCGEN

#include <rpc/rpc.h>

#define ADDRESS "/var/run/gluster-block.socket"

#ifdef __cplusplus
extern "C" {
#endif


struct blockCreate {
	char volume[255];
	char volfileserver[255];
	char gbid[127];
	u_quad_t size;
	char block_name[255];
};
typedef struct blockCreate blockCreate;

struct blockCreateCli {
	char volume[255];
	char volfileserver[255];
	u_quad_t size;
	u_int mpath;
	char block_name[255];
	char *block_hosts;
};
typedef struct blockCreateCli blockCreateCli;

struct blockDeleteCli {
	char block_name[255];
	char volume[255];
};
typedef struct blockDeleteCli blockDeleteCli;

struct blockDelete {
	char block_name[255];
	char gbid[127];
};
typedef struct blockDelete blockDelete;

struct blockInfoCli {
	char block_name[255];
	char volume[255];
};
typedef struct blockInfoCli blockInfoCli;

struct blockListCli {
	char volume[255];
	u_quad_t offset;
};
typedef struct blockListCli blockListCli;

struct blockResponse {
	int exit;
	char *out;
	u_quad_t offset;
	struct {
		u_int xdata_len;
		char *xdata_val;
	} xdata;
};
typedef struct blockResponse blockResponse;

typedef struct blockServerDef {
  size_t nhosts;
  char   **hosts;
} blockServerDef;
typedef blockServerDef *blockServerDefPtr;

typedef enum operations {
  CREATE_SRV = 1,
  DELETE_SRV = 2,
} operations;

void
gluster_block_cli_1(struct svc_req *rqstp, register SVCXPRT *transp);

void
gluster_block_1(struct svc_req *rqstp, register SVCXPRT *transp);


int
glusterBlockCallRPC_1(char *host, void *cobj, operations opt, char **out);

#define GLUSTER_BLOCK_CLI 212153113
#define GLUSTER_BLOCK_CLI_VERS 1

#if defined(__STDC__) || defined(__cplusplus)
#define BLOCK_CREATE_CLI 1
extern  blockResponse * block_create_cli_1(blockCreateCli *, CLIENT *);
extern  blockResponse * block_create_cli_1_svc(blockCreateCli *, struct svc_req *);
#define BLOCK_LIST_CLI 2
extern  blockResponse * block_list_cli_1(blockListCli *, CLIENT *);
extern  blockResponse * block_list_cli_1_svc(blockListCli *, struct svc_req *);
#define BLOCK_INFO_CLI 3
extern  blockResponse * block_info_cli_1(blockInfoCli *, CLIENT *);
extern  blockResponse * block_info_cli_1_svc(blockInfoCli *, struct svc_req *);
#define BLOCK_DELETE_CLI 4
extern  blockResponse * block_delete_cli_1(blockDeleteCli *, CLIENT *);
extern  blockResponse * block_delete_cli_1_svc(blockDeleteCli *, struct svc_req *);
extern int gluster_block_cli_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);

#else /* K&R C */
#define BLOCK_CREATE_CLI 1
extern  blockResponse * block_create_cli_1();
extern  blockResponse * block_create_cli_1_svc();
#define BLOCK_LIST_CLI 2
extern  blockResponse * block_list_cli_1();
extern  blockResponse * block_list_cli_1_svc();
#define BLOCK_INFO_CLI 3
extern  blockResponse * block_info_cli_1();
extern  blockResponse * block_info_cli_1_svc();
#define BLOCK_DELETE_CLI 4
extern  blockResponse * block_delete_cli_1();
extern  blockResponse * block_delete_cli_1_svc();
extern int gluster_block_cli_1_freeresult ();
#endif /* K&R C */

#define GLUSTER_BLOCK 21215311
#define GLUSTER_BLOCK_VERS 1

#if defined(__STDC__) || defined(__cplusplus)
#define BLOCK_CREATE 1
extern  blockResponse * block_create_1(blockCreate *, CLIENT *);
extern  blockResponse * block_create_1_svc(blockCreate *, struct svc_req *);
#define BLOCK_DELETE 2
extern  blockResponse * block_delete_1(blockDelete *, CLIENT *);
extern  blockResponse * block_delete_1_svc(blockDelete *, struct svc_req *);
extern int gluster_block_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);

#else /* K&R C */
#define BLOCK_CREATE 1
extern  blockResponse * block_create_1();
extern  blockResponse * block_create_1_svc();
#define BLOCK_DELETE 2
extern  blockResponse * block_delete_1();
extern  blockResponse * block_delete_1_svc();
extern int gluster_block_1_freeresult ();
#endif /* K&R C */

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_blockCreate (XDR *, blockCreate*);
extern  bool_t xdr_blockCreateCli (XDR *, blockCreateCli*);
extern  bool_t xdr_blockDeleteCli (XDR *, blockDeleteCli*);
extern  bool_t xdr_blockDelete (XDR *, blockDelete*);
extern  bool_t xdr_blockInfoCli (XDR *, blockInfoCli*);
extern  bool_t xdr_blockListCli (XDR *, blockListCli*);
extern  bool_t xdr_blockResponse (XDR *, blockResponse*);

#else /* K&R C */
extern bool_t xdr_blockCreate ();
extern bool_t xdr_blockCreateCli ();
extern bool_t xdr_blockDeleteCli ();
extern bool_t xdr_blockDelete ();
extern bool_t xdr_blockInfoCli ();
extern bool_t xdr_blockListCli ();
extern bool_t xdr_blockResponse ();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_BLOCK_H_RPCGEN */