inet.cc (10251:878f2f30b12d) | inet.cc (10252:c625a3c51bac) |
---|---|
1/* 2 * Copyright (c) 2013 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 110 unchanged lines hidden (view full) --- 119 stringstream stream; 120 stream << *this; 121 return stream.str(); 122} 123 124bool 125operator==(const EthAddr &left, const EthAddr &right) 126{ | 1/* 2 * Copyright (c) 2013 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 110 unchanged lines hidden (view full) --- 119 stringstream stream; 120 stream << *this; 121 return stream.str(); 122} 123 124bool 125operator==(const EthAddr &left, const EthAddr &right) 126{ |
127 return memcmp(left.bytes(), right.bytes(), ETH_ADDR_LEN); | 127 return !memcmp(left.bytes(), right.bytes(), ETH_ADDR_LEN); |
128} 129 130ostream & 131operator<<(ostream &stream, const EthAddr &ea) 132{ 133 const uint8_t *a = ea.addr(); 134 ccprintf(stream, "%x:%x:%x:%x:%x:%x", a[0], a[1], a[2], a[3], a[4], a[5]); 135 return stream; --- 273 unchanged lines hidden --- | 128} 129 130ostream & 131operator<<(ostream &stream, const EthAddr &ea) 132{ 133 const uint8_t *a = ea.addr(); 134 ccprintf(stream, "%x:%x:%x:%x:%x:%x", a[0], a[1], a[2], a[3], a[4], a[5]); 135 return stream; --- 273 unchanged lines hidden --- |