Hi all,
I'm interested in following questions. Who is in charge of ethernet frame's
checksum? It means if I change ethernet frame in my NDIS IM, will I have to
"repair" checksum too, or it is done in underlying miniport?

Thank's for answer
Michal

Re: Ethernet checksum by Thomas

Thomas
Thu May 26 08:49:14 CDT 2005


"Michal Filka" <michal.filka@atlas.cz> wrote in message
news:eZ5nYSfYFHA.3616@TK2MSFTNGP15.phx.gbl...
> Hi all,
> I'm interested in following questions. Who is in charge of ethernet
> frame's
> checksum? It means if I change ethernet frame in my NDIS IM, will I have
> to
> "repair" checksum too, or it is done in underlying miniport?
>
If you are talking about the Ethernet CRC at the tail of each frame, then
that is taken care of entirely by the adapter hardware and is invisible to
NDIS.

If you are talking about other checksums within a packet then the answer is
different. If you change an Ethernet frame (by making a complete copy and
modifying the copy), then you are responsible for modifying the packet (and
possibly OOB data) to have correct checksums.

If the adapter does not support NDIS Task Offload (e.g. checksum offload),
then you must recalculate the checksums as described in the RFCs.

If your NDIS IM driver and TCP are using NDIS Task Offload, then you must
emulate the task offload OOB data for your modified packet.

Good luck,

Thomas F. Divine, Windows DDK MVP
http://www.rawether.net


Re: Ethernet checksum by Michal

Michal
Fri May 27 03:04:15 CDT 2005

> If you are talking about the Ethernet CRC at the tail of each frame, then
> that is taken care of entirely by the adapter hardware and is invisible to
> NDIS.
... yes ... I want to change MAC address of incoming frame and re-send it.
>
> If you are talking about other checksums within a packet then the answer
is
> different. If you change an Ethernet frame (by making a complete copy and
> modifying the copy), then you are responsible for modifying the packet
(and
> possibly OOB data) to have correct checksums.
... I do copy of whole packet except MAC address (see above), so as I
understand to it I don't
have to change any checksum ...do I ?
... in fact in present situation packet is created from HeaderBuffer &
LookAheadBuffer (and so on) because underlying miniport uses old-fashion
style of indication, so there should'nt be any OOB ...

> Good luck,
... thank's I need it a lot ;-)

Thank's for answer
Michal



Re: Ethernet checksum by Arkady

Arkady
Sat May 28 02:49:08 CDT 2005

If you change MAC address as part of IEEE802.3 or Ethernet II frame that
exactly what Thomas wrote to you , you have to recalculate checksum of all
the packet ( NDIS know nothing about that )
Arkady

"Michal Filka" <michal.filka@atlas.cz> wrote in message
news:uM68rLpYFHA.3096@TK2MSFTNGP15.phx.gbl...
>> If you are talking about the Ethernet CRC at the tail of each frame, then
>> that is taken care of entirely by the adapter hardware and is invisible
>> to
>> NDIS.
> ... yes ... I want to change MAC address of incoming frame and re-send it.
>>
>> If you are talking about other checksums within a packet then the answer
> is
>> different. If you change an Ethernet frame (by making a complete copy and
>> modifying the copy), then you are responsible for modifying the packet
> (and
>> possibly OOB data) to have correct checksums.
> ... I do copy of whole packet except MAC address (see above), so as I
> understand to it I don't
> have to change any checksum ...do I ?
> ... in fact in present situation packet is created from HeaderBuffer &
> LookAheadBuffer (and so on) because underlying miniport uses old-fashion
> style of indication, so there should'nt be any OOB ...
>
>> Good luck,
> ... thank's I need it a lot ;-)
>
> Thank's for answer
> Michal
>
>



Re: Ethernet checksum by Maxim

Maxim
Sat May 28 14:46:27 CDT 2005

???
TCP/IP checksums do not include the MAC address, and Ethernet checksums are
not visible to any software - they are internal for the NIC hardware.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:u4EhbG1YFHA.1344@TK2MSFTNGP15.phx.gbl...
> If you change MAC address as part of IEEE802.3 or Ethernet II frame that
> exactly what Thomas wrote to you , you have to recalculate checksum of all
> the packet ( NDIS know nothing about that )
> Arkady
>
> "Michal Filka" <michal.filka@atlas.cz> wrote in message
> news:uM68rLpYFHA.3096@TK2MSFTNGP15.phx.gbl...
> >> If you are talking about the Ethernet CRC at the tail of each frame, then
> >> that is taken care of entirely by the adapter hardware and is invisible
> >> to
> >> NDIS.
> > ... yes ... I want to change MAC address of incoming frame and re-send it.
> >>
> >> If you are talking about other checksums within a packet then the answer
> > is
> >> different. If you change an Ethernet frame (by making a complete copy and
> >> modifying the copy), then you are responsible for modifying the packet
> > (and
> >> possibly OOB data) to have correct checksums.
> > ... I do copy of whole packet except MAC address (see above), so as I
> > understand to it I don't
> > have to change any checksum ...do I ?
> > ... in fact in present situation packet is created from HeaderBuffer &
> > LookAheadBuffer (and so on) because underlying miniport uses old-fashion
> > style of indication, so there should'nt be any OOB ...
> >
> >> Good luck,
> > ... thank's I need it a lot ;-)
> >
> > Thank's for answer
> > Michal
> >
> >
>
>



Re: Ethernet checksum by Arkady

Arkady
Sun May 29 02:55:51 CDT 2005


"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:uSayg37YFHA.2572@TK2MSFTNGP14.phx.gbl...
> ???
> TCP/IP checksums do not include the MAC address,
Sure.
and Ethernet checksums are
> not visible to any software - they are internal for the NIC hardware.
>
Depends upon NIC , and can be ( if not in hardware ) in firmware or
in miniport
Arkady
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
> news:u4EhbG1YFHA.1344@TK2MSFTNGP15.phx.gbl...
>> If you change MAC address as part of IEEE802.3 or Ethernet II frame that
>> exactly what Thomas wrote to you , you have to recalculate checksum of
>> all
>> the packet ( NDIS know nothing about that )
>> Arkady
>>
>> "Michal Filka" <michal.filka@atlas.cz> wrote in message
>> news:uM68rLpYFHA.3096@TK2MSFTNGP15.phx.gbl...
>> >> If you are talking about the Ethernet CRC at the tail of each frame,
>> >> then
>> >> that is taken care of entirely by the adapter hardware and is
>> >> invisible
>> >> to
>> >> NDIS.
>> > ... yes ... I want to change MAC address of incoming frame and re-send
>> > it.
>> >>
>> >> If you are talking about other checksums within a packet then the
>> >> answer
>> > is
>> >> different. If you change an Ethernet frame (by making a complete copy
>> >> and
>> >> modifying the copy), then you are responsible for modifying the packet
>> > (and
>> >> possibly OOB data) to have correct checksums.
>> > ... I do copy of whole packet except MAC address (see above), so as I
>> > understand to it I don't
>> > have to change any checksum ...do I ?
>> > ... in fact in present situation packet is created from HeaderBuffer &
>> > LookAheadBuffer (and so on) because underlying miniport uses
>> > old-fashion
>> > style of indication, so there should'nt be any OOB ...
>> >
>> >> Good luck,
>> > ... thank's I need it a lot ;-)
>> >
>> > Thank's for answer
>> > Michal
>> >
>> >
>>
>>
>
>



Re: Ethernet checksum by Maxim

Maxim
Sun May 29 14:34:41 CDT 2005

> Depends upon NIC , and can be ( if not in hardware ) in firmware or
> in miniport

Below NDIS anyway.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Ethernet checksum by Arkady

Arkady
Mon May 30 03:58:54 CDT 2005

Sure , that what Thomas mention on start
Arkady

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:OlsNkVIZFHA.3272@TK2MSFTNGP14.phx.gbl...
>> Depends upon NIC , and can be ( if not in hardware ) in firmware or
>> in miniport
>
> Below NDIS anyway.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>