Changes in uspace/srv/net/ethip/ethip_nic.c [f9b2cb4c:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
rf9b2cb4c rb7fd2a0 39 39 #include <stdbool.h> 40 40 #include <errno.h> 41 #include <str_error.h> 41 42 #include <fibril_synch.h> 42 43 #include <inet/iplink_srv.h> … … 50 51 #include "pdu.h" 51 52 52 static int ethip_nic_open(service_id_t sid);53 static errno_t ethip_nic_open(service_id_t sid); 53 54 static void ethip_nic_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg); 54 55 … … 56 57 static FIBRIL_MUTEX_INITIALIZE(ethip_discovery_lock); 57 58 58 static int ethip_nic_check_new(void)59 static errno_t ethip_nic_check_new(void) 59 60 { 60 61 bool already_known; … … 62 63 service_id_t *svcs; 63 64 size_t count, i; 64 int rc;65 errno_t rc; 65 66 66 67 fibril_mutex_lock(ðip_discovery_lock); … … 146 147 } 147 148 148 static int ethip_nic_open(service_id_t sid)149 static errno_t ethip_nic_open(service_id_t sid) 149 150 { 150 151 bool in_list = false; … … 156 157 return ENOMEM; 157 158 158 int rc = loc_service_get_name(sid, &nic->svc_name);159 errno_t rc = loc_service_get_name(sid, &nic->svc_name); 159 160 if (rc != EOK) { 160 161 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name."); … … 233 234 uint8_t *addr; 234 235 size_t size; 235 int rc;236 errno_t rc; 236 237 237 238 rc = async_data_write_accept((void **)&addr, false, 0, 0, 0, &size); … … 260 261 ipc_call_t *call) 261 262 { 262 int rc;263 errno_t rc; 263 264 void *data; 264 265 size_t size; … … 280 281 free(data); 281 282 282 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=% d", rc);283 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%s", str_error_name(rc)); 283 284 async_answer_0(callid, rc); 284 285 } … … 323 324 } 324 325 325 int ethip_nic_discovery_start(void)326 { 327 int rc = loc_register_cat_change_cb(ethip_nic_cat_change_cb);326 errno_t ethip_nic_discovery_start(void) 327 { 328 errno_t rc = loc_register_cat_change_cb(ethip_nic_cat_change_cb); 328 329 if (rc != EOK) { 329 330 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for NIC " 330 "discovery (%d).", rc);331 "discovery: %s.", str_error(rc)); 331 332 return rc; 332 333 } … … 352 353 } 353 354 354 int ethip_nic_send(ethip_nic_t *nic, void *data, size_t size)355 { 356 int rc;355 errno_t ethip_nic_send(ethip_nic_t *nic, void *data, size_t size) 356 { 357 errno_t rc; 357 358 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_send(size=%zu)", size); 358 359 rc = nic_send_frame(nic->sess, data, size); 359 log_msg(LOG_DEFAULT, LVL_DEBUG, "nic_send_frame -> % d", rc);360 log_msg(LOG_DEFAULT, LVL_DEBUG, "nic_send_frame -> %s", str_error_name(rc)); 360 361 return rc; 361 362 } … … 367 368 * 368 369 */ 369 static int ethip_nic_setup_multicast(ethip_nic_t *nic)370 static errno_t ethip_nic_setup_multicast(ethip_nic_t *nic) 370 371 { 371 372 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_setup_multicast()"); … … 424 425 /* Setup the multicast MAC list */ 425 426 426 int rc = nic_multicast_set_mode(nic->sess, NIC_MULTICAST_LIST,427 errno_t rc = nic_multicast_set_mode(nic->sess, NIC_MULTICAST_LIST, 427 428 mac_list, count); 428 429 … … 431 432 } 432 433 433 int ethip_nic_addr_add(ethip_nic_t *nic, inet_addr_t *addr)434 errno_t ethip_nic_addr_add(ethip_nic_t *nic, inet_addr_t *addr) 434 435 { 435 436 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_add()"); … … 444 445 } 445 446 446 int ethip_nic_addr_remove(ethip_nic_t *nic, inet_addr_t *addr)447 errno_t ethip_nic_addr_remove(ethip_nic_t *nic, inet_addr_t *addr) 447 448 { 448 449 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_remove()");
Note:
See TracChangeset
for help on using the changeset viewer.