Changes in uspace/lib/inet/src/iplink.c [edeee9f:ec7902d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/inet/src/iplink.c
redeee9f rec7902d 1 1 /* 2 * Copyright (c) 20 21Jiri Svoboda2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib inet29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 38 38 #include <assert.h> 39 39 #include <errno.h> 40 #include <inet/iplink.h> 40 41 #include <inet/addr.h> 41 #include <inet/eth_addr.h>42 #include <inet/iplink.h>43 42 #include <ipc/iplink.h> 44 43 #include <ipc/services.h> … … 116 115 aid_t req = async_send_0(exch, IPLINK_SEND6, &answer); 117 116 118 errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof( eth_addr_t));117 errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof(addr48_t)); 119 118 if (rc != EOK) { 120 119 async_exchange_end(exch); … … 154 153 } 155 154 156 errno_t iplink_get_mac48(iplink_t *iplink, eth_addr_t *mac)155 errno_t iplink_get_mac48(iplink_t *iplink, addr48_t *mac) 157 156 { 158 157 async_exch_t *exch = async_exchange_begin(iplink->sess); … … 161 160 aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer); 162 161 163 errno_t rc = async_data_read_start(exch, mac, sizeof( eth_addr_t));162 errno_t rc = async_data_read_start(exch, mac, sizeof(addr48_t)); 164 163 165 164 loc_exchange_end(exch); … … 176 175 } 177 176 178 errno_t iplink_set_mac48(iplink_t *iplink, eth_addr_t *mac)177 errno_t iplink_set_mac48(iplink_t *iplink, addr48_t mac) 179 178 { 180 179 async_exch_t *exch = async_exchange_begin(iplink->sess); … … 183 182 aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer); 184 183 185 errno_t rc = async_data_read_start(exch, mac, sizeof( eth_addr_t));184 errno_t rc = async_data_read_start(exch, mac, sizeof(addr48_t)); 186 185 187 186 loc_exchange_end(exch); … … 265 264 static void iplink_ev_change_addr(iplink_t *iplink, ipc_call_t *icall) 266 265 { 267 eth_addr_t *addr;266 addr48_t *addr; 268 267 size_t size; 269 268 270 269 errno_t rc = async_data_write_accept((void **) &addr, false, 271 sizeof( eth_addr_t), sizeof(eth_addr_t), 0, &size);270 sizeof(addr48_t), sizeof(addr48_t), 0, &size); 272 271 if (rc != EOK) { 273 272 async_answer_0(icall, rc); … … 275 274 } 276 275 277 rc = iplink->ev_ops->change_addr(iplink, addr);276 rc = iplink->ev_ops->change_addr(iplink, *addr); 278 277 free(addr); 279 278 async_answer_0(icall, EOK);
Note:
See TracChangeset
for help on using the changeset viewer.