In article <(E-Mail Removed) >,
Tom Brown <(E-Mail Removed)> wrote:
>I send out my own ethernet broadcast frame then capture it on two
>different devices. One device is a pc; the other device is a wireless
>access point. The source address is a little different in the capture
>on the pc than on the wireless access point. I was wondering why. Here
>is what I send out:
>
>dest addr source addr type data
>030000000007 000475c27401 3842 0000000001008104...
>
>This is what I capture on the wireless access point:
>
>dest addr source addr type data
>030000000007 000475c27401 3842 0000000001008104...
>
>It looks as I expect it to. Just like I sent it. However, on the pc
>the capture looks like this:
>
>dest addr source addr type data
>030000000007 000475ffffffc27401 3842 000000000100ffffff8104...
>
>Why are the extra ff's showing up in the source address and in the
>data on the pc?
Notice that the only byte in your source MAC address with the high bit
on is the 0xc2 byte. Also notice that the only byte in the data field
with the high bit on is also prefixed by 0xffffff. This is due to your
packet dumping routine using a "signed char" type rather than an "unsigned
char". So when the compiler sees you want to pass a signed char value of
0xc2, it sign extends it to 0xffffffc2.
Patrick
========= For LAN/WAN Protocol Analysis, check out PacketView Pro! =========
Patrick Klos Email:
(E-Mail Removed)
Klos Technologies, Inc. Web:
http://www.klos.com/
==================== What goes around, comes around... =====================