Changeset 8a9a41e in mainline for uspace/srv/net/ethip/ethip_nic.c
- Timestamp:
- 2021-10-24T08:28:43Z (3 years ago)
- Children:
- f628215
- Parents:
- 2ce943a (diff), cd981f2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Erik Kučák <35500848+Riko196@…> (2021-10-24 08:28:43)
- git-committer:
- GitHub <noreply@…> (2021-10-24 08:28:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
r2ce943a r8a9a41e 1 1 /* 2 * Copyright (c) 20 12Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 37 37 #include <adt/list.h> 38 38 #include <async.h> 39 #include <stdbool.h>40 39 #include <errno.h> 41 #include <str_error.h>42 40 #include <fibril_synch.h> 41 #include <inet/eth_addr.h> 43 42 #include <inet/iplink_srv.h> 44 43 #include <io/log.h> 45 44 #include <loc.h> 45 #include <mem.h> 46 46 #include <nic_iface.h> 47 #include <stdbool.h> 47 48 #include <stdlib.h> 48 #include < mem.h>49 #include <str_error.h> 49 50 #include "ethip.h" 50 51 #include "ethip_nic.h" … … 193 194 } 194 195 195 addr48(nic_address.address,nic->mac_addr);196 eth_addr_decode(nic_address.address, &nic->mac_addr); 196 197 197 198 rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE); … … 399 400 assert(i < count); 400 401 401 addr48_t mac;402 addr48_solicited_node(v6,mac);402 eth_addr_t mac; 403 eth_addr_solicited_node(v6, &mac); 403 404 404 405 /* Avoid duplicate addresses in the list */ … … 407 408 408 409 for (size_t j = 0; j < i; j++) { 409 if (addr48_compare(mac_list[j].address, mac)) { 410 eth_addr_t mac_entry; 411 eth_addr_decode(mac_list[j].address, &mac_entry); 412 if (eth_addr_compare(&mac_entry, &mac)) { 410 413 found = true; 411 414 break; … … 414 417 415 418 if (!found) { 416 addr48(mac, mac_list[i].address);419 eth_addr_encode(&mac, mac_list[i].address); 417 420 i++; 418 } else 421 } else { 419 422 count--; 423 } 420 424 } 421 425
Note:
See TracChangeset
for help on using the changeset viewer.