Changes in uspace/srv/net/ethip/ethip_nic.c [83781a22:695b6ff] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
r83781a22 r695b6ff 84 84 already_known = false; 85 85 86 list_foreach(ethip_nic_list, link) { 87 ethip_nic_t *nic = list_get_instance(link, 88 ethip_nic_t, link); 86 list_foreach(ethip_nic_list, link, ethip_nic_t, nic) { 89 87 if (nic->svc_id == svcs[i]) { 90 88 already_known = true; … … 201 199 log_msg(LOG_DEFAULT, LVL_ERROR, "Error activating NIC '%s'.", 202 200 nic->svc_name); 201 goto error; 202 } 203 204 rc = nic_broadcast_set_mode(nic->sess, NIC_BROADCAST_ACCEPTED); 205 if (rc != EOK) { 206 log_msg(LOG_DEFAULT, LVL_ERROR, "Error enabling " 207 "reception of broadcast frames on '%s'.", nic->svc_name); 203 208 goto error; 204 209 } … … 313 318 (unsigned) iplink_sid); 314 319 315 list_foreach(ethip_nic_list, link ) {320 list_foreach(ethip_nic_list, link, ethip_nic_t, nic) { 316 321 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid - element"); 317 ethip_nic_t *nic = list_get_instance(link, ethip_nic_t, link);318 319 322 if (nic->iplink_sid == iplink_sid) { 320 323 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid - found %p", nic); … … 350 353 size_t count = 0; 351 354 352 list_foreach(nic->addr_list, link) { 353 ethip_link_addr_t *laddr = list_get_instance(link, 354 ethip_link_addr_t, link); 355 355 list_foreach(nic->addr_list, link, ethip_link_addr_t, laddr) { 356 356 uint16_t af = inet_addr_get(&laddr->addr, NULL, NULL); 357 357 if (af == AF_INET6) … … 371 371 size_t i = 0; 372 372 373 list_foreach(nic->addr_list, link) { 374 assert(i < count); 375 376 ethip_link_addr_t *laddr = list_get_instance(link, 377 ethip_link_addr_t, link); 378 373 list_foreach(nic->addr_list, link, ethip_link_addr_t, laddr) { 379 374 addr128_t v6; 380 375 uint16_t af = inet_addr_get(&laddr->addr, NULL, &v6); 381 376 if (af != AF_INET6) 382 377 continue; 378 379 assert(i < count); 383 380 384 381 addr48_t mac; … … 444 441 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_find()"); 445 442 446 list_foreach(nic->addr_list, link) { 447 ethip_link_addr_t *laddr = list_get_instance(link, 448 ethip_link_addr_t, link); 449 443 list_foreach(nic->addr_list, link, ethip_link_addr_t, laddr) { 450 444 if (inet_addr_compare(addr, &laddr->addr)) 451 445 return laddr;
Note:
See TracChangeset
for help on using the changeset viewer.