+void nfs_fsinfo_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
+{
+ struct client *client = private_data;
+ FSINFO3res *res = data;
+
+ if (status == RPC_STATUS_ERROR) {
+ printf("nfs/fsinfo call failed with \"%s\"\n", (char *)data);
+ exit(10);
+ }
+ if (status != RPC_STATUS_SUCCESS) {
+ printf("nfs/fsinfo call to server %s failed, status:%d\n", client->server, status);
+ exit(10);
+ }
+
+ printf("Got reply from server for NFS/FSINFO procedure.\n");
+ printf("Read Max:%d\n", (int)res->FSINFO3res_u.resok.rtmax);
+ printf("Write Max:%d\n", (int)res->FSINFO3res_u.resok.wtmax);
+ client->is_finished = 1;
+}
+
+
+void nfs_connect_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
+{
+ struct client *client = private_data;
+
+ if (status != RPC_STATUS_SUCCESS) {
+ printf("connection to RPC.MOUNTD on server %s failed\n", client->server);
+ exit(10);
+ }
+
+ printf("Connected to RPC.NFSDD on %s:%d\n", client->server, client->mount_port);
+ printf("Send FSINFO request\n");
+ if (rpc_nfs_fsinfo_async(rpc, nfs_fsinfo_cb, &client->rootfh, client) != 0) {
+ printf("Failed to send fsinfo request\n");
+ exit(10);
+ }
+}
+