[Winpcap-users] Problem with automatic modification of the length/type field of mac frames

Guy Harris guy at alum.mit.edu
Mon Jul 31 17:11:54 GMT 2006


Eduardo Escudero Sánchez wrote:
> Sorry if i havent explained me well. The application i'm developing must 
> show the user how the mac sublayer operates.

In other words, it's a tutorial application, to show, for example, a 
student how network protocols work, rather than a regular protocol 
implementation?

> You can pass it data and 
> you will see how this artificial MAC sublayer constructs a mac frame 
> with the data you have passed to it. Then , once the frame is built , 
> this entity would send the built frame using tha packet.dll API. I 
> expected the API to deliver my packet as i have set up it. This means 
> that if i build a frme with two mac addrsses, a length /type field and 
> data and some pad i expected to receive in the other instance of my 
> application, which is running in the destination machine, exactly the 
> same bytes i sent. But i encountered the problem of the length /type 
> field modification which i was talking about before.

Unfortunately, the Windows driver for your network adapter (or perhaps 
even common code in Windows for all Ethernet miniport drivers to use) 
appears not to support that.  If that's the case, there's nothing 
WinPcap can do about it; it might be impossible to do, on Windows, what 
you're trying to do.

I.e., if your application is implementing the MAC sublayer, including 
adding the padding, and trying to directly supply a packet to the driver 
for the network adapter, and not have that driver (or any common NDIS 
code) modify the packet in any way, it might be impossible for it to do 
so on Windows.


More information about the Winpcap-users mailing list