base: fix some bugs in EthAddr
Review Request #2304 - Created June 26, 2014 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10250:177ddbf6d5cd --------------------------- base: fix some bugs in EthAddr per the IEEE 802 spec: 1) fixed broadcast() to ensure that all bytes are equal to 0xff. 2) fixed unicast() to ensure that bit 0 of the first byte is equal to 0 3) fixed multicast() to ensure that bit 0 of the first byte is equal to 1, and that it is not a broadcast. also the constructors in EthAddr are fixed so that all bytes of data are initialized.
Ship It!
-
src/base/inet.hh (Diff revision 1) -
seems like it would be more consistent with the other code to do a loop up to ETH_ADDR_LEN, but this works too.
Review request changed
Updated (July 2, 2014, 8:51 a.m.)
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+16 -5) |
