1 /*
2 * Copyright 2001-2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef USERLAND_FS_REQUESTS_H
6 #define USERLAND_FS_REQUESTS_H
7
8 #include <fs_attr.h>
9 #include <fs_index.h>
10 #include <fs_info.h>
11 #include <fs_interface.h>
12
13 #include "Compatibility.h"
14 #include "FSCapabilities.h"
15 #include "Request.h"
16
17
18 enum {
19 MAX_REQUEST_ADDRESS_COUNT = 4,
20 };
21
22 // request types
23 enum {
24 // kernel -> userland requests
25
26 // administrative
27 UFS_DISCONNECT_REQUEST = 0,
28 FS_CONNECT_REQUEST,
29 FS_CONNECT_REPLY,
30
31 // FS
32 MOUNT_VOLUME_REQUEST,
33 MOUNT_VOLUME_REPLY,
34 UNMOUNT_VOLUME_REQUEST,
35 UNMOUNT_VOLUME_REPLY,
36 // INITIALIZE_VOLUME_REQUEST,
37 // INITIALIZE_VOLUME_REPLY,
38 SYNC_VOLUME_REQUEST,
39 SYNC_VOLUME_REPLY,
40 READ_FS_INFO_REQUEST,
41 READ_FS_INFO_REPLY, // 10
42 WRITE_FS_INFO_REQUEST,
43 WRITE_FS_INFO_REPLY,
44
45 // vnodes
46 LOOKUP_REQUEST,
47 LOOKUP_REPLY,
48 GET_VNODE_NAME_REQUEST,
49 GET_VNODE_NAME_REPLY,
50 READ_VNODE_REQUEST,
51 READ_VNODE_REPLY,
52 WRITE_VNODE_REQUEST,
53 WRITE_VNODE_REPLY, // 20
54 FS_REMOVE_VNODE_REQUEST,
55 FS_REMOVE_VNODE_REPLY,
56
57 // asynchronous I/O
58 DO_IO_REQUEST,
59 DO_IO_REPLY,
60 CANCEL_IO_REQUEST,
61 CANCEL_IO_REPLY,
62 ITERATIVE_IO_GET_VECS_REQUEST,
63 ITERATIVE_IO_GET_VECS_REPLY,
64 ITERATIVE_IO_FINISHED_REQUEST,
65 ITERATIVE_IO_FINISHED_REPLY, // 30
66
67 // nodes
68 IOCTL_REQUEST,
69 IOCTL_REPLY,
70 SET_FLAGS_REQUEST,
71 SET_FLAGS_REPLY,
72 SELECT_REQUEST,
73 SELECT_REPLY,
74 DESELECT_REQUEST,
75 DESELECT_REPLY,
76 FSYNC_REQUEST,
77 FSYNC_REPLY, // 40
78
79 READ_SYMLINK_REQUEST,
80 READ_SYMLINK_REPLY,
81 CREATE_SYMLINK_REQUEST,
82 CREATE_SYMLINK_REPLY,
83 LINK_REQUEST,
84 LINK_REPLY,
85 UNLINK_REQUEST,
86 UNLINK_REPLY,
87 RENAME_REQUEST,
88 RENAME_REPLY, // 50
89
90 ACCESS_REQUEST,
91 ACCESS_REPLY,
92 READ_STAT_REQUEST,
93 READ_STAT_REPLY,
94 WRITE_STAT_REQUEST,
95 WRITE_STAT_REPLY,
96
97 // files
98 CREATE_REQUEST,
99 CREATE_REPLY,
100 OPEN_REQUEST,
101 OPEN_REPLY, // 60
102 CLOSE_REQUEST,
103 CLOSE_REPLY,
104 FREE_COOKIE_REQUEST,
105 FREE_COOKIE_REPLY,
106 READ_REQUEST,
107 READ_REPLY,
108 WRITE_REQUEST,
109 WRITE_REPLY,
110
111 // directories
112 CREATE_DIR_REQUEST,
113 CREATE_DIR_REPLY, // 70
114 REMOVE_DIR_REQUEST,
115 REMOVE_DIR_REPLY,
116 OPEN_DIR_REQUEST,
117 OPEN_DIR_REPLY,
118 CLOSE_DIR_REQUEST,
119 CLOSE_DIR_REPLY,
120 FREE_DIR_COOKIE_REQUEST,
121 FREE_DIR_COOKIE_REPLY,
122 READ_DIR_REQUEST,
123 READ_DIR_REPLY, // 80
124 REWIND_DIR_REQUEST,
125 REWIND_DIR_REPLY,
126
127 // attribute directories
128 OPEN_ATTR_DIR_REQUEST,
129 OPEN_ATTR_DIR_REPLY,
130 CLOSE_ATTR_DIR_REQUEST,
131 CLOSE_ATTR_DIR_REPLY,
132 FREE_ATTR_DIR_COOKIE_REQUEST,
133 FREE_ATTR_DIR_COOKIE_REPLY,
134 READ_ATTR_DIR_REQUEST,
135 READ_ATTR_DIR_REPLY, // 90
136 REWIND_ATTR_DIR_REQUEST,
137 REWIND_ATTR_DIR_REPLY,
138
139 // attributes
140 CREATE_ATTR_REQUEST,
141 CREATE_ATTR_REPLY,
142 OPEN_ATTR_REQUEST,
143 OPEN_ATTR_REPLY,
144 CLOSE_ATTR_REQUEST,
145 CLOSE_ATTR_REPLY,
146 FREE_ATTR_COOKIE_REQUEST,
147 FREE_ATTR_COOKIE_REPLY, // 100
148 READ_ATTR_REQUEST,
149 READ_ATTR_REPLY,
150 WRITE_ATTR_REQUEST,
151 WRITE_ATTR_REPLY,
152 READ_ATTR_STAT_REQUEST,
153 READ_ATTR_STAT_REPLY,
154 WRITE_ATTR_STAT_REQUEST,
155 WRITE_ATTR_STAT_REPLY,
156 RENAME_ATTR_REQUEST,
157 RENAME_ATTR_REPLY, // 110
158 REMOVE_ATTR_REQUEST,
159 REMOVE_ATTR_REPLY,
160
161 // indices
162 OPEN_INDEX_DIR_REQUEST,
163 OPEN_INDEX_DIR_REPLY,
164 CLOSE_INDEX_DIR_REQUEST,
165 CLOSE_INDEX_DIR_REPLY,
166 FREE_INDEX_DIR_COOKIE_REQUEST,
167 FREE_INDEX_DIR_COOKIE_REPLY,
168 READ_INDEX_DIR_REQUEST,
169 READ_INDEX_DIR_REPLY, // 120
170 REWIND_INDEX_DIR_REQUEST,
171 REWIND_INDEX_DIR_REPLY,
172 CREATE_INDEX_REQUEST,
173 CREATE_INDEX_REPLY,
174 REMOVE_INDEX_REQUEST,
175 REMOVE_INDEX_REPLY,
176 READ_INDEX_STAT_REQUEST,
177 READ_INDEX_STAT_REPLY,
178
179 // queries
180 OPEN_QUERY_REQUEST,
181 OPEN_QUERY_REPLY, // 130
182 CLOSE_QUERY_REQUEST,
183 CLOSE_QUERY_REPLY,
184 FREE_QUERY_COOKIE_REQUEST,
185 FREE_QUERY_COOKIE_REPLY,
186 READ_QUERY_REQUEST,
187 READ_QUERY_REPLY,
188 REWIND_QUERY_REQUEST,
189 REWIND_QUERY_REPLY,
190
191 // node monitoring
192 NODE_MONITORING_EVENT_REQUEST,
193 NODE_MONITORING_EVENT_REPLY, // 140
194
195 // userland -> kernel requests
196 // notifications
197 NOTIFY_LISTENER_REQUEST,
198 NOTIFY_LISTENER_REPLY,
199 NOTIFY_SELECT_EVENT_REQUEST,
200 NOTIFY_SELECT_EVENT_REPLY,
201 NOTIFY_QUERY_REQUEST,
202 NOTIFY_QUERY_REPLY,
203
204 // vnodes
205 GET_VNODE_REQUEST,
206 GET_VNODE_REPLY,
207 PUT_VNODE_REQUEST,
208 PUT_VNODE_REPLY, // 150
209 ACQUIRE_VNODE_REQUEST,
210 ACQUIRE_VNODE_REPLY,
211 NEW_VNODE_REQUEST,
212 NEW_VNODE_REPLY,
213 PUBLISH_VNODE_REQUEST,
214 PUBLISH_VNODE_REPLY,
215 REMOVE_VNODE_REQUEST,
216 REMOVE_VNODE_REPLY,
217 UNREMOVE_VNODE_REQUEST,
218 UNREMOVE_VNODE_REPLY, // 160
219 GET_VNODE_REMOVED_REQUEST,
220 GET_VNODE_REMOVED_REPLY,
221
222 // file cache
223 FILE_CACHE_CREATE_REQUEST,
224 FILE_CACHE_CREATE_REPLY,
225 FILE_CACHE_DELETE_REQUEST,
226 FILE_CACHE_DELETE_REPLY,
227 FILE_CACHE_SET_ENABLED_REQUEST,
228 FILE_CACHE_SET_ENABLED_REPLY,
229 FILE_CACHE_SET_SIZE_REQUEST,
230 FILE_CACHE_SET_SIZE_REPLY, // 170
231 FILE_CACHE_SYNC_REQUEST,
232 FILE_CACHE_SYNC_REPLY,
233 FILE_CACHE_READ_REQUEST,
234 FILE_CACHE_READ_REPLY,
235 FILE_CACHE_WRITE_REQUEST,
236 FILE_CACHE_WRITE_REPLY,
237
238 // I/O
239 DO_ITERATIVE_FD_IO_REQUEST,
240 DO_ITERATIVE_FD_IO_REPLY,
241 READ_FROM_IO_REQUEST_REQUEST,
242 READ_FROM_IO_REQUEST_REPLY, // 180
243 WRITE_TO_IO_REQUEST_REQUEST,
244 WRITE_TO_IO_REQUEST_REPLY,
245 NOTIFY_IO_REQUEST_REQUEST,
246 NOTIFY_IO_REQUEST_REPLY,
247
248 // node monitoring
249 ADD_NODE_LISTENER_REQUEST,
250 ADD_NODE_LISTENER_REPLY,
251 REMOVE_NODE_LISTENER_REQUEST,
252 REMOVE_NODE_LISTENER_REPLY,
253
254 // general reply
255 RECEIPT_ACK_REPLY,
256
257 // invalid request ID (e.g. for request handlers)
258 NO_REQUEST, // 190
259 };
260
261 namespace UserlandFSUtil {
262
263 // ReplyRequest
264 class ReplyRequest : public Request {
265 public:
ReplyRequest(uint32 type)266 ReplyRequest(uint32 type) : Request(type) {}
267
268 status_t error;
269 };
270
271
272 // #pragma mark - kernel requests
273
274
275 // KernelRequest
276 class KernelRequest : public Request {
277 public:
KernelRequest(uint32 type)278 KernelRequest(uint32 type) : Request(type) {}
279
280 team_id team;
281 thread_id thread;
282 uid_t user;
283 gid_t group;
284 };
285
286 // VolumeRequest
287 class VolumeRequest : public KernelRequest {
288 public:
VolumeRequest(uint32 type)289 VolumeRequest(uint32 type) : KernelRequest(type) {}
290
291 void* volume;
292 };
293
294 // NodeRequest
295 class NodeRequest : public VolumeRequest {
296 public:
NodeRequest(uint32 type)297 NodeRequest(uint32 type) : VolumeRequest(type) {}
298
299 void* node;
300 };
301
302 // FileRequest
303 class FileRequest : public NodeRequest {
304 public:
FileRequest(uint32 type)305 FileRequest(uint32 type) : NodeRequest(type) {}
306
307 void* fileCookie;
308 };
309
310 // DirRequest
311 class DirRequest : public NodeRequest {
312 public:
DirRequest(uint32 type)313 DirRequest(uint32 type) : NodeRequest(type) {}
314
315 void* dirCookie;
316 };
317
318 // AttrDirRequest
319 class AttrDirRequest : public NodeRequest {
320 public:
AttrDirRequest(uint32 type)321 AttrDirRequest(uint32 type) : NodeRequest(type) {}
322
323 void* attrDirCookie;
324 };
325
326 // AttributeRequest
327 class AttributeRequest : public NodeRequest {
328 public:
AttributeRequest(uint32 type)329 AttributeRequest(uint32 type) : NodeRequest(type) {}
330
331 void* attrCookie;
332 };
333
334 // IndexDirRequest
335 class IndexDirRequest : public VolumeRequest {
336 public:
IndexDirRequest(uint32 type)337 IndexDirRequest(uint32 type) : VolumeRequest(type) {}
338
339 void* indexDirCookie;
340 };
341
342 // QueryRequest
343 class QueryRequest : public VolumeRequest {
344 public:
QueryRequest(uint32 type)345 QueryRequest(uint32 type) : VolumeRequest(type) {}
346
347 void* queryCookie;
348 };
349
350 // FileCacheRequest
351 class FileCacheRequest : public Request {
352 public:
FileCacheRequest(uint32 type)353 FileCacheRequest(uint32 type) : Request(type) {}
354
355 dev_t nsid;
356 ino_t vnid;
357 };
358
359 class IORequestRequest : public Request {
360 public:
IORequestRequest(uint32 type)361 IORequestRequest(uint32 type) : Request(type) {}
362
363 dev_t nsid;
364 int32 request;
365 };
366
367
368 // #pragma mark - administrative
369
370
371 // UFSDisconnectRequest
372 class UFSDisconnectRequest : public Request {
373 public:
UFSDisconnectRequest()374 UFSDisconnectRequest() : Request(UFS_DISCONNECT_REQUEST) {}
375 };
376
377 // FSConnectRequest
378 class FSConnectRequest : public Request {
379 public:
FSConnectRequest()380 FSConnectRequest() : Request(FS_CONNECT_REQUEST) {}
381 status_t GetAddressInfos(AddressInfo* infos, int32* count);
382
383 Address fsName;
384 };
385
386 // FSConnectReply
387 class FSConnectReply : public ReplyRequest {
388 public:
FSConnectReply()389 FSConnectReply() : ReplyRequest(FS_CONNECT_REPLY) {}
390 status_t GetAddressInfos(AddressInfo* infos, int32* count);
391
392 Address portInfos;
393 int32 portInfoCount;
394 FSCapabilities capabilities;
395 client_fs_type clientFSType;
396 };
397
398
399 // #pragma mark - FS
400
401
402 // MountVolumeRequest
403 class MountVolumeRequest : public KernelRequest {
404 public:
MountVolumeRequest()405 MountVolumeRequest() : KernelRequest(MOUNT_VOLUME_REQUEST) {}
406 status_t GetAddressInfos(AddressInfo* infos, int32* count);
407
408 dev_t nsid;
409 Address cwd; // current working dir of the mount() caller
410 Address device;
411 uint32 flags;
412 Address parameters;
413 };
414
415 // MountVolumeReply
416 class MountVolumeReply : public ReplyRequest {
417 public:
MountVolumeReply()418 MountVolumeReply() : ReplyRequest(MOUNT_VOLUME_REPLY) {}
419
420 ino_t rootID;
421 void* volume;
422 FSVolumeCapabilities capabilities;
423 };
424
425 // UnmountVolumeRequest
426 class UnmountVolumeRequest : public VolumeRequest {
427 public:
UnmountVolumeRequest()428 UnmountVolumeRequest() : VolumeRequest(UNMOUNT_VOLUME_REQUEST) {}
429 };
430
431 // UnmountVolumeReply
432 class UnmountVolumeReply : public ReplyRequest {
433 public:
UnmountVolumeReply()434 UnmountVolumeReply() : ReplyRequest(UNMOUNT_VOLUME_REPLY) {}
435 };
436
437 /*// InitializeVolumeRequest
438 class InitializeVolumeRequest : public Request {
439 public:
440 InitializeVolumeRequest() : Request(INITIALIZE_VOLUME_REQUEST) {}
441 status_t GetAddressInfos(AddressInfo* infos, int32* count);
442
443 Address device;
444 Address parameters;
445 };
446
447 // InitializeVolumeReply
448 class InitializeVolumeReply : public ReplyRequest {
449 public:
450 InitializeVolumeReply() : ReplyRequest(INITIALIZE_VOLUME_REPLY) {}
451 };*/
452
453 // SyncVolumeRequest
454 class SyncVolumeRequest : public VolumeRequest {
455 public:
SyncVolumeRequest()456 SyncVolumeRequest() : VolumeRequest(SYNC_VOLUME_REQUEST) {}
457 };
458
459 // SyncVolumeReply
460 class SyncVolumeReply : public ReplyRequest {
461 public:
SyncVolumeReply()462 SyncVolumeReply() : ReplyRequest(SYNC_VOLUME_REPLY) {}
463 };
464
465 // ReadFSInfoRequest
466 class ReadFSInfoRequest : public VolumeRequest {
467 public:
ReadFSInfoRequest()468 ReadFSInfoRequest() : VolumeRequest(READ_FS_INFO_REQUEST) {}
469 };
470
471 // ReadFSInfoReply
472 class ReadFSInfoReply : public ReplyRequest {
473 public:
ReadFSInfoReply()474 ReadFSInfoReply() : ReplyRequest(READ_FS_INFO_REPLY) {}
475
476 fs_info info;
477 };
478
479 // WriteFSInfoRequest
480 class WriteFSInfoRequest : public VolumeRequest {
481 public:
WriteFSInfoRequest()482 WriteFSInfoRequest() : VolumeRequest(WRITE_FS_INFO_REQUEST) {}
483
484 fs_info info;
485 uint32 mask;
486 };
487
488 // WriteFSInfoReply
489 class WriteFSInfoReply : public ReplyRequest {
490 public:
WriteFSInfoReply()491 WriteFSInfoReply() : ReplyRequest(WRITE_FS_INFO_REPLY) {}
492 };
493
494
495 // #pragma mark - vnodes
496
497
498 // LookupRequest
499 class LookupRequest : public NodeRequest {
500 public:
LookupRequest()501 LookupRequest() : NodeRequest(LOOKUP_REQUEST) {}
502 status_t GetAddressInfos(AddressInfo* infos, int32* count);
503
504 Address entryName;
505 bool traverseLink;
506 };
507
508 // LookupReply
509 class LookupReply : public ReplyRequest {
510 public:
LookupReply()511 LookupReply() : ReplyRequest(LOOKUP_REPLY) {}
512
513 ino_t vnid;
514 };
515
516 // GetVNodeNameRequest
517 class GetVNodeNameRequest : public NodeRequest {
518 public:
GetVNodeNameRequest()519 GetVNodeNameRequest() : NodeRequest(GET_VNODE_NAME_REQUEST) {}
520
521 size_t size;
522 };
523
524 // GetVNodeNameReply
525 class GetVNodeNameReply : public ReplyRequest {
526 public:
GetVNodeNameReply()527 GetVNodeNameReply() : ReplyRequest(GET_VNODE_NAME_REPLY) {}
528 status_t GetAddressInfos(AddressInfo* infos, int32* count);
529
530 Address buffer;
531 };
532
533 // ReadVNodeRequest
534 class ReadVNodeRequest : public VolumeRequest {
535 public:
ReadVNodeRequest()536 ReadVNodeRequest() : VolumeRequest(READ_VNODE_REQUEST) {}
537
538 ino_t vnid;
539 bool reenter;
540 };
541
542 // ReadVNodeReply
543 class ReadVNodeReply : public ReplyRequest {
544 public:
ReadVNodeReply()545 ReadVNodeReply() : ReplyRequest(READ_VNODE_REPLY) {}
546
547 void* node;
548 int type;
549 uint32 flags;
550 FSVNodeCapabilities capabilities;
551 };
552
553 // WriteVNodeRequest
554 class WriteVNodeRequest : public NodeRequest {
555 public:
WriteVNodeRequest()556 WriteVNodeRequest() : NodeRequest(WRITE_VNODE_REQUEST) {}
557
558 bool reenter;
559 };
560
561 // WriteVNodeReply
562 class WriteVNodeReply : public ReplyRequest {
563 public:
WriteVNodeReply()564 WriteVNodeReply() : ReplyRequest(WRITE_VNODE_REPLY) {}
565 };
566
567 // FSRemoveVNodeRequest
568 class FSRemoveVNodeRequest : public NodeRequest {
569 public:
FSRemoveVNodeRequest()570 FSRemoveVNodeRequest() : NodeRequest(FS_REMOVE_VNODE_REQUEST) {}
571
572 bool reenter;
573 };
574
575 // FSRemoveVNodeReply
576 class FSRemoveVNodeReply : public ReplyRequest {
577 public:
FSRemoveVNodeReply()578 FSRemoveVNodeReply() : ReplyRequest(FS_REMOVE_VNODE_REPLY) {}
579 };
580
581
582 // #pragma mark - asynchronous I/O
583
584
585 // DoIORequest
586 class DoIORequest : public FileRequest {
587 public:
DoIORequest()588 DoIORequest() : FileRequest(DO_IO_REQUEST) {}
589
590 off_t offset;
591 size_t length;
592 int32 request;
593 bool isWrite;
594 bool isVIP;
595 };
596
597 // DoIOReply
598 class DoIOReply : public ReplyRequest {
599 public:
DoIOReply()600 DoIOReply() : ReplyRequest(DO_IO_REPLY) {}
601 };
602
603 // CancelIORequest
604 class CancelIORequest : public FileRequest {
605 public:
CancelIORequest()606 CancelIORequest() : FileRequest(CANCEL_IO_REQUEST) {}
607
608 int32 request;
609 };
610
611 // CancelIOReply
612 class CancelIOReply : public ReplyRequest {
613 public:
CancelIOReply()614 CancelIOReply() : ReplyRequest(CANCEL_IO_REPLY) {}
615 };
616
617 // IterativeIOGetVecsRequest
618 class IterativeIOGetVecsRequest : public VolumeRequest {
619 public:
IterativeIOGetVecsRequest()620 IterativeIOGetVecsRequest()
621 : VolumeRequest(ITERATIVE_IO_GET_VECS_REQUEST) {}
622
623 void* cookie;
624 off_t offset;
625 int32 request;
626 size_t size;
627 uint32 vecCount;
628 };
629
630 // IterativeIOGetVecsReply
631 class IterativeIOGetVecsReply : public ReplyRequest {
632 public:
IterativeIOGetVecsReply()633 IterativeIOGetVecsReply() : ReplyRequest(ITERATIVE_IO_GET_VECS_REPLY) {}
634
635 enum { MAX_VECS = 8 };
636
637 file_io_vec vecs[MAX_VECS];
638 uint32 vecCount;
639 };
640
641 // IterativeIOFinishedRequest
642 class IterativeIOFinishedRequest : public VolumeRequest {
643 public:
IterativeIOFinishedRequest()644 IterativeIOFinishedRequest()
645 : VolumeRequest(ITERATIVE_IO_FINISHED_REQUEST) {}
646
647 void* cookie;
648 int32 request;
649 status_t status;
650 bool partialTransfer;
651 size_t bytesTransferred;
652 };
653
654 // IterativeIOFinishedReply
655 class IterativeIOFinishedReply : public ReplyRequest {
656 public:
IterativeIOFinishedReply()657 IterativeIOFinishedReply() : ReplyRequest(ITERATIVE_IO_FINISHED_REPLY) {}
658 };
659
660
661 // #pragma mark - nodes
662
663
664 // IOCtlRequest
665 class IOCtlRequest : public FileRequest {
666 public:
IOCtlRequest()667 IOCtlRequest() : FileRequest(IOCTL_REQUEST) {}
668 status_t GetAddressInfos(AddressInfo* infos, int32* count);
669
670 uint32 command;
671 void* bufferParameter;
672 size_t lenParameter;
673 bool isBuffer; // if false, just pass bufferParameter
674 // otherwise use buffer
675 Address buffer;
676 int32 writeSize; // ignored unless isBuffer -- then
677 // it indicates the size of the buffer to allocate
678 };
679
680 // IOCtlReply
681 class IOCtlReply : public ReplyRequest {
682 public:
IOCtlReply()683 IOCtlReply() : ReplyRequest(IOCTL_REPLY) {}
684 status_t GetAddressInfos(AddressInfo* infos, int32* count);
685
686 status_t ioctlError; // we need a special handling since error
687 // may be a part of the client FS protocol
688 Address buffer;
689 };
690
691 // SetFlagsRequest
692 class SetFlagsRequest : public FileRequest {
693 public:
SetFlagsRequest()694 SetFlagsRequest() : FileRequest(SET_FLAGS_REQUEST) {}
695
696 int flags;
697 };
698
699 // SetFlagsReply
700 class SetFlagsReply : public ReplyRequest {
701 public:
SetFlagsReply()702 SetFlagsReply() : ReplyRequest(SET_FLAGS_REPLY) {}
703 };
704
705 // SelectRequest
706 class SelectRequest : public FileRequest {
707 public:
SelectRequest()708 SelectRequest() : FileRequest(SELECT_REQUEST) {}
709
710 uint8 event;
711 selectsync* sync;
712 };
713
714 // SelectReply
715 class SelectReply : public ReplyRequest {
716 public:
SelectReply()717 SelectReply() : ReplyRequest(SELECT_REPLY) {}
718 };
719
720 // DeselectRequest
721 class DeselectRequest : public FileRequest {
722 public:
DeselectRequest()723 DeselectRequest() : FileRequest(DESELECT_REQUEST) {}
724
725 uint8 event;
726 selectsync* sync;
727 };
728
729 // DeselectReply
730 class DeselectReply : public ReplyRequest {
731 public:
DeselectReply()732 DeselectReply() : ReplyRequest(DESELECT_REPLY) {}
733 };
734
735 // FSyncRequest
736 class FSyncRequest : public NodeRequest {
737 public:
FSyncRequest()738 FSyncRequest() : NodeRequest(FSYNC_REQUEST) {}
739 };
740
741 // FSyncReply
742 class FSyncReply : public ReplyRequest {
743 public:
FSyncReply()744 FSyncReply() : ReplyRequest(FSYNC_REPLY) {}
745 };
746
747 // ReadSymlinkRequest
748 class ReadSymlinkRequest : public NodeRequest {
749 public:
ReadSymlinkRequest()750 ReadSymlinkRequest() : NodeRequest(READ_SYMLINK_REQUEST) {}
751
752 size_t size;
753 };
754
755 // ReadSymlinkReply
756 class ReadSymlinkReply : public ReplyRequest {
757 public:
ReadSymlinkReply()758 ReadSymlinkReply() : ReplyRequest(READ_SYMLINK_REPLY) {}
759 status_t GetAddressInfos(AddressInfo* infos, int32* count);
760
761 Address buffer;
762 size_t bytesRead;
763 };
764
765 // CreateSymlinkRequest
766 class CreateSymlinkRequest : public NodeRequest {
767 public:
CreateSymlinkRequest()768 CreateSymlinkRequest() : NodeRequest(CREATE_SYMLINK_REQUEST) {}
769 status_t GetAddressInfos(AddressInfo* infos, int32* count);
770
771 Address name;
772 Address target;
773 int mode;
774 };
775
776 // CreateSymlinkReply
777 class CreateSymlinkReply : public ReplyRequest {
778 public:
CreateSymlinkReply()779 CreateSymlinkReply() : ReplyRequest(CREATE_SYMLINK_REPLY) {}
780 };
781
782 // LinkRequest
783 class LinkRequest : public NodeRequest {
784 public:
LinkRequest()785 LinkRequest() : NodeRequest(LINK_REQUEST) {}
786 status_t GetAddressInfos(AddressInfo* infos, int32* count);
787
788 Address name;
789 void* target;
790 };
791
792 // LinkReply
793 class LinkReply : public ReplyRequest {
794 public:
LinkReply()795 LinkReply() : ReplyRequest(LINK_REPLY) {}
796 };
797
798 // UnlinkRequest
799 class UnlinkRequest : public NodeRequest {
800 public:
UnlinkRequest()801 UnlinkRequest() : NodeRequest(UNLINK_REQUEST) {}
802 status_t GetAddressInfos(AddressInfo* infos, int32* count);
803
804 Address name;
805 };
806
807 // UnlinkReply
808 class UnlinkReply : public ReplyRequest {
809 public:
UnlinkReply()810 UnlinkReply() : ReplyRequest(UNLINK_REPLY) {}
811 };
812
813 // RenameRequest
814 class RenameRequest : public VolumeRequest {
815 public:
RenameRequest()816 RenameRequest() : VolumeRequest(RENAME_REQUEST) {}
817 status_t GetAddressInfos(AddressInfo* infos, int32* count);
818
819 void* oldDir;
820 Address oldName;
821 void* newDir;
822 Address newName;
823 };
824
825 // RenameReply
826 class RenameReply : public ReplyRequest {
827 public:
RenameReply()828 RenameReply() : ReplyRequest(RENAME_REPLY) {}
829 };
830
831 // AccessRequest
832 class AccessRequest : public NodeRequest {
833 public:
AccessRequest()834 AccessRequest() : NodeRequest(ACCESS_REQUEST) {}
835
836 int mode;
837 };
838
839 // AccessReply
840 class AccessReply : public ReplyRequest {
841 public:
AccessReply()842 AccessReply() : ReplyRequest(ACCESS_REPLY) {}
843 };
844
845 // ReadStatRequest
846 class ReadStatRequest : public NodeRequest {
847 public:
ReadStatRequest()848 ReadStatRequest() : NodeRequest(READ_STAT_REQUEST) {}
849 };
850
851 // ReadStatReply
852 class ReadStatReply : public ReplyRequest {
853 public:
ReadStatReply()854 ReadStatReply() : ReplyRequest(READ_STAT_REPLY) {}
855
856 struct stat st;
857 };
858
859 // WriteStatRequest
860 class WriteStatRequest : public NodeRequest {
861 public:
WriteStatRequest()862 WriteStatRequest() : NodeRequest(WRITE_STAT_REQUEST) {}
863
864 struct stat st;
865 uint32 mask;
866 };
867
868 // WriteStatReply
869 class WriteStatReply : public ReplyRequest {
870 public:
WriteStatReply()871 WriteStatReply() : ReplyRequest(WRITE_STAT_REPLY) {}
872 };
873
874
875 // #pragma mark - files
876
877
878 // CreateRequest
879 class CreateRequest : public NodeRequest {
880 public:
CreateRequest()881 CreateRequest() : NodeRequest(CREATE_REQUEST) {}
882 status_t GetAddressInfos(AddressInfo* infos, int32* count);
883
884 Address name;
885 int openMode;
886 int mode;
887 };
888
889 // CreateReply
890 class CreateReply : public ReplyRequest {
891 public:
CreateReply()892 CreateReply() : ReplyRequest(CREATE_REPLY) {}
893
894 ino_t vnid;
895 void* fileCookie;
896 };
897
898 // OpenRequest
899 class OpenRequest : public NodeRequest {
900 public:
OpenRequest()901 OpenRequest() : NodeRequest(OPEN_REQUEST) {}
902
903 int openMode;
904 };
905
906 // OpenReply
907 class OpenReply : public ReplyRequest {
908 public:
OpenReply()909 OpenReply() : ReplyRequest(OPEN_REPLY) {}
910
911 void* fileCookie;
912 };
913
914 // CloseRequest
915 class CloseRequest : public FileRequest {
916 public:
CloseRequest()917 CloseRequest() : FileRequest(CLOSE_REQUEST) {}
918 };
919
920 // CloseReply
921 class CloseReply : public ReplyRequest {
922 public:
CloseReply()923 CloseReply() : ReplyRequest(CLOSE_REPLY) {}
924 };
925
926 // FreeCookieRequest
927 class FreeCookieRequest : public FileRequest {
928 public:
FreeCookieRequest()929 FreeCookieRequest() : FileRequest(FREE_COOKIE_REQUEST) {}
930 };
931
932 // FreeCookieReply
933 class FreeCookieReply : public ReplyRequest {
934 public:
FreeCookieReply()935 FreeCookieReply() : ReplyRequest(FREE_COOKIE_REPLY) {}
936 };
937
938 // ReadRequest
939 class ReadRequest : public FileRequest {
940 public:
ReadRequest()941 ReadRequest() : FileRequest(READ_REQUEST) {}
942
943 off_t pos;
944 size_t size;
945 };
946
947 // ReadReply
948 class ReadReply : public ReplyRequest {
949 public:
ReadReply()950 ReadReply() : ReplyRequest(READ_REPLY) {}
951 status_t GetAddressInfos(AddressInfo* infos, int32* count);
952
953 Address buffer;
954 size_t bytesRead;
955 };
956
957 // WriteRequest
958 class WriteRequest : public FileRequest {
959 public:
WriteRequest()960 WriteRequest() : FileRequest(WRITE_REQUEST) {}
961 status_t GetAddressInfos(AddressInfo* infos, int32* count);
962
963 Address buffer;
964 off_t pos;
965 };
966
967 // WriteReply
968 class WriteReply : public ReplyRequest {
969 public:
WriteReply()970 WriteReply() : ReplyRequest(WRITE_REPLY) {}
971
972 size_t bytesWritten;
973 };
974
975
976 // #pragma mark - directories
977
978
979 // CreateDirRequest
980 class CreateDirRequest : public NodeRequest {
981 public:
CreateDirRequest()982 CreateDirRequest() : NodeRequest(CREATE_DIR_REQUEST) {}
983 status_t GetAddressInfos(AddressInfo* infos, int32* count);
984
985 Address name;
986 int mode;
987 };
988
989 // CreateDirReply
990 class CreateDirReply : public ReplyRequest {
991 public:
CreateDirReply()992 CreateDirReply() : ReplyRequest(CREATE_DIR_REPLY) {}
993 };
994
995 // RemoveDirRequest
996 class RemoveDirRequest : public NodeRequest {
997 public:
RemoveDirRequest()998 RemoveDirRequest() : NodeRequest(REMOVE_DIR_REQUEST) {}
999 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1000
1001 Address name;
1002 };
1003
1004 // RemoveDirReply
1005 class RemoveDirReply : public ReplyRequest {
1006 public:
RemoveDirReply()1007 RemoveDirReply() : ReplyRequest(REMOVE_DIR_REPLY) {}
1008 };
1009
1010 // OpenDirRequest
1011 class OpenDirRequest : public NodeRequest {
1012 public:
OpenDirRequest()1013 OpenDirRequest() : NodeRequest(OPEN_DIR_REQUEST) {}
1014 };
1015
1016 // OpenDirReply
1017 class OpenDirReply : public ReplyRequest {
1018 public:
OpenDirReply()1019 OpenDirReply() : ReplyRequest(OPEN_DIR_REPLY) {}
1020
1021 void* dirCookie;
1022 };
1023
1024 // CloseDirRequest
1025 class CloseDirRequest : public DirRequest {
1026 public:
CloseDirRequest()1027 CloseDirRequest() : DirRequest(CLOSE_DIR_REQUEST) {}
1028 };
1029
1030 // CloseDirReply
1031 class CloseDirReply : public ReplyRequest {
1032 public:
CloseDirReply()1033 CloseDirReply() : ReplyRequest(CLOSE_DIR_REPLY) {}
1034 };
1035
1036 // FreeDirCookieRequest
1037 class FreeDirCookieRequest : public DirRequest {
1038 public:
FreeDirCookieRequest()1039 FreeDirCookieRequest() : DirRequest(FREE_DIR_COOKIE_REQUEST) {}
1040 };
1041
1042 // FreeDirCookieReply
1043 class FreeDirCookieReply : public ReplyRequest {
1044 public:
FreeDirCookieReply()1045 FreeDirCookieReply() : ReplyRequest(FREE_DIR_COOKIE_REPLY) {}
1046 };
1047
1048 // ReadDirRequest
1049 class ReadDirRequest : public DirRequest {
1050 public:
ReadDirRequest()1051 ReadDirRequest() : DirRequest(READ_DIR_REQUEST) {}
1052
1053 size_t bufferSize;
1054 uint32 count;
1055 };
1056
1057 // ReadDirReply
1058 class ReadDirReply : public ReplyRequest {
1059 public:
ReadDirReply()1060 ReadDirReply() : ReplyRequest(READ_DIR_REPLY) {}
1061 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1062
1063 uint32 count;
1064 Address buffer;
1065 };
1066
1067 // RewindDirRequest
1068 class RewindDirRequest : public DirRequest {
1069 public:
RewindDirRequest()1070 RewindDirRequest() : DirRequest(REWIND_DIR_REQUEST) {}
1071 };
1072
1073 // RewindDirReply
1074 class RewindDirReply : public ReplyRequest {
1075 public:
RewindDirReply()1076 RewindDirReply() : ReplyRequest(REWIND_DIR_REPLY) {}
1077 };
1078
1079
1080 // #pragma mark - attribute directories
1081
1082
1083 // OpenAttrDirRequest
1084 class OpenAttrDirRequest : public NodeRequest {
1085 public:
OpenAttrDirRequest()1086 OpenAttrDirRequest() : NodeRequest(OPEN_ATTR_DIR_REQUEST) {}
1087 };
1088
1089 // OpenAttrDirReply
1090 class OpenAttrDirReply : public ReplyRequest {
1091 public:
OpenAttrDirReply()1092 OpenAttrDirReply() : ReplyRequest(OPEN_ATTR_DIR_REPLY) {}
1093
1094 void* attrDirCookie;
1095 };
1096
1097 // CloseAttrDirRequest
1098 class CloseAttrDirRequest : public AttrDirRequest {
1099 public:
CloseAttrDirRequest()1100 CloseAttrDirRequest() : AttrDirRequest(CLOSE_ATTR_DIR_REQUEST) {}
1101 };
1102
1103 // CloseAttrDirReply
1104 class CloseAttrDirReply : public ReplyRequest {
1105 public:
CloseAttrDirReply()1106 CloseAttrDirReply() : ReplyRequest(CLOSE_ATTR_DIR_REPLY) {}
1107 };
1108
1109 // FreeAttrDirCookieRequest
1110 class FreeAttrDirCookieRequest : public AttrDirRequest {
1111 public:
FreeAttrDirCookieRequest()1112 FreeAttrDirCookieRequest() : AttrDirRequest(FREE_ATTR_DIR_COOKIE_REQUEST) {}
1113 };
1114
1115 // FreeAttrDirCookieReply
1116 class FreeAttrDirCookieReply : public ReplyRequest {
1117 public:
FreeAttrDirCookieReply()1118 FreeAttrDirCookieReply() : ReplyRequest(FREE_ATTR_DIR_COOKIE_REPLY) {}
1119 };
1120
1121 // ReadAttrDirRequest
1122 class ReadAttrDirRequest : public AttrDirRequest {
1123 public:
ReadAttrDirRequest()1124 ReadAttrDirRequest() : AttrDirRequest(READ_ATTR_DIR_REQUEST) {}
1125
1126 size_t bufferSize;
1127 uint32 count;
1128 };
1129
1130 // ReadAttrDirReply
1131 class ReadAttrDirReply : public ReplyRequest {
1132 public:
ReadAttrDirReply()1133 ReadAttrDirReply() : ReplyRequest(READ_ATTR_DIR_REPLY) {}
1134 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1135
1136 uint32 count;
1137 Address buffer;
1138 };
1139
1140 // RewindAttrDirRequest
1141 class RewindAttrDirRequest : public AttrDirRequest {
1142 public:
RewindAttrDirRequest()1143 RewindAttrDirRequest() : AttrDirRequest(REWIND_ATTR_DIR_REQUEST) {}
1144 };
1145
1146 // RewindAttrDirReply
1147 class RewindAttrDirReply : public ReplyRequest {
1148 public:
RewindAttrDirReply()1149 RewindAttrDirReply() : ReplyRequest(REWIND_ATTR_DIR_REPLY) {}
1150 };
1151
1152
1153 // #pragma mark - attributes
1154
1155
1156 // CreateAttrRequest
1157 class CreateAttrRequest : public NodeRequest {
1158 public:
CreateAttrRequest()1159 CreateAttrRequest() : NodeRequest(CREATE_ATTR_REQUEST) {}
1160 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1161
1162 Address name;
1163 uint32 type;
1164 int openMode;
1165 };
1166
1167 // CreateAttrReply
1168 class CreateAttrReply : public ReplyRequest {
1169 public:
CreateAttrReply()1170 CreateAttrReply() : ReplyRequest(CREATE_ATTR_REPLY) {}
1171
1172 void* attrCookie;
1173 };
1174
1175 // OpenAttrRequest
1176 class OpenAttrRequest : public NodeRequest {
1177 public:
OpenAttrRequest()1178 OpenAttrRequest() : NodeRequest(OPEN_ATTR_REQUEST) {}
1179 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1180
1181 Address name;
1182 int openMode;
1183 };
1184
1185 // OpenAttrReply
1186 class OpenAttrReply : public ReplyRequest {
1187 public:
OpenAttrReply()1188 OpenAttrReply() : ReplyRequest(OPEN_ATTR_REPLY) {}
1189
1190 void* attrCookie;
1191 };
1192
1193 // CloseAttrRequest
1194 class CloseAttrRequest : public AttributeRequest {
1195 public:
CloseAttrRequest()1196 CloseAttrRequest() : AttributeRequest(CLOSE_ATTR_REQUEST) {}
1197 };
1198
1199 // CloseAttrReply
1200 class CloseAttrReply : public ReplyRequest {
1201 public:
CloseAttrReply()1202 CloseAttrReply() : ReplyRequest(CLOSE_ATTR_REPLY) {}
1203 };
1204
1205 // FreeAttrCookieRequest
1206 class FreeAttrCookieRequest : public AttributeRequest {
1207 public:
FreeAttrCookieRequest()1208 FreeAttrCookieRequest() : AttributeRequest(FREE_ATTR_COOKIE_REQUEST) {}
1209 };
1210
1211 // FreeAttrCookieReply
1212 class FreeAttrCookieReply : public ReplyRequest {
1213 public:
FreeAttrCookieReply()1214 FreeAttrCookieReply() : ReplyRequest(FREE_ATTR_COOKIE_REPLY) {}
1215 };
1216
1217 // ReadAttrRequest
1218 class ReadAttrRequest : public AttributeRequest {
1219 public:
ReadAttrRequest()1220 ReadAttrRequest() : AttributeRequest(READ_ATTR_REQUEST) {}
1221
1222 off_t pos;
1223 size_t size;
1224 };
1225
1226 // ReadAttrReply
1227 class ReadAttrReply : public ReplyRequest {
1228 public:
ReadAttrReply()1229 ReadAttrReply() : ReplyRequest(READ_ATTR_REPLY) {}
1230 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1231
1232 Address buffer;
1233 size_t bytesRead;
1234 };
1235
1236 // WriteAttrRequest
1237 class WriteAttrRequest : public AttributeRequest {
1238 public:
WriteAttrRequest()1239 WriteAttrRequest() : AttributeRequest(WRITE_ATTR_REQUEST) {}
1240 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1241
1242 Address buffer;
1243 off_t pos;
1244 size_t size;
1245 };
1246
1247 // WriteAttrReply
1248 class WriteAttrReply : public ReplyRequest {
1249 public:
WriteAttrReply()1250 WriteAttrReply() : ReplyRequest(WRITE_ATTR_REPLY) {}
1251
1252 size_t bytesWritten;
1253 };
1254
1255 // ReadAttrStatRequest
1256 class ReadAttrStatRequest : public AttributeRequest {
1257 public:
ReadAttrStatRequest()1258 ReadAttrStatRequest() : AttributeRequest(READ_ATTR_STAT_REQUEST) {}
1259 };
1260
1261 // ReadAttrStatReply
1262 class ReadAttrStatReply : public ReplyRequest {
1263 public:
ReadAttrStatReply()1264 ReadAttrStatReply() : ReplyRequest(READ_ATTR_STAT_REPLY) {}
1265
1266 struct stat st;
1267 };
1268
1269 // WriteAttrStatRequest
1270 class WriteAttrStatRequest : public AttributeRequest {
1271 public:
WriteAttrStatRequest()1272 WriteAttrStatRequest() : AttributeRequest(WRITE_ATTR_STAT_REQUEST) {}
1273
1274 struct stat st;
1275 uint32 mask;
1276 };
1277
1278 // WriteAttrStatReply
1279 class WriteAttrStatReply : public ReplyRequest {
1280 public:
WriteAttrStatReply()1281 WriteAttrStatReply() : ReplyRequest(WRITE_ATTR_STAT_REPLY) {}
1282 };
1283
1284 // RenameAttrRequest
1285 class RenameAttrRequest : public VolumeRequest {
1286 public:
RenameAttrRequest()1287 RenameAttrRequest() : VolumeRequest(RENAME_ATTR_REQUEST) {}
1288 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1289
1290 void* oldNode;
1291 void* newNode;
1292 Address oldName;
1293 Address newName;
1294 };
1295
1296 // RenameAttrReply
1297 class RenameAttrReply : public ReplyRequest {
1298 public:
RenameAttrReply()1299 RenameAttrReply() : ReplyRequest(RENAME_ATTR_REPLY) {}
1300 };
1301
1302 // RemoveAttrRequest
1303 class RemoveAttrRequest : public NodeRequest {
1304 public:
RemoveAttrRequest()1305 RemoveAttrRequest() : NodeRequest(REMOVE_ATTR_REQUEST) {}
1306 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1307
1308 Address name;
1309 };
1310
1311 // RemoveAttrReply
1312 class RemoveAttrReply : public ReplyRequest {
1313 public:
RemoveAttrReply()1314 RemoveAttrReply() : ReplyRequest(REMOVE_ATTR_REPLY) {}
1315 };
1316
1317
1318 // #pragma mark - indices
1319
1320
1321 // OpenIndexDirRequest
1322 class OpenIndexDirRequest : public VolumeRequest {
1323 public:
OpenIndexDirRequest()1324 OpenIndexDirRequest() : VolumeRequest(OPEN_INDEX_DIR_REQUEST) {}
1325 };
1326
1327 // OpenIndexDirReply
1328 class OpenIndexDirReply : public ReplyRequest {
1329 public:
OpenIndexDirReply()1330 OpenIndexDirReply() : ReplyRequest(OPEN_INDEX_DIR_REPLY) {}
1331
1332 void* indexDirCookie;
1333 };
1334
1335 // CloseIndexDirRequest
1336 class CloseIndexDirRequest : public IndexDirRequest {
1337 public:
CloseIndexDirRequest()1338 CloseIndexDirRequest() : IndexDirRequest(CLOSE_INDEX_DIR_REQUEST) {}
1339 };
1340
1341 // CloseIndexDirReply
1342 class CloseIndexDirReply : public ReplyRequest {
1343 public:
CloseIndexDirReply()1344 CloseIndexDirReply() : ReplyRequest(CLOSE_INDEX_DIR_REPLY) {}
1345 };
1346
1347 // FreeIndexDirCookieRequest
1348 class FreeIndexDirCookieRequest : public IndexDirRequest {
1349 public:
FreeIndexDirCookieRequest()1350 FreeIndexDirCookieRequest()
1351 : IndexDirRequest(FREE_INDEX_DIR_COOKIE_REQUEST) {}
1352 };
1353
1354 // FreeIndexDirCookieReply
1355 class FreeIndexDirCookieReply : public ReplyRequest {
1356 public:
FreeIndexDirCookieReply()1357 FreeIndexDirCookieReply() : ReplyRequest(FREE_INDEX_DIR_COOKIE_REPLY) {}
1358 };
1359
1360 // ReadIndexDirRequest
1361 class ReadIndexDirRequest : public IndexDirRequest {
1362 public:
ReadIndexDirRequest()1363 ReadIndexDirRequest() : IndexDirRequest(READ_INDEX_DIR_REQUEST) {}
1364
1365 size_t bufferSize;
1366 uint32 count;
1367 };
1368
1369 // ReadIndexDirReply
1370 class ReadIndexDirReply : public ReplyRequest {
1371 public:
ReadIndexDirReply()1372 ReadIndexDirReply() : ReplyRequest(READ_INDEX_DIR_REPLY) {}
1373 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1374
1375 uint32 count;
1376 Address buffer;
1377 };
1378
1379 // RewindIndexDirRequest
1380 class RewindIndexDirRequest : public IndexDirRequest {
1381 public:
RewindIndexDirRequest()1382 RewindIndexDirRequest() : IndexDirRequest(REWIND_INDEX_DIR_REQUEST) {}
1383 };
1384
1385 // RewindIndexDirReply
1386 class RewindIndexDirReply : public ReplyRequest {
1387 public:
RewindIndexDirReply()1388 RewindIndexDirReply() : ReplyRequest(REWIND_INDEX_DIR_REPLY) {}
1389 };
1390
1391 // CreateIndexRequest
1392 class CreateIndexRequest : public VolumeRequest {
1393 public:
CreateIndexRequest()1394 CreateIndexRequest() : VolumeRequest(CREATE_INDEX_REQUEST) {}
1395 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1396
1397 Address name;
1398 uint32 type;
1399 uint32 flags;
1400 };
1401
1402 // CreateIndexReply
1403 class CreateIndexReply : public ReplyRequest {
1404 public:
CreateIndexReply()1405 CreateIndexReply() : ReplyRequest(CREATE_INDEX_REPLY) {}
1406 };
1407
1408 // RemoveIndexRequest
1409 class RemoveIndexRequest : public VolumeRequest {
1410 public:
RemoveIndexRequest()1411 RemoveIndexRequest() : VolumeRequest(REMOVE_INDEX_REQUEST) {}
1412 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1413
1414 Address name;
1415 };
1416
1417 // RemoveIndexReply
1418 class RemoveIndexReply : public ReplyRequest {
1419 public:
RemoveIndexReply()1420 RemoveIndexReply() : ReplyRequest(REMOVE_INDEX_REPLY) {}
1421 };
1422
1423 // ReadIndexStatRequest
1424 class ReadIndexStatRequest : public VolumeRequest {
1425 public:
ReadIndexStatRequest()1426 ReadIndexStatRequest() : VolumeRequest(READ_INDEX_STAT_REQUEST) {}
1427 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1428
1429 Address name;
1430 };
1431
1432 // ReadIndexStatReply
1433 class ReadIndexStatReply : public ReplyRequest {
1434 public:
ReadIndexStatReply()1435 ReadIndexStatReply() : ReplyRequest(READ_INDEX_STAT_REPLY) {}
1436
1437 struct stat st;
1438 };
1439
1440
1441 // #pragma mark - queries
1442
1443
1444 // OpenQueryRequest
1445 class OpenQueryRequest : public VolumeRequest {
1446 public:
OpenQueryRequest()1447 OpenQueryRequest() : VolumeRequest(OPEN_QUERY_REQUEST) {}
1448 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1449
1450 Address queryString;
1451 uint32 flags;
1452 port_id port;
1453 uint32 token;
1454 };
1455
1456 // OpenQueryReply
1457 class OpenQueryReply : public ReplyRequest {
1458 public:
OpenQueryReply()1459 OpenQueryReply() : ReplyRequest(OPEN_QUERY_REPLY) {}
1460
1461 void* queryCookie;
1462 };
1463
1464 // CloseQueryRequest
1465 class CloseQueryRequest : public QueryRequest {
1466 public:
CloseQueryRequest()1467 CloseQueryRequest() : QueryRequest(CLOSE_QUERY_REQUEST) {}
1468 };
1469
1470 // CloseQueryReply
1471 class CloseQueryReply : public ReplyRequest {
1472 public:
CloseQueryReply()1473 CloseQueryReply() : ReplyRequest(CLOSE_QUERY_REPLY) {}
1474 };
1475
1476 // FreeQueryCookieRequest
1477 class FreeQueryCookieRequest : public QueryRequest {
1478 public:
FreeQueryCookieRequest()1479 FreeQueryCookieRequest() : QueryRequest(FREE_QUERY_COOKIE_REQUEST) {}
1480 };
1481
1482 // FreeQueryCookieReply
1483 class FreeQueryCookieReply : public ReplyRequest {
1484 public:
FreeQueryCookieReply()1485 FreeQueryCookieReply() : ReplyRequest(FREE_QUERY_COOKIE_REPLY) {}
1486 };
1487
1488 // ReadQueryRequest
1489 class ReadQueryRequest : public QueryRequest {
1490 public:
ReadQueryRequest()1491 ReadQueryRequest() : QueryRequest(READ_QUERY_REQUEST) {}
1492
1493 size_t bufferSize;
1494 uint32 count;
1495 };
1496
1497 // ReadQueryReply
1498 class ReadQueryReply : public ReplyRequest {
1499 public:
ReadQueryReply()1500 ReadQueryReply() : ReplyRequest(READ_QUERY_REPLY) {}
1501 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1502
1503 uint32 count;
1504 Address buffer;
1505 };
1506
1507 // RewindQueryRequest
1508 class RewindQueryRequest : public QueryRequest {
1509 public:
RewindQueryRequest()1510 RewindQueryRequest() : QueryRequest(REWIND_QUERY_REQUEST) {}
1511 };
1512
1513 // RewindQueryReply
1514 class RewindQueryReply : public ReplyRequest {
1515 public:
RewindQueryReply()1516 RewindQueryReply() : ReplyRequest(REWIND_QUERY_REPLY) {}
1517 };
1518
1519
1520 // #pragma mark ----- node monitoring -----
1521
1522
1523 // NodeMonitoringEventRequest
1524 class NodeMonitoringEventRequest : public KernelRequest {
1525 public:
NodeMonitoringEventRequest()1526 NodeMonitoringEventRequest()
1527 : KernelRequest(NODE_MONITORING_EVENT_REQUEST) {}
1528 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1529
1530 void* listener;
1531 Address event;
1532 };
1533
1534 // NodeMonitoringEventReply
1535 class NodeMonitoringEventReply : public ReplyRequest {
1536 public:
NodeMonitoringEventReply()1537 NodeMonitoringEventReply() : ReplyRequest(NODE_MONITORING_EVENT_REPLY) {}
1538 };
1539
1540
1541 // #pragma mark -
1542 // #pragma mark ----- userland requests -----
1543
1544 // #pragma mark -
1545 // #pragma mark ----- notifications -----
1546
1547 // NotifyListenerRequest
1548 class NotifyListenerRequest : public Request {
1549 public:
NotifyListenerRequest()1550 NotifyListenerRequest() : Request(NOTIFY_LISTENER_REQUEST) {}
1551 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1552
1553 int32 operation;
1554 uint32 details; // for B_STAT_CHANGED:statFields
1555 // and B_ATTRIBUTE_CHANGED:cause
1556 dev_t device;
1557 ino_t oldDirectory;
1558 ino_t directory;
1559 ino_t node;
1560 Address oldName;
1561 Address name;
1562 };
1563
1564 // NotifyListenerReply
1565 class NotifyListenerReply : public ReplyRequest {
1566 public:
NotifyListenerReply()1567 NotifyListenerReply() : ReplyRequest(NOTIFY_LISTENER_REPLY) {}
1568 };
1569
1570 // NotifySelectRequest
1571 class NotifySelectEventRequest : public Request {
1572 public:
NotifySelectEventRequest()1573 NotifySelectEventRequest() : Request(NOTIFY_SELECT_EVENT_REQUEST) {}
1574
1575 selectsync* sync;
1576 uint8 event;
1577 bool unspecifiedEvent;
1578 };
1579
1580 // NotifySelectEventReply
1581 class NotifySelectEventReply : public ReplyRequest {
1582 public:
NotifySelectEventReply()1583 NotifySelectEventReply() : ReplyRequest(NOTIFY_SELECT_EVENT_REPLY) {}
1584 };
1585
1586 // NotifyQueryRequest
1587 class NotifyQueryRequest : public Request {
1588 public:
NotifyQueryRequest()1589 NotifyQueryRequest() : Request(NOTIFY_QUERY_REQUEST) {}
1590 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1591
1592 port_id port;
1593 int32 token;
1594 int32 operation; // B_ENTRY_{CREATED,REMOVED}
1595 dev_t device;
1596 ino_t directory;
1597 ino_t node;
1598 Address name;
1599 };
1600
1601 // NotifyQueryReply
1602 class NotifyQueryReply : public ReplyRequest {
1603 public:
NotifyQueryReply()1604 NotifyQueryReply() : ReplyRequest(NOTIFY_QUERY_REPLY) {}
1605 };
1606
1607
1608 // #pragma mark -
1609 // #pragma mark ----- vnodes -----
1610
1611 // GetVNodeRequest
1612 class GetVNodeRequest : public Request {
1613 public:
GetVNodeRequest()1614 GetVNodeRequest() : Request(GET_VNODE_REQUEST) {}
1615
1616 dev_t nsid;
1617 ino_t vnid;
1618 };
1619
1620 // GetVNodeReply
1621 class GetVNodeReply : public ReplyRequest {
1622 public:
GetVNodeReply()1623 GetVNodeReply() : ReplyRequest(GET_VNODE_REPLY) {}
1624
1625 void* node;
1626 };
1627
1628 // PutVNodeRequest
1629 class PutVNodeRequest : public Request {
1630 public:
PutVNodeRequest()1631 PutVNodeRequest() : Request(PUT_VNODE_REQUEST) {}
1632
1633 dev_t nsid;
1634 ino_t vnid;
1635 };
1636
1637 // PutVNodeReply
1638 class PutVNodeReply : public ReplyRequest {
1639 public:
PutVNodeReply()1640 PutVNodeReply() : ReplyRequest(PUT_VNODE_REPLY) {}
1641 };
1642
1643 // AcquireVNodeRequest
1644 class AcquireVNodeRequest : public Request {
1645 public:
AcquireVNodeRequest()1646 AcquireVNodeRequest() : Request(ACQUIRE_VNODE_REQUEST) {}
1647
1648 dev_t nsid;
1649 ino_t vnid;
1650 };
1651
1652 // AcquireVNodeReply
1653 class AcquireVNodeReply : public ReplyRequest {
1654 public:
AcquireVNodeReply()1655 AcquireVNodeReply() : ReplyRequest(ACQUIRE_VNODE_REPLY) {}
1656 };
1657
1658 // NewVNodeRequest
1659 class NewVNodeRequest : public Request {
1660 public:
NewVNodeRequest()1661 NewVNodeRequest() : Request(NEW_VNODE_REQUEST) {}
1662
1663 dev_t nsid;
1664 ino_t vnid;
1665 void* node;
1666 FSVNodeCapabilities capabilities;
1667 };
1668
1669 // NewVNodeReply
1670 class NewVNodeReply : public ReplyRequest {
1671 public:
NewVNodeReply()1672 NewVNodeReply() : ReplyRequest(NEW_VNODE_REPLY) {}
1673 };
1674
1675 // PublishVNodeRequest
1676 class PublishVNodeRequest : public Request {
1677 public:
PublishVNodeRequest()1678 PublishVNodeRequest() : Request(PUBLISH_VNODE_REQUEST) {}
1679
1680 dev_t nsid;
1681 ino_t vnid;
1682 void* node;
1683 int type;
1684 uint32 flags;
1685 FSVNodeCapabilities capabilities;
1686 };
1687
1688 // PublishVNodeReply
1689 class PublishVNodeReply : public ReplyRequest {
1690 public:
PublishVNodeReply()1691 PublishVNodeReply() : ReplyRequest(PUBLISH_VNODE_REPLY) {}
1692 };
1693
1694 // RemoveVNodeRequest
1695 class RemoveVNodeRequest : public Request {
1696 public:
RemoveVNodeRequest()1697 RemoveVNodeRequest() : Request(REMOVE_VNODE_REQUEST) {}
1698
1699 dev_t nsid;
1700 ino_t vnid;
1701 };
1702
1703 // RemoveVNodeReply
1704 class RemoveVNodeReply : public ReplyRequest {
1705 public:
RemoveVNodeReply()1706 RemoveVNodeReply() : ReplyRequest(REMOVE_VNODE_REPLY) {}
1707 };
1708
1709 // UnremoveVNodeRequest
1710 class UnremoveVNodeRequest : public Request {
1711 public:
UnremoveVNodeRequest()1712 UnremoveVNodeRequest() : Request(UNREMOVE_VNODE_REQUEST) {}
1713
1714 dev_t nsid;
1715 ino_t vnid;
1716 };
1717
1718 // UnremoveVNodeReply
1719 class UnremoveVNodeReply : public ReplyRequest {
1720 public:
UnremoveVNodeReply()1721 UnremoveVNodeReply() : ReplyRequest(UNREMOVE_VNODE_REPLY) {}
1722 };
1723
1724 // GetVNodeRemovedRequest
1725 class GetVNodeRemovedRequest : public Request {
1726 public:
GetVNodeRemovedRequest()1727 GetVNodeRemovedRequest() : Request(GET_VNODE_REMOVED_REQUEST) {}
1728
1729 dev_t nsid;
1730 ino_t vnid;
1731 };
1732
1733 // GetVNodeRemovedReply
1734 class GetVNodeRemovedReply : public ReplyRequest {
1735 public:
GetVNodeRemovedReply()1736 GetVNodeRemovedReply() : ReplyRequest(GET_VNODE_REMOVED_REPLY) {}
1737
1738 bool removed;
1739 };
1740
1741
1742 // #pragma mark - file cache
1743
1744
1745 // FileCacheCreateRequest
1746 class FileCacheCreateRequest : public FileCacheRequest {
1747 public:
FileCacheCreateRequest()1748 FileCacheCreateRequest() : FileCacheRequest(FILE_CACHE_CREATE_REQUEST) {}
1749
1750 off_t size;
1751 };
1752
1753 // FileCacheCreateReply
1754 class FileCacheCreateReply : public ReplyRequest {
1755 public:
FileCacheCreateReply()1756 FileCacheCreateReply() : ReplyRequest(FILE_CACHE_CREATE_REPLY) {}
1757 };
1758
1759 // FileCacheDeleteRequest
1760 class FileCacheDeleteRequest : public FileCacheRequest {
1761 public:
FileCacheDeleteRequest()1762 FileCacheDeleteRequest() : FileCacheRequest(FILE_CACHE_DELETE_REQUEST) {}
1763 };
1764
1765 // FileCacheDeleteReply
1766 class FileCacheDeleteReply : public ReplyRequest {
1767 public:
FileCacheDeleteReply()1768 FileCacheDeleteReply() : ReplyRequest(FILE_CACHE_DELETE_REPLY) {}
1769 };
1770
1771 // FileCacheSetEnabledRequest
1772 class FileCacheSetEnabledRequest : public FileCacheRequest {
1773 public:
FileCacheSetEnabledRequest()1774 FileCacheSetEnabledRequest()
1775 : FileCacheRequest(FILE_CACHE_SET_ENABLED_REQUEST) {}
1776
1777 bool enabled;
1778 };
1779
1780 // FileCacheSetEnabledReply
1781 class FileCacheSetEnabledReply : public ReplyRequest {
1782 public:
FileCacheSetEnabledReply()1783 FileCacheSetEnabledReply() : ReplyRequest(FILE_CACHE_SET_ENABLED_REPLY) {}
1784 };
1785
1786 // FileCacheSetSizeRequest
1787 class FileCacheSetSizeRequest : public FileCacheRequest {
1788 public:
FileCacheSetSizeRequest()1789 FileCacheSetSizeRequest() : FileCacheRequest(FILE_CACHE_SET_SIZE_REQUEST) {}
1790
1791 size_t size;
1792 };
1793
1794 // FileCacheSetSizeReply
1795 class FileCacheSetSizeReply : public ReplyRequest {
1796 public:
FileCacheSetSizeReply()1797 FileCacheSetSizeReply() : ReplyRequest(FILE_CACHE_SET_SIZE_REPLY) {}
1798 };
1799
1800
1801 // FileCacheSyncRequest
1802 class FileCacheSyncRequest : public FileCacheRequest {
1803 public:
FileCacheSyncRequest()1804 FileCacheSyncRequest() : FileCacheRequest(FILE_CACHE_SYNC_REQUEST) {}
1805 };
1806
1807 // FileCacheSyncReply
1808 class FileCacheSyncReply : public ReplyRequest {
1809 public:
FileCacheSyncReply()1810 FileCacheSyncReply() : ReplyRequest(FILE_CACHE_SYNC_REPLY) {}
1811 };
1812
1813
1814 // FileCacheReadRequest
1815 class FileCacheReadRequest : public FileCacheRequest {
1816 public:
FileCacheReadRequest()1817 FileCacheReadRequest() : FileCacheRequest(FILE_CACHE_READ_REQUEST) {}
1818
1819 void* cookie;
1820 off_t pos;
1821 size_t size;
1822 };
1823
1824 // FileCacheReadReply
1825 class FileCacheReadReply : public ReplyRequest {
1826 public:
FileCacheReadReply()1827 FileCacheReadReply() : ReplyRequest(FILE_CACHE_READ_REPLY) {}
1828 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1829
1830 Address buffer;
1831 size_t bytesRead;
1832 };
1833
1834 // FileCacheWriteRequest
1835 class FileCacheWriteRequest : public FileCacheRequest {
1836 public:
FileCacheWriteRequest()1837 FileCacheWriteRequest() : FileCacheRequest(FILE_CACHE_WRITE_REQUEST) {}
1838 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1839
1840 void* cookie;
1841 Address buffer;
1842 size_t size;
1843 off_t pos;
1844 };
1845
1846 // FileCacheWriteReply
1847 class FileCacheWriteReply : public ReplyRequest {
1848 public:
FileCacheWriteReply()1849 FileCacheWriteReply() : ReplyRequest(FILE_CACHE_WRITE_REPLY) {}
1850
1851 size_t bytesWritten;
1852 };
1853
1854
1855 // #pragma mark - I/O
1856
1857
1858 // DoIterativeFDIORequest
1859 class DoIterativeFDIORequest : public Request {
1860 public:
DoIterativeFDIORequest()1861 DoIterativeFDIORequest() : Request(DO_ITERATIVE_FD_IO_REQUEST) {}
1862
1863 enum { MAX_VECS = 8 };
1864
1865 dev_t nsid;
1866 int fd;
1867 int32 request;
1868 void* cookie;
1869 file_io_vec vecs[MAX_VECS];
1870 uint32 vecCount;
1871 };
1872
1873 // DoIterativeFDIOReply
1874 class DoIterativeFDIOReply : public ReplyRequest {
1875 public:
DoIterativeFDIOReply()1876 DoIterativeFDIOReply() : ReplyRequest(DO_ITERATIVE_FD_IO_REPLY) {}
1877 };
1878
1879 // ReadFromIORequestRequest
1880 class ReadFromIORequestRequest : public IORequestRequest {
1881 public:
ReadFromIORequestRequest()1882 ReadFromIORequestRequest()
1883 : IORequestRequest(READ_FROM_IO_REQUEST_REQUEST) {}
1884
1885 size_t size;
1886 };
1887
1888 // ReadFromIORequestReply
1889 class ReadFromIORequestReply : public ReplyRequest {
1890 public:
ReadFromIORequestReply()1891 ReadFromIORequestReply() : ReplyRequest(READ_FROM_IO_REQUEST_REPLY) {}
1892 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1893
1894 Address buffer;
1895 };
1896
1897 // WriteToIORequestRequest
1898 class WriteToIORequestRequest : public IORequestRequest {
1899 public:
WriteToIORequestRequest()1900 WriteToIORequestRequest() : IORequestRequest(WRITE_TO_IO_REQUEST_REQUEST) {}
1901 status_t GetAddressInfos(AddressInfo* infos, int32* count);
1902
1903 Address buffer;
1904 };
1905
1906 // WriteToIORequestReply
1907 class WriteToIORequestReply : public ReplyRequest {
1908 public:
WriteToIORequestReply()1909 WriteToIORequestReply() : ReplyRequest(WRITE_TO_IO_REQUEST_REPLY) {}
1910 };
1911
1912 // NotifyIORequestRequest
1913 class NotifyIORequestRequest : public IORequestRequest {
1914 public:
NotifyIORequestRequest()1915 NotifyIORequestRequest() : IORequestRequest(NOTIFY_IO_REQUEST_REQUEST) {}
1916
1917 enum { MAX_VECS = 8 };
1918
1919 status_t status;
1920 };
1921
1922 // NotifyIORequestReply
1923 class NotifyIORequestReply : public ReplyRequest {
1924 public:
NotifyIORequestReply()1925 NotifyIORequestReply() : ReplyRequest(NOTIFY_IO_REQUEST_REPLY) {}
1926 };
1927
1928
1929 // #pragma mark - node monitoring
1930
1931
1932 // AddNodeListenerRequest
1933 class AddNodeListenerRequest : public Request {
1934 public:
AddNodeListenerRequest()1935 AddNodeListenerRequest() : Request(ADD_NODE_LISTENER_REQUEST) {}
1936
1937 dev_t device;
1938 ino_t node;
1939 uint32 flags;
1940 void* listener;
1941 };
1942
1943 // AddNodeListenerReply
1944 class AddNodeListenerReply : public ReplyRequest {
1945 public:
AddNodeListenerReply()1946 AddNodeListenerReply() : ReplyRequest(ADD_NODE_LISTENER_REPLY) {}
1947 };
1948
1949 // RemoveNodeListenerRequest
1950 class RemoveNodeListenerRequest : public Request {
1951 public:
RemoveNodeListenerRequest()1952 RemoveNodeListenerRequest() : Request(REMOVE_NODE_LISTENER_REQUEST) {}
1953
1954 dev_t device;
1955 ino_t node;
1956 void* listener;
1957 };
1958
1959 // RemoveNodeListenerReply
1960 class RemoveNodeListenerReply : public ReplyRequest {
1961 public:
RemoveNodeListenerReply()1962 RemoveNodeListenerReply() : ReplyRequest(REMOVE_NODE_LISTENER_REPLY) {}
1963 };
1964
1965
1966 //////////////////
1967 // General Reply
1968
1969 // ReceiptAckReply
1970 class ReceiptAckReply : public ReplyRequest {
1971 public:
ReceiptAckReply()1972 ReceiptAckReply() : ReplyRequest(RECEIPT_ACK_REPLY) {}
1973 };
1974
1975
1976 ///////////////////
1977 // Request Checks
1978
1979 // do_for_request
1980 template<class Task>
1981 static
1982 status_t
do_for_request(Request * request,Task & task)1983 do_for_request(Request* request, Task& task)
1984 {
1985 if (!request)
1986 return B_BAD_VALUE;
1987 switch (request->GetType()) {
1988 // kernel -> userland requests
1989 // administrative
1990 case UFS_DISCONNECT_REQUEST:
1991 return task((UFSDisconnectRequest*)request);
1992 case FS_CONNECT_REQUEST:
1993 return task((FSConnectRequest*)request);
1994 case FS_CONNECT_REPLY:
1995 return task((FSConnectReply*)request);
1996 // FS
1997 case MOUNT_VOLUME_REQUEST:
1998 return task((MountVolumeRequest*)request);
1999 case MOUNT_VOLUME_REPLY:
2000 return task((MountVolumeReply*)request);
2001 case UNMOUNT_VOLUME_REQUEST:
2002 return task((UnmountVolumeRequest*)request);
2003 case UNMOUNT_VOLUME_REPLY:
2004 return task((UnmountVolumeReply*)request);
2005 // case INITIALIZE_VOLUME_REQUEST:
2006 // return task((InitializeVolumeRequest*)request);
2007 // case INITIALIZE_VOLUME_REPLY:
2008 // return task((InitializeVolumeReply*)request);
2009 case SYNC_VOLUME_REQUEST:
2010 return task((SyncVolumeRequest*)request);
2011 case SYNC_VOLUME_REPLY:
2012 return task((SyncVolumeReply*)request);
2013 case READ_FS_INFO_REQUEST:
2014 return task((ReadFSInfoRequest*)request);
2015 case READ_FS_INFO_REPLY:
2016 return task((ReadFSInfoReply*)request);
2017 case WRITE_FS_INFO_REQUEST:
2018 return task((WriteFSInfoRequest*)request);
2019 case WRITE_FS_INFO_REPLY:
2020 return task((WriteFSInfoReply*)request);
2021 // vnodes
2022 case LOOKUP_REQUEST:
2023 return task((LookupRequest*)request);
2024 case LOOKUP_REPLY:
2025 return task((LookupReply*)request);
2026 case GET_VNODE_NAME_REQUEST:
2027 return task((GetVNodeNameRequest*)request);
2028 case GET_VNODE_NAME_REPLY:
2029 return task((GetVNodeNameReply*)request);
2030 case READ_VNODE_REQUEST:
2031 return task((ReadVNodeRequest*)request);
2032 case READ_VNODE_REPLY:
2033 return task((ReadVNodeReply*)request);
2034 case WRITE_VNODE_REQUEST:
2035 return task((WriteVNodeRequest*)request);
2036 case WRITE_VNODE_REPLY:
2037 return task((WriteVNodeReply*)request);
2038 case FS_REMOVE_VNODE_REQUEST:
2039 return task((FSRemoveVNodeRequest*)request);
2040 case FS_REMOVE_VNODE_REPLY:
2041 return task((FSRemoveVNodeReply*)request);
2042 // asynchronous I/O
2043 case DO_IO_REQUEST:
2044 return task((DoIORequest*)request);
2045 case DO_IO_REPLY:
2046 return task((DoIOReply*)request);
2047 case CANCEL_IO_REQUEST:
2048 return task((CancelIORequest*)request);
2049 case CANCEL_IO_REPLY:
2050 return task((CancelIOReply*)request);
2051 case ITERATIVE_IO_GET_VECS_REQUEST:
2052 return task((IterativeIOGetVecsRequest*)request);
2053 case ITERATIVE_IO_GET_VECS_REPLY:
2054 return task((IterativeIOGetVecsReply*)request);
2055 case ITERATIVE_IO_FINISHED_REQUEST:
2056 return task((IterativeIOFinishedRequest*)request);
2057 case ITERATIVE_IO_FINISHED_REPLY:
2058 return task((IterativeIOFinishedReply*)request);
2059 // nodes
2060 case IOCTL_REQUEST:
2061 return task((IOCtlRequest*)request);
2062 case IOCTL_REPLY:
2063 return task((IOCtlReply*)request);
2064 case SET_FLAGS_REQUEST:
2065 return task((SetFlagsRequest*)request);
2066 case SET_FLAGS_REPLY:
2067 return task((SetFlagsReply*)request);
2068 case SELECT_REQUEST:
2069 return task((SelectRequest*)request);
2070 case SELECT_REPLY:
2071 return task((SelectReply*)request);
2072 case DESELECT_REQUEST:
2073 return task((DeselectRequest*)request);
2074 case DESELECT_REPLY:
2075 return task((DeselectReply*)request);
2076 case FSYNC_REQUEST:
2077 return task((FSyncRequest*)request);
2078 case FSYNC_REPLY:
2079 return task((FSyncReply*)request);
2080 case READ_SYMLINK_REQUEST:
2081 return task((ReadSymlinkRequest*)request);
2082 case READ_SYMLINK_REPLY:
2083 return task((ReadSymlinkReply*)request);
2084 case CREATE_SYMLINK_REQUEST:
2085 return task((CreateSymlinkRequest*)request);
2086 case CREATE_SYMLINK_REPLY:
2087 return task((CreateSymlinkReply*)request);
2088 case LINK_REQUEST:
2089 return task((LinkRequest*)request);
2090 case LINK_REPLY:
2091 return task((LinkReply*)request);
2092 case UNLINK_REQUEST:
2093 return task((UnlinkRequest*)request);
2094 case UNLINK_REPLY:
2095 return task((UnlinkReply*)request);
2096 case RENAME_REQUEST:
2097 return task((RenameRequest*)request);
2098 case RENAME_REPLY:
2099 return task((RenameReply*)request);
2100 case ACCESS_REQUEST:
2101 return task((AccessRequest*)request);
2102 case ACCESS_REPLY:
2103 return task((AccessReply*)request);
2104 case READ_STAT_REQUEST:
2105 return task((ReadStatRequest*)request);
2106 case READ_STAT_REPLY:
2107 return task((ReadStatReply*)request);
2108 case WRITE_STAT_REQUEST:
2109 return task((WriteStatRequest*)request);
2110 case WRITE_STAT_REPLY:
2111 return task((WriteStatReply*)request);
2112 // files
2113 case CREATE_REQUEST:
2114 return task((CreateRequest*)request);
2115 case CREATE_REPLY:
2116 return task((CreateReply*)request);
2117 case OPEN_REQUEST:
2118 return task((OpenRequest*)request);
2119 case OPEN_REPLY:
2120 return task((OpenReply*)request);
2121 case CLOSE_REQUEST:
2122 return task((CloseRequest*)request);
2123 case CLOSE_REPLY:
2124 return task((CloseReply*)request);
2125 case FREE_COOKIE_REQUEST:
2126 return task((FreeCookieRequest*)request);
2127 case FREE_COOKIE_REPLY:
2128 return task((FreeCookieReply*)request);
2129 case READ_REQUEST:
2130 return task((ReadRequest*)request);
2131 case READ_REPLY:
2132 return task((ReadReply*)request);
2133 case WRITE_REQUEST:
2134 return task((WriteRequest*)request);
2135 case WRITE_REPLY:
2136 return task((WriteReply*)request);
2137 // directories
2138 case CREATE_DIR_REQUEST:
2139 return task((CreateDirRequest*)request);
2140 case CREATE_DIR_REPLY:
2141 return task((CreateDirReply*)request);
2142 case REMOVE_DIR_REQUEST:
2143 return task((RemoveDirRequest*)request);
2144 case REMOVE_DIR_REPLY:
2145 return task((RemoveDirReply*)request);
2146 case OPEN_DIR_REQUEST:
2147 return task((OpenDirRequest*)request);
2148 case OPEN_DIR_REPLY:
2149 return task((OpenDirReply*)request);
2150 case CLOSE_DIR_REQUEST:
2151 return task((CloseDirRequest*)request);
2152 case CLOSE_DIR_REPLY:
2153 return task((CloseDirReply*)request);
2154 case FREE_DIR_COOKIE_REQUEST:
2155 return task((FreeDirCookieRequest*)request);
2156 case FREE_DIR_COOKIE_REPLY:
2157 return task((FreeDirCookieReply*)request);
2158 case READ_DIR_REQUEST:
2159 return task((ReadDirRequest*)request);
2160 case READ_DIR_REPLY:
2161 return task((ReadDirReply*)request);
2162 case REWIND_DIR_REQUEST:
2163 return task((RewindDirRequest*)request);
2164 case REWIND_DIR_REPLY:
2165 return task((RewindDirReply*)request);
2166 // attribute directories
2167 case OPEN_ATTR_DIR_REQUEST:
2168 return task((OpenAttrDirRequest*)request);
2169 case OPEN_ATTR_DIR_REPLY:
2170 return task((OpenAttrDirReply*)request);
2171 case CLOSE_ATTR_DIR_REQUEST:
2172 return task((CloseAttrDirRequest*)request);
2173 case CLOSE_ATTR_DIR_REPLY:
2174 return task((CloseAttrDirReply*)request);
2175 case FREE_ATTR_DIR_COOKIE_REQUEST:
2176 return task((FreeAttrDirCookieRequest*)request);
2177 case FREE_ATTR_DIR_COOKIE_REPLY:
2178 return task((FreeAttrDirCookieReply*)request);
2179 case READ_ATTR_DIR_REQUEST:
2180 return task((ReadAttrDirRequest*)request);
2181 case READ_ATTR_DIR_REPLY:
2182 return task((ReadAttrDirReply*)request);
2183 case REWIND_ATTR_DIR_REQUEST:
2184 return task((RewindAttrDirRequest*)request);
2185 case REWIND_ATTR_DIR_REPLY:
2186 return task((RewindAttrDirReply*)request);
2187 // attributes
2188 case CREATE_ATTR_REQUEST:
2189 return task((CreateAttrRequest*)request);
2190 case CREATE_ATTR_REPLY:
2191 return task((CreateAttrReply*)request);
2192 case OPEN_ATTR_REQUEST:
2193 return task((OpenAttrRequest*)request);
2194 case OPEN_ATTR_REPLY:
2195 return task((OpenAttrReply*)request);
2196 case CLOSE_ATTR_REQUEST:
2197 return task((CloseAttrRequest*)request);
2198 case CLOSE_ATTR_REPLY:
2199 return task((CloseAttrReply*)request);
2200 case FREE_ATTR_COOKIE_REQUEST:
2201 return task((FreeAttrCookieRequest*)request);
2202 case FREE_ATTR_COOKIE_REPLY:
2203 return task((FreeAttrCookieReply*)request);
2204 case READ_ATTR_REQUEST:
2205 return task((ReadAttrRequest*)request);
2206 case READ_ATTR_REPLY:
2207 return task((ReadAttrReply*)request);
2208 case WRITE_ATTR_REQUEST:
2209 return task((WriteAttrRequest*)request);
2210 case WRITE_ATTR_REPLY:
2211 return task((WriteAttrReply*)request);
2212 case READ_ATTR_STAT_REQUEST:
2213 return task((ReadAttrStatRequest*)request);
2214 case READ_ATTR_STAT_REPLY:
2215 return task((ReadAttrStatReply*)request);
2216 case WRITE_ATTR_STAT_REQUEST:
2217 return task((WriteAttrStatRequest*)request);
2218 case WRITE_ATTR_STAT_REPLY:
2219 return task((WriteAttrStatReply*)request);
2220 case RENAME_ATTR_REQUEST:
2221 return task((RenameAttrRequest*)request);
2222 case RENAME_ATTR_REPLY:
2223 return task((RenameAttrReply*)request);
2224 case REMOVE_ATTR_REQUEST:
2225 return task((RemoveAttrRequest*)request);
2226 case REMOVE_ATTR_REPLY:
2227 return task((RemoveAttrReply*)request);
2228 // indices
2229 case OPEN_INDEX_DIR_REQUEST:
2230 return task((OpenIndexDirRequest*)request);
2231 case OPEN_INDEX_DIR_REPLY:
2232 return task((OpenIndexDirReply*)request);
2233 case CLOSE_INDEX_DIR_REQUEST:
2234 return task((CloseIndexDirRequest*)request);
2235 case CLOSE_INDEX_DIR_REPLY:
2236 return task((CloseIndexDirReply*)request);
2237 case FREE_INDEX_DIR_COOKIE_REQUEST:
2238 return task((FreeIndexDirCookieRequest*)request);
2239 case FREE_INDEX_DIR_COOKIE_REPLY:
2240 return task((FreeIndexDirCookieReply*)request);
2241 case READ_INDEX_DIR_REQUEST:
2242 return task((ReadIndexDirRequest*)request);
2243 case READ_INDEX_DIR_REPLY:
2244 return task((ReadIndexDirReply*)request);
2245 case REWIND_INDEX_DIR_REQUEST:
2246 return task((RewindIndexDirRequest*)request);
2247 case REWIND_INDEX_DIR_REPLY:
2248 return task((RewindIndexDirReply*)request);
2249 case CREATE_INDEX_REQUEST:
2250 return task((CreateIndexRequest*)request);
2251 case CREATE_INDEX_REPLY:
2252 return task((CreateIndexReply*)request);
2253 case REMOVE_INDEX_REQUEST:
2254 return task((RemoveIndexRequest*)request);
2255 case REMOVE_INDEX_REPLY:
2256 return task((RemoveIndexReply*)request);
2257 case READ_INDEX_STAT_REQUEST:
2258 return task((ReadIndexStatRequest*)request);
2259 case READ_INDEX_STAT_REPLY:
2260 return task((ReadIndexStatReply*)request);
2261 // queries
2262 case OPEN_QUERY_REQUEST:
2263 return task((OpenQueryRequest*)request);
2264 case OPEN_QUERY_REPLY:
2265 return task((OpenQueryReply*)request);
2266 case CLOSE_QUERY_REQUEST:
2267 return task((CloseQueryRequest*)request);
2268 case CLOSE_QUERY_REPLY:
2269 return task((CloseQueryReply*)request);
2270 case FREE_QUERY_COOKIE_REQUEST:
2271 return task((FreeQueryCookieRequest*)request);
2272 case FREE_QUERY_COOKIE_REPLY:
2273 return task((FreeQueryCookieReply*)request);
2274 case READ_QUERY_REQUEST:
2275 return task((ReadQueryRequest*)request);
2276 case READ_QUERY_REPLY:
2277 return task((ReadQueryReply*)request);
2278 case REWIND_QUERY_REQUEST:
2279 return task((RewindQueryRequest*)request);
2280 case REWIND_QUERY_REPLY:
2281 return task((RewindQueryReply*)request);
2282 // node monitoring
2283 case NODE_MONITORING_EVENT_REQUEST:
2284 return task((NodeMonitoringEventRequest*)request);
2285 case NODE_MONITORING_EVENT_REPLY:
2286 return task((NodeMonitoringEventReply*)request);
2287
2288 // userland -> kernel requests
2289 // notifications
2290 case NOTIFY_LISTENER_REQUEST:
2291 return task((NotifyListenerRequest*)request);
2292 case NOTIFY_LISTENER_REPLY:
2293 return task((NotifyListenerReply*)request);
2294 case NOTIFY_SELECT_EVENT_REQUEST:
2295 return task((NotifySelectEventRequest*)request);
2296 case NOTIFY_SELECT_EVENT_REPLY:
2297 return task((NotifySelectEventReply*)request);
2298 case NOTIFY_QUERY_REQUEST:
2299 return task((NotifyQueryRequest*)request);
2300 case NOTIFY_QUERY_REPLY:
2301 return task((NotifyQueryReply*)request);
2302 // vnodes
2303 case GET_VNODE_REQUEST:
2304 return task((GetVNodeRequest*)request);
2305 case GET_VNODE_REPLY:
2306 return task((GetVNodeReply*)request);
2307 case PUT_VNODE_REQUEST:
2308 return task((PutVNodeRequest*)request);
2309 case PUT_VNODE_REPLY:
2310 return task((PutVNodeReply*)request);
2311 case ACQUIRE_VNODE_REQUEST:
2312 return task((PutVNodeRequest*)request);
2313 case ACQUIRE_VNODE_REPLY:
2314 return task((AcquireVNodeReply*)request);
2315 case NEW_VNODE_REQUEST:
2316 return task((NewVNodeRequest*)request);
2317 case NEW_VNODE_REPLY:
2318 return task((NewVNodeReply*)request);
2319 case PUBLISH_VNODE_REQUEST:
2320 return task((PublishVNodeRequest*)request);
2321 case PUBLISH_VNODE_REPLY:
2322 return task((PublishVNodeReply*)request);
2323 case REMOVE_VNODE_REQUEST:
2324 return task((RemoveVNodeRequest*)request);
2325 case REMOVE_VNODE_REPLY:
2326 return task((RemoveVNodeReply*)request);
2327 case UNREMOVE_VNODE_REQUEST:
2328 return task((UnremoveVNodeRequest*)request);
2329 case UNREMOVE_VNODE_REPLY:
2330 return task((UnremoveVNodeReply*)request);
2331 case GET_VNODE_REMOVED_REQUEST:
2332 return task((GetVNodeRemovedRequest*)request);
2333 case GET_VNODE_REMOVED_REPLY:
2334 return task((GetVNodeRemovedReply*)request);
2335 // file cache
2336 case FILE_CACHE_CREATE_REQUEST:
2337 return task((FileCacheCreateRequest*)request);
2338 case FILE_CACHE_CREATE_REPLY:
2339 return task((FileCacheCreateReply*)request);
2340 case FILE_CACHE_DELETE_REQUEST:
2341 return task((FileCacheDeleteRequest*)request);
2342 case FILE_CACHE_DELETE_REPLY:
2343 return task((FileCacheDeleteReply*)request);
2344 case FILE_CACHE_SET_ENABLED_REQUEST:
2345 return task((FileCacheSetEnabledRequest*)request);
2346 case FILE_CACHE_SET_ENABLED_REPLY:
2347 return task((FileCacheSetEnabledReply*)request);
2348 case FILE_CACHE_SET_SIZE_REQUEST:
2349 return task((FileCacheSetSizeRequest*)request);
2350 case FILE_CACHE_SET_SIZE_REPLY:
2351 return task((FileCacheSetSizeReply*)request);
2352 case FILE_CACHE_SYNC_REQUEST:
2353 return task((FileCacheSyncRequest*)request);
2354 case FILE_CACHE_SYNC_REPLY:
2355 return task((FileCacheSyncReply*)request);
2356 case FILE_CACHE_READ_REQUEST:
2357 return task((FileCacheReadRequest*)request);
2358 case FILE_CACHE_READ_REPLY:
2359 return task((FileCacheReadReply*)request);
2360 case FILE_CACHE_WRITE_REQUEST:
2361 return task((FileCacheWriteRequest*)request);
2362 case FILE_CACHE_WRITE_REPLY:
2363 return task((FileCacheWriteReply*)request);
2364 // I/O
2365 case DO_ITERATIVE_FD_IO_REQUEST:
2366 return task((DoIterativeFDIORequest*)request);
2367 case DO_ITERATIVE_FD_IO_REPLY:
2368 return task((DoIterativeFDIOReply*)request);
2369 case READ_FROM_IO_REQUEST_REQUEST:
2370 return task((ReadFromIORequestRequest*)request);
2371 case READ_FROM_IO_REQUEST_REPLY:
2372 return task((ReadFromIORequestReply*)request);
2373 case WRITE_TO_IO_REQUEST_REQUEST:
2374 return task((WriteToIORequestRequest*)request);
2375 case WRITE_TO_IO_REQUEST_REPLY:
2376 return task((WriteToIORequestReply*)request);
2377 case NOTIFY_IO_REQUEST_REQUEST:
2378 return task((NotifyIORequestRequest*)request);
2379 case NOTIFY_IO_REQUEST_REPLY:
2380 return task((NotifyIORequestReply*)request);
2381 // node monitoring
2382 case ADD_NODE_LISTENER_REQUEST:
2383 return task((AddNodeListenerRequest*)request);
2384 case ADD_NODE_LISTENER_REPLY:
2385 return task((AddNodeListenerReply*)request);
2386 case REMOVE_NODE_LISTENER_REQUEST:
2387 return task((RemoveNodeListenerRequest*)request);
2388 case REMOVE_NODE_LISTENER_REPLY:
2389 return task((RemoveNodeListenerReply*)request);
2390 // general reply
2391 case RECEIPT_ACK_REPLY:
2392 return task((ReceiptAckReply*)request);
2393 default:
2394 return B_BAD_DATA;
2395 }
2396 }
2397
2398 status_t get_request_address_infos(Request* request, AddressInfo* infos,
2399 int32* count);
2400 status_t check_request(Request* request);
2401 status_t relocate_request(Request* request, int32 requestBufferSize,
2402 area_id* areas, int32* count);
2403
2404 } // namespace UserlandFSUtil
2405
2406 using UserlandFSUtil::ReplyRequest;
2407 using UserlandFSUtil::KernelRequest;
2408 using UserlandFSUtil::VolumeRequest;
2409 using UserlandFSUtil::NodeRequest;
2410 using UserlandFSUtil::FileRequest;
2411 using UserlandFSUtil::DirRequest;
2412 using UserlandFSUtil::AttrDirRequest;
2413 using UserlandFSUtil::IndexDirRequest;
2414
2415 // kernel -> userland requests
2416 // administrative
2417 using UserlandFSUtil::UFSDisconnectRequest;
2418 using UserlandFSUtil::FSConnectRequest;
2419 using UserlandFSUtil::FSConnectReply;
2420 // FS
2421 using UserlandFSUtil::MountVolumeRequest;
2422 using UserlandFSUtil::MountVolumeReply;
2423 using UserlandFSUtil::UnmountVolumeRequest;
2424 using UserlandFSUtil::UnmountVolumeReply;
2425 //using UserlandFSUtil::InitializeVolumeRequest;
2426 //using UserlandFSUtil::InitializeVolumeReply;
2427 using UserlandFSUtil::SyncVolumeRequest;
2428 using UserlandFSUtil::SyncVolumeReply;
2429 using UserlandFSUtil::ReadFSInfoRequest;
2430 using UserlandFSUtil::ReadFSInfoReply;
2431 using UserlandFSUtil::WriteFSInfoRequest;
2432 using UserlandFSUtil::WriteFSInfoReply;
2433 // vnodes
2434 using UserlandFSUtil::LookupRequest;
2435 using UserlandFSUtil::LookupReply;
2436 using UserlandFSUtil::GetVNodeNameRequest;
2437 using UserlandFSUtil::GetVNodeNameReply;
2438 using UserlandFSUtil::ReadVNodeRequest;
2439 using UserlandFSUtil::ReadVNodeReply;
2440 using UserlandFSUtil::WriteVNodeRequest;
2441 using UserlandFSUtil::WriteVNodeReply;
2442 using UserlandFSUtil::FSRemoveVNodeRequest;
2443 using UserlandFSUtil::FSRemoveVNodeReply;
2444 // asynchronous I/O
2445 using UserlandFSUtil::DoIORequest;
2446 using UserlandFSUtil::DoIOReply;
2447 using UserlandFSUtil::CancelIORequest;
2448 using UserlandFSUtil::CancelIOReply;
2449 using UserlandFSUtil::IterativeIOGetVecsRequest;
2450 using UserlandFSUtil::IterativeIOGetVecsReply;
2451 using UserlandFSUtil::IterativeIOFinishedRequest;
2452 using UserlandFSUtil::IterativeIOFinishedReply;
2453 // nodes
2454 using UserlandFSUtil::IOCtlRequest;
2455 using UserlandFSUtil::IOCtlReply;
2456 using UserlandFSUtil::SetFlagsRequest;
2457 using UserlandFSUtil::SetFlagsReply;
2458 using UserlandFSUtil::SelectRequest;
2459 using UserlandFSUtil::SelectReply;
2460 using UserlandFSUtil::DeselectRequest;
2461 using UserlandFSUtil::DeselectReply;
2462 using UserlandFSUtil::FSyncRequest;
2463 using UserlandFSUtil::FSyncReply;
2464 using UserlandFSUtil::ReadSymlinkRequest;
2465 using UserlandFSUtil::ReadSymlinkReply;
2466 using UserlandFSUtil::CreateSymlinkRequest;
2467 using UserlandFSUtil::CreateSymlinkReply;
2468 using UserlandFSUtil::LinkRequest;
2469 using UserlandFSUtil::LinkReply;
2470 using UserlandFSUtil::UnlinkRequest;
2471 using UserlandFSUtil::UnlinkReply;
2472 using UserlandFSUtil::RenameRequest;
2473 using UserlandFSUtil::RenameReply;
2474 using UserlandFSUtil::AccessRequest;
2475 using UserlandFSUtil::AccessReply;
2476 using UserlandFSUtil::ReadStatRequest;
2477 using UserlandFSUtil::ReadStatReply;
2478 using UserlandFSUtil::WriteStatRequest;
2479 using UserlandFSUtil::WriteStatReply;
2480 // files
2481 using UserlandFSUtil::CreateRequest;
2482 using UserlandFSUtil::CreateReply;
2483 using UserlandFSUtil::OpenRequest;
2484 using UserlandFSUtil::OpenReply;
2485 using UserlandFSUtil::CloseRequest;
2486 using UserlandFSUtil::CloseReply;
2487 using UserlandFSUtil::FreeCookieRequest;
2488 using UserlandFSUtil::FreeCookieReply;
2489 using UserlandFSUtil::ReadRequest;
2490 using UserlandFSUtil::ReadReply;
2491 using UserlandFSUtil::WriteRequest;
2492 using UserlandFSUtil::WriteReply;
2493 // directories
2494 using UserlandFSUtil::CreateDirRequest;
2495 using UserlandFSUtil::CreateDirReply;
2496 using UserlandFSUtil::RemoveDirRequest;
2497 using UserlandFSUtil::RemoveDirReply;
2498 using UserlandFSUtil::OpenDirRequest;
2499 using UserlandFSUtil::OpenDirReply;
2500 using UserlandFSUtil::CloseDirRequest;
2501 using UserlandFSUtil::CloseDirReply;
2502 using UserlandFSUtil::FreeDirCookieRequest;
2503 using UserlandFSUtil::FreeDirCookieReply;
2504 using UserlandFSUtil::ReadDirRequest;
2505 using UserlandFSUtil::ReadDirReply;
2506 using UserlandFSUtil::RewindDirRequest;
2507 using UserlandFSUtil::RewindDirReply;
2508 // attribute directories
2509 using UserlandFSUtil::OpenAttrDirRequest;
2510 using UserlandFSUtil::OpenAttrDirReply;
2511 using UserlandFSUtil::CloseAttrDirRequest;
2512 using UserlandFSUtil::CloseAttrDirReply;
2513 using UserlandFSUtil::FreeAttrDirCookieRequest;
2514 using UserlandFSUtil::FreeAttrDirCookieReply;
2515 using UserlandFSUtil::ReadAttrDirRequest;
2516 using UserlandFSUtil::ReadAttrDirReply;
2517 using UserlandFSUtil::RewindAttrDirRequest;
2518 using UserlandFSUtil::RewindAttrDirReply;
2519 // attributes
2520 using UserlandFSUtil::CreateAttrRequest;
2521 using UserlandFSUtil::CreateAttrReply;
2522 using UserlandFSUtil::OpenAttrRequest;
2523 using UserlandFSUtil::OpenAttrReply;
2524 using UserlandFSUtil::CloseAttrRequest;
2525 using UserlandFSUtil::CloseAttrReply;
2526 using UserlandFSUtil::FreeAttrCookieRequest;
2527 using UserlandFSUtil::FreeAttrCookieReply;
2528 using UserlandFSUtil::ReadAttrRequest;
2529 using UserlandFSUtil::ReadAttrReply;
2530 using UserlandFSUtil::WriteAttrRequest;
2531 using UserlandFSUtil::WriteAttrReply;
2532 using UserlandFSUtil::ReadAttrStatRequest;
2533 using UserlandFSUtil::ReadAttrStatReply;
2534 using UserlandFSUtil::WriteAttrStatRequest;
2535 using UserlandFSUtil::WriteAttrStatReply;
2536 using UserlandFSUtil::RenameAttrRequest;
2537 using UserlandFSUtil::RenameAttrReply;
2538 using UserlandFSUtil::RemoveAttrRequest;
2539 using UserlandFSUtil::RemoveAttrReply;
2540 // indices
2541 using UserlandFSUtil::OpenIndexDirRequest;
2542 using UserlandFSUtil::OpenIndexDirReply;
2543 using UserlandFSUtil::CloseIndexDirRequest;
2544 using UserlandFSUtil::CloseIndexDirReply;
2545 using UserlandFSUtil::FreeIndexDirCookieRequest;
2546 using UserlandFSUtil::FreeIndexDirCookieReply;
2547 using UserlandFSUtil::ReadIndexDirRequest;
2548 using UserlandFSUtil::ReadIndexDirReply;
2549 using UserlandFSUtil::RewindIndexDirRequest;
2550 using UserlandFSUtil::RewindIndexDirReply;
2551 using UserlandFSUtil::CreateIndexRequest;
2552 using UserlandFSUtil::CreateIndexReply;
2553 using UserlandFSUtil::RemoveIndexRequest;
2554 using UserlandFSUtil::RemoveIndexReply;
2555 using UserlandFSUtil::ReadIndexStatRequest;
2556 using UserlandFSUtil::ReadIndexStatReply;
2557 // queries
2558 using UserlandFSUtil::OpenQueryRequest;
2559 using UserlandFSUtil::OpenQueryReply;
2560 using UserlandFSUtil::CloseQueryRequest;
2561 using UserlandFSUtil::CloseQueryReply;
2562 using UserlandFSUtil::FreeQueryCookieRequest;
2563 using UserlandFSUtil::FreeQueryCookieReply;
2564 using UserlandFSUtil::ReadQueryRequest;
2565 using UserlandFSUtil::ReadQueryReply;
2566 using UserlandFSUtil::RewindQueryRequest;
2567 using UserlandFSUtil::RewindQueryReply;
2568 // node monitoring
2569 using UserlandFSUtil::NodeMonitoringEventRequest;
2570 using UserlandFSUtil::NodeMonitoringEventReply;
2571
2572 // userland -> kernel requests
2573 // notifications
2574 using UserlandFSUtil::NotifyListenerRequest;
2575 using UserlandFSUtil::NotifyListenerReply;
2576 using UserlandFSUtil::NotifySelectEventRequest;
2577 using UserlandFSUtil::NotifySelectEventReply;
2578 using UserlandFSUtil::NotifyQueryRequest;
2579 using UserlandFSUtil::NotifyQueryReply;
2580 // vnodes
2581 using UserlandFSUtil::GetVNodeRequest;
2582 using UserlandFSUtil::GetVNodeReply;
2583 using UserlandFSUtil::PutVNodeRequest;
2584 using UserlandFSUtil::PutVNodeReply;
2585 using UserlandFSUtil::AcquireVNodeRequest;
2586 using UserlandFSUtil::AcquireVNodeReply;
2587 using UserlandFSUtil::NewVNodeRequest;
2588 using UserlandFSUtil::NewVNodeReply;
2589 using UserlandFSUtil::PublishVNodeRequest;
2590 using UserlandFSUtil::PublishVNodeReply;
2591 using UserlandFSUtil::RemoveVNodeRequest;
2592 using UserlandFSUtil::RemoveVNodeReply;
2593 using UserlandFSUtil::UnremoveVNodeRequest;
2594 using UserlandFSUtil::UnremoveVNodeReply;
2595 using UserlandFSUtil::GetVNodeRemovedRequest;
2596 using UserlandFSUtil::GetVNodeRemovedReply;
2597 // file cache
2598 using UserlandFSUtil::FileCacheCreateRequest;
2599 using UserlandFSUtil::FileCacheCreateReply;
2600 using UserlandFSUtil::FileCacheDeleteRequest;
2601 using UserlandFSUtil::FileCacheDeleteReply;
2602 using UserlandFSUtil::FileCacheSetEnabledRequest;
2603 using UserlandFSUtil::FileCacheSetEnabledReply;
2604 using UserlandFSUtil::FileCacheSetSizeRequest;
2605 using UserlandFSUtil::FileCacheSetSizeReply;
2606 using UserlandFSUtil::FileCacheSyncRequest;
2607 using UserlandFSUtil::FileCacheSyncReply;
2608 using UserlandFSUtil::FileCacheReadRequest;
2609 using UserlandFSUtil::FileCacheReadReply;
2610 using UserlandFSUtil::FileCacheWriteRequest;
2611 using UserlandFSUtil::FileCacheWriteReply;
2612 // I/O
2613 using UserlandFSUtil::DoIterativeFDIORequest;
2614 using UserlandFSUtil::DoIterativeFDIOReply;
2615 using UserlandFSUtil::ReadFromIORequestRequest;
2616 using UserlandFSUtil::ReadFromIORequestReply;
2617 using UserlandFSUtil::WriteToIORequestRequest;
2618 using UserlandFSUtil::WriteToIORequestReply;
2619 using UserlandFSUtil::NotifyIORequestRequest;
2620 using UserlandFSUtil::NotifyIORequestReply;
2621 // node monitoring
2622 using UserlandFSUtil::AddNodeListenerRequest;
2623 using UserlandFSUtil::AddNodeListenerReply;
2624 using UserlandFSUtil::RemoveNodeListenerRequest;
2625 using UserlandFSUtil::RemoveNodeListenerReply;
2626 // general reply
2627 using UserlandFSUtil::ReceiptAckReply;
2628
2629 using UserlandFSUtil::do_for_request;
2630 using UserlandFSUtil::get_request_address_infos;
2631 using UserlandFSUtil::check_request;
2632 using UserlandFSUtil::relocate_request;
2633
2634 #endif // USERLAND_FS_REQUESTS_H
2635