Changeset 02a09ed in mainline for uspace/srv/net/ethip/ethip_nic.c
- Timestamp:
- 2013-06-28T20:20:03Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d24ad3
- Parents:
- edf0d27
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
redf0d27 r02a09ed 121 121 } 122 122 123 static ethip_link_addr_t *ethip_nic_addr_new( uint32_taddr)123 static ethip_link_addr_t *ethip_nic_addr_new(inet_addr_t *addr) 124 124 { 125 125 ethip_link_addr_t *laddr = calloc(1, sizeof(ethip_link_addr_t)); … … 131 131 132 132 link_initialize(&laddr->addr_list); 133 laddr->addr = addr;133 laddr->addr = *addr; 134 134 135 135 return laddr; … … 193 193 goto error; 194 194 } 195 196 mac48_decode(nic_address.address, &nic->mac_addr);195 196 addr48(nic_address.address, nic->mac_addr); 197 197 198 198 rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE); … … 203 203 } 204 204 205 log_msg(LOG_DEFAULT, LVL_DEBUG, "Initialized IP link service, MAC = 0x%" PRIx64, 206 nic->mac_addr.addr); 205 log_msg(LOG_DEFAULT, LVL_DEBUG, "Initialized IP link service,"); 207 206 208 207 return EOK; … … 335 334 } 336 335 337 int ethip_nic_addr_add(ethip_nic_t *nic, uint32_taddr)336 int ethip_nic_addr_add(ethip_nic_t *nic, inet_addr_t *addr) 338 337 { 339 338 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_add()"); … … 347 346 } 348 347 349 int ethip_nic_addr_remove(ethip_nic_t *nic, uint32_taddr)348 int ethip_nic_addr_remove(ethip_nic_t *nic, inet_addr_t *addr) 350 349 { 351 350 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_remove()"); … … 361 360 362 361 ethip_link_addr_t *ethip_nic_addr_find(ethip_nic_t *nic, 363 uint32_taddr)362 inet_addr_t *addr) 364 363 { 365 364 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_find()"); … … 369 368 ethip_link_addr_t, addr_list); 370 369 371 if ( addr == laddr->addr)370 if (inet_addr_compare(addr, &laddr->addr)) 372 371 return laddr; 373 372 }
Note:
See TracChangeset
for help on using the changeset viewer.