Changes in uspace/lib/c/generic/iplink_srv.c [c3b25985:417a2ba1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/iplink_srv.c
rc3b25985 r417a2ba1 81 81 } 82 82 83 static void iplink_set_mac48_srv(iplink_srv_t *srv, ipc_callid_t iid,84 ipc_call_t *icall)85 {86 int rc;87 size_t size;88 addr48_t mac;89 ipc_callid_t callid;90 91 rc = async_data_write_receive(&callid, &size);92 if (rc != EOK) {93 async_answer_0(callid, (sysarg_t) rc);94 async_answer_0(iid, (sysarg_t) rc);95 }96 97 rc = srv->ops->set_mac48(srv, &mac);98 if (rc != EOK) {99 async_answer_0(iid, rc);100 return;101 }102 103 rc = async_data_read_finalize(callid, &mac, sizeof(addr48_t));104 if (rc != EOK)105 async_answer_0(callid, rc);106 107 async_answer_0(iid, (sysarg_t) rc);108 }109 110 83 static void iplink_addr_add_srv(iplink_srv_t *srv, ipc_callid_t iid, 111 84 ipc_call_t *icall) … … 279 252 iplink_get_mac48_srv(srv, callid, &call); 280 253 break; 281 case IPLINK_SET_MAC48:282 iplink_set_mac48_srv(srv, callid, &call);283 break;284 254 case IPLINK_SEND: 285 255 iplink_send_srv(srv, callid, &call); … … 330 300 } 331 301 332 int iplink_ev_change_addr(iplink_srv_t *srv, addr48_t *addr)333 {334 if (srv->client_sess == NULL)335 return EIO;336 337 async_exch_t *exch = async_exchange_begin(srv->client_sess);338 339 ipc_call_t answer;340 aid_t req = async_send_0(exch, IPLINK_EV_CHANGE_ADDR, &answer);341 342 int rc = async_data_write_start(exch, addr, sizeof(addr48_t));343 async_exchange_end(exch);344 345 if (rc != EOK) {346 async_forget(req);347 return rc;348 }349 350 sysarg_t retval;351 async_wait_for(req, &retval);352 if (retval != EOK)353 return retval;354 355 return EOK;356 }357 358 302 /** @} 359 303 */
Note:
See TracChangeset
for help on using the changeset viewer.