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