equal
deleted
inserted
replaced
205 ****************************************************************************/ |
205 ****************************************************************************/ |
206 |
206 |
207 /** |
207 /** |
208 * \return true, if two MAC addresses are equal. |
208 * \return true, if two MAC addresses are equal. |
209 */ |
209 */ |
210 int ec_mac_equal(const uint8_t *mac1, const uint8_t *mac2) |
210 int ec_mac_equal( |
|
211 const uint8_t *mac1, /**< First MAC address. */ |
|
212 const uint8_t *mac2 /**< Second MAC address. */ |
|
213 ) |
211 { |
214 { |
212 unsigned int i; |
215 unsigned int i; |
213 |
216 |
214 for (i = 0; i < ETH_ALEN; i++) |
217 for (i = 0; i < ETH_ALEN; i++) |
215 if (mac1[i] != mac2[i]) |
218 if (mac1[i] != mac2[i]) |
243 /*****************************************************************************/ |
246 /*****************************************************************************/ |
244 |
247 |
245 /** |
248 /** |
246 * \return true, if the MAC address is all-zero. |
249 * \return true, if the MAC address is all-zero. |
247 */ |
250 */ |
248 int ec_mac_is_zero(const uint8_t *mac) |
251 int ec_mac_is_zero( |
|
252 const uint8_t *mac /**< MAC address. */ |
|
253 ) |
249 { |
254 { |
250 unsigned int i; |
255 unsigned int i; |
251 |
256 |
252 for (i = 0; i < ETH_ALEN; i++) |
257 for (i = 0; i < ETH_ALEN; i++) |
253 if (mac[i]) |
258 if (mac[i]) |
259 /*****************************************************************************/ |
264 /*****************************************************************************/ |
260 |
265 |
261 /** |
266 /** |
262 * \return true, if the given MAC address is the broadcast address. |
267 * \return true, if the given MAC address is the broadcast address. |
263 */ |
268 */ |
264 int ec_mac_is_broadcast(const uint8_t *mac) |
269 int ec_mac_is_broadcast( |
|
270 const uint8_t *mac /**< MAC address. */ |
|
271 ) |
265 { |
272 { |
266 unsigned int i; |
273 unsigned int i; |
267 |
274 |
268 for (i = 0; i < ETH_ALEN; i++) |
275 for (i = 0; i < ETH_ALEN; i++) |
269 if (mac[i] != 0xff) |
276 if (mac[i] != 0xff) |