126
126
HGFS_OP_DESTROY_SESSION_V4, /* Destroy/close session. */
127
127
HGFS_OP_READ_FAST_V4, /* Read */
128
128
HGFS_OP_WRITE_FAST_V4, /* Write */
129
HGFS_OP_SET_WATCH_V4, /* Start monitoring directory changes. */
130
HGFS_OP_REMOVE_WATCH_V4, /* Stop monitoring directory changes. */
131
HGFS_OP_NOTIFY_V4, /* Notification for a directory change event. */
129
132
HGFS_OP_OPEN_V4, /* Open file */
130
133
HGFS_OP_DIRECTORY_READ_V4, /* Read directory entries. */
131
134
HGFS_OP_ENUMERATE_STREAMS_V4, /* Enumerate alternative named streams for a file. */
143
146
HGFS_OP_UNLOCK_BYTE_RANGE_V4, /* Release byte range lock. */
144
147
HGFS_OP_QUERY_EAS_V4, /* Query extended attributes. */
145
148
HGFS_OP_SET_EAS_V4, /* Add or modify extended attributes. */
146
HGFS_OP_SET_WATCH_V4, /* Start monitoring directory changes. */
147
HGFS_OP_REMOVE_WATCH_V4, /* Stop monitoring directory changes. */
148
HGFS_OP_NOTIFY_V4, /* Notification for a directory change event. */
150
150
HGFS_OP_MAX, /* Dummy op, must be last in enum */
1813
1813
#include "vmware_pack_begin.h"
1814
struct HgfsRequestSetWatch {
1814
struct HgfsRequestSetWatchV4 {
1815
1815
uint64 events; /* What events to watch? */
1816
1816
uint32 flags; /* Flags. */
1817
1817
uint64 reserved; /* Reserved for future use. */
1818
1818
HgfsFileNameV3 fileName; /* Filename to watch. */
1820
1820
#include "vmware_pack_end.h"
1821
HgfsRequestSetWatch;
1821
HgfsRequestSetWatchV4;
1824
1824
* Coarse grain notification event types.
1832
1832
* Fine grain notification event types.
1833
1833
* HgfsRequestSetWatch events.
1834
* Events marked with (*) apply only to directories.
1836
#define HGFS_NOTIFY_ACCESS (1 << 0) /* File accessed (read) */
1837
#define HGFS_NOTIFY_ATTRIB (1 << 1) /* Windows file attributes changed. */
1838
#define HGFS_NOTIFY_SIZE (1 << 2) /* File size changed. */
1839
#define HGFS_NOTIFY_ATIME (1 << 3) /* Access time changed. */
1840
#define HGFS_NOTIFY_MTIME (1 << 4) /* Modification time changed. */
1841
#define HGFS_NOTIFY_CTIME (1 << 5) /* Attribute change time changed. */
1842
#define HGFS_NOTIFY_CRTIME (1 << 6) /* Creation time changed. */
1843
#define HGFS_NOTIFY_NAME (1 << 7) /* File / Directory name changed. */
1844
#define HGFS_NOTIFY_OPEN (1 << 8) /* File opened */
1845
#define HGFS_NOTIFY_CLOSE_WRITE (1 << 9) /* File opened for writing closed */
1846
#define HGFS_NOTIFY_CLOSE_NOWRITE (1 << 10) /* File opened for reading closed */
1847
#define HGFS_NOTIFY_CREATE (1 << 11) /* File / directory created */
1848
#define HGFS_NOTIFY_DELETE (1 << 12) /* (*) File / directory deleted */
1849
#define HGFS_NOTIFY_DELETE_SELF (1 << 13) /* Watched file / directory deleted */
1850
#define HGFS_NOTIFY_MODIFY (1 << 14) /* File or directory modified. */
1851
#define HGFS_NOTIFY_MOVE_SELF (1 << 15) /* Watched file / directory moved. */
1852
#define HGFS_NOTIFY_MOVE_FROM (1 << 16) /* (*) Moved out of watched directory. */
1853
#define HGFS_NOTIFY_MOVE_TO (1 << 17) /* (*) Moved into watched directory. */
1854
#define HGFS_NOTIFY_RENAME (1 << 18) /* File / directory name changed. */
1835
#define HGFS_NOTIFY_ACCESS (1 << 0) /* File accessed (read) */
1836
#define HGFS_NOTIFY_ATTRIB (1 << 1) /* File attributes changed. */
1837
#define HGFS_NOTIFY_SIZE (1 << 2) /* File size changed. */
1838
#define HGFS_NOTIFY_ATIME (1 << 3) /* Access time changed. */
1839
#define HGFS_NOTIFY_MTIME (1 << 4) /* Modification time changed. */
1840
#define HGFS_NOTIFY_CTIME (1 << 5) /* Attribute time changed. */
1841
#define HGFS_NOTIFY_CRTIME (1 << 6) /* Creation time changed. */
1842
#define HGFS_NOTIFY_NAME (1 << 7) /* File / Directory name. */
1843
#define HGFS_NOTIFY_OPEN (1 << 8) /* File opened */
1844
#define HGFS_NOTIFY_CLOSE_WRITE (1 << 9) /* Modified file closed. */
1845
#define HGFS_NOTIFY_CLOSE_NOWRITE (1 << 10) /* Non-modified file closed. */
1846
#define HGFS_NOTIFY_CREATE_FILE (1 << 11) /* File created */
1847
#define HGFS_NOTIFY_CREATE_DIR (1 << 12) /* Directory created */
1848
#define HGFS_NOTIFY_DELETE_FILE (1 << 13) /* File deleted */
1849
#define HGFS_NOTIFY_DELETE_DIR (1 << 14) /* Directory deleted */
1850
#define HGFS_NOTIFY_DELETE_SELF (1 << 15) /* Watched directory deleted */
1851
#define HGFS_NOTIFY_MODIFY (1 << 16) /* File modified. */
1852
#define HGFS_NOTIFY_MOVE_SELF (1 << 17) /* Watched directory moved. */
1853
#define HGFS_NOTIFY_OLD_FILE_NAME (1 << 18) /* Rename: old file name. */
1854
#define HGFS_NOTIFY_NEW_FILE_NAME (1 << 19) /* Rename: new file name. */
1855
#define HGFS_NOTIFY_OLD_DIR_NAME (1 << 20) /* Rename: old dir name. */
1856
#define HGFS_NOTIFY_NEW_DIR_NAME (1 << 21) /* Rename: new dir name. */
1857
#define HGFS_NOTIFY_CHANGE_EA (1 << 22) /* Extended attributes. */
1858
#define HGFS_NOTIFY_CHANGE_SECURITY (1 << 23) /* Security/permissions. */
1859
#define HGFS_NOTIFY_ADD_STREAM (1 << 24) /* Named stream created. */
1860
#define HGFS_NOTIFY_DELETE_STREAM (1 << 25) /* Named stream deleted. */
1861
#define HGFS_NOTIFY_CHANGE_STREAM_SIZE (1 << 26) /* Named stream size changed. */
1862
#define HGFS_NOTIFY_CHANGE_STREAM_LAST_WRITE (1 << 27) /* Stream timestamp changed. */
1863
#define HGFS_NOTIFY_WATCH_DELETED (1 << 28) /* Dir with watch deleted. */
1864
#define HGFS_NOTIFY_EVENTS_DROPPED (1 << 29) /* Notifications dropped. */
1856
1866
/* HgfsRequestSetWatch flags. */
1857
1867
#define HGFS_NOTIFY_FLAG_WATCH_TREE (1 << 0) /* Watch the entire directory tree. */
1868
#include "vmware_pack_begin.h"
1869
struct HgfsReplySetWatch {
1870
HgfsHandle watchId; /* Watch identifier for subsequent references. */
1871
uint64 reserved; /* Reserved for future use. */
1873
#include "vmware_pack_end.h"
1877
#include "vmware_pack_begin.h"
1878
struct HgfsRequestRemoveWatch {
1879
HgfsHandle watchId; /* Watch identifier to remove. */
1881
#include "vmware_pack_end.h"
1882
HgfsRequestRemoveWatch;
1885
#include "vmware_pack_begin.h"
1886
struct HgfsReplyRemoveWatch {
1887
uint64 reserved; /* Reserved for future use. */
1889
#include "vmware_pack_end.h"
1890
HgfsReplyRemoveWatch;
1893
#include "vmware_pack_begin.h"
1894
struct HgfsNotifyEvent {
1877
typedef uint64 HgfsSubscriberHandle;
1878
#define HGFS_INVALID_SUBSCRIBER_HANDLE ((HgfsSubscriberHandle)~((HgfsSubscriberHandle)0))
1881
#include "vmware_pack_begin.h"
1882
struct HgfsReplySetWatchV4 {
1883
HgfsSubscriberHandle watchId; /* Watch identifier for subsequent references. */
1884
uint64 reserved; /* Reserved for future use. */
1886
#include "vmware_pack_end.h"
1887
HgfsReplySetWatchV4;
1890
#include "vmware_pack_begin.h"
1891
struct HgfsRequestRemoveWatchV4 {
1892
HgfsSubscriberHandle watchId; /* Watch identifier to remove. */
1894
#include "vmware_pack_end.h"
1895
HgfsRequestRemoveWatchV4;
1898
#include "vmware_pack_begin.h"
1899
struct HgfsReplyRemoveWatchV4 {
1900
uint64 reserved; /* Reserved for future use. */
1902
#include "vmware_pack_end.h"
1903
HgfsReplyRemoveWatchV4;
1906
#include "vmware_pack_begin.h"
1907
struct HgfsNotifyEventV4 {
1895
1908
uint32 nextOffset; /* Offset of next event; 0 if it i sthe last one. */
1896
1909
uint64 mask; /* Event occurred. */
1897
1910
uint64 reserved; /* Reserved for future use. */
1898
1911
HgfsFileName fileName; /* Filename. */
1899
HgfsFileName oldName; /* New filename for rename operation. */
1901
1913
#include "vmware_pack_end.h"
1904
1916
/* Too many events, some or all event were dropped by the server. */
1905
1917
#define HGFS_NOTIFY_FLAG_OVERFLOW (1 << 0)
1912
1924
#include "vmware_pack_begin.h"
1913
struct HgfsRequestNotify {
1914
HgfsHandle watchId; /* Watch identifier. */
1915
uint32 flags; /* Various flags. */
1916
uint32 count; /* Number of events occured. */
1917
uint64 reserved; /* Reserved for future use. */
1918
HgfsNotifyEvent events[1]; /* Events. HgfsNotifyEvent(s). */
1925
struct HgfsRequestNotifyV4 {
1926
HgfsSubscriberHandle watchId; /* Watch identifier. */
1927
uint32 flags; /* Various flags. */
1928
uint32 count; /* Number of events occured. */
1929
uint64 reserved; /* Reserved for future use. */
1930
HgfsNotifyEventV4 events[1]; /* Events. HgfsNotifyEvent(s). */
1920
1932
#include "vmware_pack_end.h"
1933
HgfsRequestNotifyV4;
1923
1935
// Query EA flags values.
1924
1936
#define HGFS_QUERY_EA_INDEX_SPECIFIED (1 << 0)
1955
1967
char eaData[1]; /* NULL termianed EA name followed by EA value. */
1957
1969
#include "vmware_pack_end.h"
1962
1974
#include "vmware_pack_begin.h"
1964
1976
uint32 nextOffset; /* Offset of the next structure in the chain. */
1965
1977
uint32 valueLength; /* EA value length. */
1966
1978
char data[1]; /* NULL terminated EA name followed by EA value. */
1968
1980
#include "vmware_pack_end.h"
1972
#include "vmware_pack_begin.h"
1973
struct HgfsRequestSetEA {
1974
uint32 flags; /* Flags, see below. */
1975
uint64 reserved; /* Reserved for future use. */
1976
uint32 numEAs; /* Number of EAs in this request. */
1977
HgfsEA attributes[1]; /* Array of attributes. */
1979
#include "vmware_pack_end.h"
1983
#include "vmware_pack_begin.h"
1984
struct HgfsReplySetEA {
1985
uint64 reserved; /* Reserved for future use. */
1987
#include "vmware_pack_end.h"
1984
#include "vmware_pack_begin.h"
1985
struct HgfsRequestSetEAV4 {
1986
uint32 flags; /* Flags, see below. */
1987
uint64 reserved; /* Reserved for future use. */
1988
uint32 numEAs; /* Number of EAs in this request. */
1989
HgfsEAV4 attributes[1]; /* Array of attributes. */
1991
#include "vmware_pack_end.h"
1995
#include "vmware_pack_begin.h"
1996
struct HgfsReplySetEAV4 {
1997
uint64 reserved; /* Reserved for future use. */
1999
#include "vmware_pack_end.h"
1991
2003
* EA Flags. When both flags are set EA is either created or replaced if it exists.
2015
2027
uint64 reserved; /* Reserved for future use. */
2017
2029
#include "vmware_pack_end.h"
2018
HgfsRequestLockRange;
2030
HgfsRequestLockRangeV4;
2021
2033
#include "vmware_pack_begin.h"
2022
struct HgfsReplyLockRange {
2034
struct HgfsReplyLockRangeV4 {
2023
2035
uint64 reserved; /* Reserved for future use. */
2025
2037
#include "vmware_pack_end.h"
2038
HgfsReplyLockRangeV4;
2028
2040
#define HGFS_RANGE_LOCK_UNLOCK_ALL (1 << 0)
2031
2043
#include "vmware_pack_begin.h"
2032
struct HgfsRequestUnlockRange {
2044
struct HgfsRequestUnlockRangeV4 {
2033
2045
HgfsHandle fid; /* File to take lock on. */
2034
2046
uint32 flags; /* Various flags. */
2035
2047
uint64 start; /* Starting offset in the file. */
2036
2048
uint64 length; /* Number of bytes to lock. */
2049
uint64 reserved; /* Reserved for future use. */
2038
2051
#include "vmware_pack_end.h"
2039
HgfsRequestUnlockRange;
2052
HgfsRequestUnlockRangeV4;
2042
2055
#include "vmware_pack_begin.h"
2043
struct HgfsReplyUnlockRange {
2056
struct HgfsReplyUnlockRangeV4 {
2044
2057
uint64 reserved; /* Reserved for future use. */
2046
2059
#include "vmware_pack_end.h"
2047
HgfsReplyUnlockRange;
2060
HgfsReplyUnlockRangeV4;
2050
2063
* There are three types of oplocks: level 1, batch, and level 2. Both the level 1 and
2515
2529
#include "vmware_pack_begin.h"
2516
struct HgfsRequestGetAttrV4 {
2530
struct HgfsReplyEnumerateStreamsV4 {
2531
uint32 numberEntriesReturned;
2532
uint32 offsetToContinue;
2534
HgfsRequestStreamEntryV4 entries[1];
2536
#include "vmware_pack_end.h"
2537
HgfsReplyEnumerateStreamsV4;
2540
#include "vmware_pack_begin.h"
2541
struct HgfsRequestGetattrV4 {
2519
2545
HgfsFileNameV3 name;
2521
2547
#include "vmware_pack_end.h"
2522
HgfsRequestGetAttrV4;
2548
HgfsRequestGetattrV4;
2525
2551
* V4 reports different file size for symlinks then V3 or V2.
2556
2583
#include "vmware_pack_begin.h"
2557
struct HgfsReplyGetAttrV4 {
2584
struct HgfsReplyGetattrV4 {
2558
2585
HgfsAttrV4 attr;
2560
2587
#include "vmware_pack_end.h"
2564
#include "vmware_pack_begin.h"
2565
struct HgfsReplySetAttrV4 {
2591
#include "vmware_pack_begin.h"
2592
struct HgfsRequestSetattrV4 {
2595
uint64 reserved; /* Reserved for future use */
2596
HgfsFileNameV3 fileName; /* Filename used when file handle invalid. */
2598
#include "vmware_pack_end.h"
2599
HgfsRequestSetattrV4;
2602
#include "vmware_pack_begin.h"
2603
struct HgfsReplySetattrV4 {
2566
2604
uint32 mask; /* Defines which attributes were set. */
2568
2606
#include "vmware_pack_end.h"
2572
2610
* Unlike V3 deletion this command can be used to delete both files and directories.