Changes in uspace/lib/c/generic/iplink.c [c3b25985:417a2ba1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/iplink.c
rc3b25985 r417a2ba1 171 171 } 172 172 173 int iplink_set_mac48(iplink_t *iplink, addr48_t mac)174 {175 async_exch_t *exch = async_exchange_begin(iplink->sess);176 177 ipc_call_t answer;178 aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer);179 180 int rc = async_data_read_start(exch, mac, sizeof(addr48_t));181 182 loc_exchange_end(exch);183 184 if (rc != EOK) {185 async_forget(req);186 return rc;187 }188 189 sysarg_t retval;190 async_wait_for(req, &retval);191 192 return (int) retval;193 }194 195 196 173 int iplink_addr_add(iplink_t *iplink, inet_addr_t *addr) 197 174 { … … 253 230 free(sdu.data); 254 231 async_answer_0(iid, rc); 255 }256 257 static void iplink_ev_change_addr(iplink_t *iplink, ipc_callid_t iid,258 ipc_call_t *icall)259 {260 addr48_t *addr;261 size_t size;262 263 int rc = async_data_write_accept((void **)&addr, false,264 sizeof(addr48_t), sizeof(addr48_t), 0, &size);265 if (rc != EOK) {266 async_answer_0(iid, rc);267 return;268 }269 270 rc = iplink->ev_ops->change_addr(iplink, *addr);271 free(addr);272 async_answer_0(iid, EOK);273 232 } 274 233 … … 290 249 iplink_ev_recv(iplink, callid, &call); 291 250 break; 292 case IPLINK_EV_CHANGE_ADDR:293 iplink_ev_change_addr(iplink, callid, &call);294 251 default: 295 252 async_answer_0(callid, ENOTSUP);
Note:
See TracChangeset
for help on using the changeset viewer.