Changeset 8a9a41e in mainline for uspace/lib/inet/src/iplink.c
- Timestamp:
- 2021-10-24T08:28:43Z (4 years ago)
- Children:
- 9ea3a41
- 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/lib/inet/src/iplink.c
r2ce943a r8a9a41e 1 1 /* 2 * Copyright (c) 20 12Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib c29 /** @addtogroup libinet 30 30 * @{ 31 31 */ … … 38 38 #include <assert.h> 39 39 #include <errno.h> 40 #include <inet/addr.h> 41 #include <inet/eth_addr.h> 40 42 #include <inet/iplink.h> 41 #include <inet/addr.h>42 43 #include <ipc/iplink.h> 43 44 #include <ipc/services.h> … … 115 116 aid_t req = async_send_0(exch, IPLINK_SEND6, &answer); 116 117 117 errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof( addr48_t));118 errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof(eth_addr_t)); 118 119 if (rc != EOK) { 119 120 async_exchange_end(exch); … … 153 154 } 154 155 155 errno_t iplink_get_mac48(iplink_t *iplink, addr48_t *mac)156 errno_t iplink_get_mac48(iplink_t *iplink, eth_addr_t *mac) 156 157 { 157 158 async_exch_t *exch = async_exchange_begin(iplink->sess); … … 160 161 aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer); 161 162 162 errno_t rc = async_data_read_start(exch, mac, sizeof( addr48_t));163 errno_t rc = async_data_read_start(exch, mac, sizeof(eth_addr_t)); 163 164 164 165 loc_exchange_end(exch); … … 175 176 } 176 177 177 errno_t iplink_set_mac48(iplink_t *iplink, addr48_tmac)178 errno_t iplink_set_mac48(iplink_t *iplink, eth_addr_t *mac) 178 179 { 179 180 async_exch_t *exch = async_exchange_begin(iplink->sess); … … 182 183 aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer); 183 184 184 errno_t rc = async_data_read_start(exch, mac, sizeof( addr48_t));185 errno_t rc = async_data_read_start(exch, mac, sizeof(eth_addr_t)); 185 186 186 187 loc_exchange_end(exch); … … 264 265 static void iplink_ev_change_addr(iplink_t *iplink, ipc_call_t *icall) 265 266 { 266 addr48_t *addr;267 eth_addr_t *addr; 267 268 size_t size; 268 269 269 270 errno_t rc = async_data_write_accept((void **) &addr, false, 270 sizeof( addr48_t), sizeof(addr48_t), 0, &size);271 sizeof(eth_addr_t), sizeof(eth_addr_t), 0, &size); 271 272 if (rc != EOK) { 272 273 async_answer_0(icall, rc); … … 274 275 } 275 276 276 rc = iplink->ev_ops->change_addr(iplink, *addr);277 rc = iplink->ev_ops->change_addr(iplink, addr); 277 278 free(addr); 278 279 async_answer_0(icall, EOK);
Note:
See TracChangeset
for help on using the changeset viewer.