Changeset 50420 in vbox
- Timestamp:
- Feb 12, 2014 9:21:40 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92205
- Location:
- trunk/include/VBox/HGSMI
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HGSMI/HGSMI.h
r44528 r50420 6 6 7 7 /* 8 * Copyright (C) 2006-201 2Oracle Corporation8 * Copyright (C) 2006-2014 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <iprt/types.h> 34 34 35 #include <VBox/HGSMI/HGSMIDefs.h> 35 36 #include <VBox/HGSMI/HGSMIChannels.h> 36 37 /* HGSMI uses 32 bit offsets and sizes. */38 typedef uint32_t HGSMISIZE;39 typedef uint32_t HGSMIOFFSET;40 41 #define HGSMIOFFSET_VOID ((HGSMIOFFSET)~0)42 37 43 38 /* … … 75 70 * * the channel information. 76 71 */ 77 78 79 /* Describes a shared memory area buffer.80 * Used for calculations with offsets and for buffers verification.81 */82 typedef struct _HGSMIAREA83 {84 uint8_t *pu8Base; /* The starting address of the area. Corresponds to offset 'offBase'. */85 HGSMIOFFSET offBase; /* The starting offset of the area. */86 HGSMIOFFSET offLast; /* The last valid offset:87 * offBase + cbArea - 1 - (sizeof (header) + sizeof (tail)).88 */89 HGSMISIZE cbArea; /* Size of the area. */90 } HGSMIAREA;91 92 93 /* The buffer description flags. */94 #define HGSMI_BUFFER_HEADER_F_SEQ_MASK 0x03 /* Buffer sequence type mask. */95 #define HGSMI_BUFFER_HEADER_F_SEQ_SINGLE 0x00 /* Single buffer, not a part of a sequence. */96 #define HGSMI_BUFFER_HEADER_F_SEQ_START 0x01 /* The first buffer in a sequence. */97 #define HGSMI_BUFFER_HEADER_F_SEQ_CONTINUE 0x02 /* A middle buffer in a sequence. */98 #define HGSMI_BUFFER_HEADER_F_SEQ_END 0x03 /* The last buffer in a sequence. */99 100 101 #pragma pack(1)102 /* 16 bytes buffer header. */103 typedef struct _HGSMIBUFFERHEADER104 {105 uint32_t u32DataSize; /* Size of data that follows the header. */106 107 uint8_t u8Flags; /* The buffer description: HGSMI_BUFFER_HEADER_F_* */108 109 uint8_t u8Channel; /* The channel the data must be routed to. */110 uint16_t u16ChannelInfo; /* Opaque to the HGSMI, used by the channel. */111 112 union {113 uint8_t au8Union[8]; /* Opaque placeholder to make the union 8 bytes. */114 115 struct116 { /* HGSMI_BUFFER_HEADER_F_SEQ_SINGLE */117 uint32_t u32Reserved1; /* A reserved field, initialize to 0. */118 uint32_t u32Reserved2; /* A reserved field, initialize to 0. */119 } Buffer;120 121 struct122 { /* HGSMI_BUFFER_HEADER_F_SEQ_START */123 uint32_t u32SequenceNumber; /* The sequence number, the same for all buffers in the sequence. */124 uint32_t u32SequenceSize; /* The total size of the sequence. */125 } SequenceStart;126 127 struct128 { /* HGSMI_BUFFER_HEADER_F_SEQ_CONTINUE and HGSMI_BUFFER_HEADER_F_SEQ_END */129 uint32_t u32SequenceNumber; /* The sequence number, the same for all buffers in the sequence. */130 uint32_t u32SequenceOffset; /* Data offset in the entire sequence. */131 } SequenceContinue;132 } u;133 134 } HGSMIBUFFERHEADER;135 136 /* 8 bytes buffer tail. */137 typedef struct _HGSMIBUFFERTAIL138 {139 uint32_t u32Reserved; /* Reserved, must be initialized to 0. */140 uint32_t u32Checksum; /* Verifyer for the buffer header and offset and for first 4 bytes of the tail. */141 } HGSMIBUFFERTAIL;142 #pragma pack()143 144 AssertCompile(sizeof (HGSMIBUFFERHEADER) == 16);145 AssertCompile(sizeof (HGSMIBUFFERTAIL) == 8);146 147 72 148 73 #pragma pack(1)
Note:
See TracChangeset
for help on using the changeset viewer.