Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 2  
14 Jul 17 05:07
Stefan Schüller
xxxxxx@ids-imaging.de
Join Date: 14 Jul 2017
Posts To This List: 1
NDIS filter driver ETH MAC offset on WLAN Adapter

Hi, currently we are extracting the MAC Header from a NET_BUFFER by using the NdisQueryMdl. This works for cabled networks. However some WLAN Adapters seem to pass some additional IEEE802.11 Headers in front of the MAC Header. There is a macro called NET_BUFFER_CURRENT_MDL_OFFSET which seems to represent the correct offset of the MAC Header within the payload. The MSDN states about NET_BUFFER_CURRENT_MDL_OFFSET: "The return value specifies the offset, in bytes, to the beginning of the used data space in the MDL that is specified by the CurrentMdl member of the NET_BUFFER structure." I couldn't find any definiton of what "used data space" actually means so I am not sure if I can safely apply the given offset to the address or if there are any pitfalls. Can someone confirm that this is correct or give me any documentation that clarifies what has to be done to handle it correctly? Any suggestions are appreciated.
  Message 2 of 2  
14 Jul 17 06:48
Sergey Pisarev
xxxxxx@gmail.com
Join Date: 21 May 2017
Posts To This List: 66
NDIS filter driver ETH MAC offset on WLAN Adapter

Try ndisgetdatabuffer https://msdn.microsoft.com/en-us/library/windows/hardware/ff562631(v=vs.85).aspx On Fri, 14 Jul 2017 at 12:08, xxxxx@ids-imaging.de < xxxxx@lists.osr.com> wrote: > Hi, > > currently we are extracting the MAC Header from a NET_BUFFER by using the > NdisQueryMdl. This works for cabled networks. However some WLAN Adapters > seem to pass some additional IEEE802.11 Headers in front of the MAC Header. > There is a macro called NET_BUFFER_CURRENT_MDL_OFFSET which seems to > represent the correct offset of the MAC Header within the payload. The MSDN > states about NET_BUFFER_CURRENT_MDL_OFFSET: > > "The return value specifies the offset, in bytes, to the beginning of the <...excess quoted lines suppressed...> --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 16:46.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license