~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/freebsd/vmhgfs/requestInt.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "request.h"
44
44
#include "debug.h"
45
45
 
 
46
#if defined __APPLE__
 
47
 #include "hgfsTransport.h"
 
48
 #define HGFS_REQUEST_PREFIX_LENGTH MAX(HGFS_CLIENT_CMD_LEN, sizeof (HgfsVmciTransportStatus))
 
49
#else
 
50
 #define HGFS_REQUEST_PREFIX_LENGTH HGFS_CLIENT_CMD_LEN
 
51
#endif
 
52
 
46
53
 
47
54
/*
48
55
 * Data types
49
56
 */
 
57
struct HgfsTransportChannel;
 
58
 
50
59
 
51
60
/*
52
61
 * In-kernel representation of an Hgfs request.  These objects are kept on zero,
86
95
typedef struct HgfsKReqObject {
87
96
   DblLnkLst_Links fsNode;      // Link between object and its parent file system.
88
97
   DblLnkLst_Links pendingNode; // Link between object and pending request list.
 
98
   DblLnkLst_Links sentNode;    // Link between object and sent request list.
89
99
 
90
100
   unsigned int refcnt;         // Object reference count
91
101
   HgfsKReqState state;         // Indicates state of request
95
105
                                // above.
96
106
 
97
107
   uint32_t id;                 // The unique identifier of this request.
98
 
                                // Typically set to the address of the HgfsKReq
99
 
                                // object.
 
108
                                // Typically just incremented sequentially
 
109
                                // from zero.
100
110
   size_t payloadSize;          // Total size of payload
 
111
   void *ioBuf;                 // Pointer to memory descriptor.
 
112
                                // Used for MacOS over VMCI.
 
113
 
 
114
   /* On which channel was the request allocated/sent ?. */
 
115
   struct HgfsTransportChannel *channel;
101
116
   /*
102
117
    * The file system is concerned only with the payload portion of an Hgfs
103
118
    * request packet, but the RPC message opens with the command string "f ".
109
124
    * packet, and the command is varied by the transport layer.) So, anyway, effectively
110
125
    * all of __rpc_packet will be sent across the backdoor, but the file system will only
111
126
    * muck with _payload.
 
127
    *
 
128
    * VMCI:
 
129
    * Mac OS X is capable of using VMCI in which case _command will have
 
130
    * HgfsVmciTransportStatus.
 
131
    *
112
132
    */
113
133
   struct {
114
 
      char      _command[HGFS_CLIENT_CMD_LEN];  // Typically "f ".
 
134
      char      _command[HGFS_REQUEST_PREFIX_LENGTH];
115
135
      char      _payload[HGFS_PACKET_MAX];      // Contains both the request and
116
136
                                                // its reply.
117
137
   } __rpc_packet;