阅读:1966回复:3
OOB信息写在哪儿哪?
麻烦您回答一下,谢谢了!
|
|
|
沙发#
发布于:2001-08-28 09:37
oob信息是和Packet结构相对应的
不需要自己分配 用NDIS_SET_PACKET_XXXXX的宏来访问 取出是用NDIS_GET_PACKET_XXXXX |
|
|
板凳#
发布于:2001-08-30 23:25
OOB信息是一个结构体,Packet也是一个结构体,它们之间如何对应呢?各层驱动传输包描述符时OOB信息又是如何传输的呢?谢谢!
|
|
|
地板#
发布于:2001-10-16 16:22
建议你看一看 ndis.h就都明白了,呵呵.typedef struct _NDIS_PACKET
{ NDIS_PACKET_PRIVATE Private; union { struct // For Connection-less miniports { UCHAR MiniportReserved[2*sizeof(PVOID)]; UCHAR WrapperReserved[2*sizeof(PVOID)]; }; struct { // // For de-serialized miniports. And by implication conn-oriented miniports. // This is for the send-path only. Packets indicated will use WrapperReserved // instead of WrapperReservedEx // UCHAR MiniportReservedEx[3*sizeof(PVOID)]; UCHAR WrapperReservedEx[sizeof(PVOID)]; }; struct { UCHAR MacReserved[4*sizeof(PVOID)]; }; }; ULONG_PTR Reserved[2]; // For compatibility with Win95 UCHAR ProtocolReserved[1]; } NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET; typedef struct _NDIS_PACKET_OOB_DATA { union { ULONGLONG TimeToSend; ULONGLONG TimeSent; }; ULONGLONG TimeReceived; UINT HeaderSize; UINT SizeMediaSpecificInfo; PVOID MediaSpecificInformation; NDIS_STATUS Status; } NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA; 明白了这些,再看一个宏,就明白了; #define NDIS_OOB_DATA_FROM_PACKET(_p) \ (PNDIS_PACKET_OOB_DATA)((PUCHAR)(_p) + \ (_p)->Private.NdisPacketOobOffset) 即Packet结构里面有一个指向OOB的指针,指向OOB数据的偏移. 这样就可以得到数据包里的oob数据了. |
|