阅读:1204回复:0
NDIS_VAR_DATA_DESC 的问题
NDIS_VAR_DATA_DESC
Many of these OIDs have associated structures with members of type NDIS_VAR_DATA_DESC, defined as follows: typedef struct _NDIS_VAR_DATA_DESC { USHORT Length; // number of bytes of data in buffer USHORT MaximumLength; // total size of buffer in bytes LONG Offset; // offset in bytes, relative to struct } NDIS_VAR_DATA_DESC, *PNDIS_VAR_DATA_DESC; This structure defines a type used to describe buffer space relative to the base virtual address of the NDIS_VAR_DATA_DESC structure itself. In other words, a pointer to a buffer is not explicitly provided by this type; only the offset to the buffer space is provided. Because this descriptor does not use an actual pointer, a user-mode application can allocate a buffer together with its descriptor of this type and provide an offset to this buffer relative to the base virtual address of the descriptor. This allows structures containing these descriptors to be passed between user mode and kernel mode without address mapping. Note that the buffer and the NDIS_VAR_DATA_DESC structure might or might not be contiguous because the specified offset might point to storage that the protocol or application allocated elsewhere. An Offset specified between zero and sizeof(NDIS_VAR_DATA_DESC) is invalid. 上面的这段文字,字面上的意思可以明白,可是实际它在说了些什么,我就不知道了? 谁能告诉我? |
|