Changes in uspace/srv/net/ethip/ethip_nic.c [b4edc96:fafb8e5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
rb4edc96 rfafb8e5 1 1 /* 2 * Copyright (c) 20 21Jiri Svoboda2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 37 37 #include <adt/list.h> 38 38 #include <async.h> 39 #include <stdbool.h> 39 40 #include <errno.h> 41 #include <str_error.h> 40 42 #include <fibril_synch.h> 41 #include <inet/eth_addr.h>42 43 #include <inet/iplink_srv.h> 43 44 #include <io/log.h> 44 45 #include <loc.h> 46 #include <nic_iface.h> 47 #include <stdlib.h> 45 48 #include <mem.h> 46 #include <nic_iface.h>47 #include <stdbool.h>48 #include <stdlib.h>49 #include <str_error.h>50 49 #include "ethip.h" 51 50 #include "ethip_nic.h" … … 194 193 } 195 194 196 eth_addr_decode(nic_address.address, &nic->mac_addr);195 addr48(nic_address.address, nic->mac_addr); 197 196 198 197 rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE); … … 400 399 assert(i < count); 401 400 402 eth_addr_t mac;403 eth_addr_solicited_node(v6, &mac);401 addr48_t mac; 402 addr48_solicited_node(v6, mac); 404 403 405 404 /* Avoid duplicate addresses in the list */ … … 408 407 409 408 for (size_t j = 0; j < i; j++) { 410 eth_addr_t mac_entry; 411 eth_addr_decode(mac_list[j].address, &mac_entry); 412 if (eth_addr_compare(&mac_entry, &mac)) { 409 if (addr48_compare(mac_list[j].address, mac)) { 413 410 found = true; 414 411 break; … … 417 414 418 415 if (!found) { 419 eth_addr_encode(&mac, mac_list[i].address);416 addr48(mac, mac_list[i].address); 420 417 i++; 421 } else {418 } else 422 419 count--; 423 }424 420 } 425 421
Note:
See TracChangeset
for help on using the changeset viewer.