Index: uspace/lib/nic/include/nic.h
===================================================================
--- uspace/lib/nic/include/nic.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -95,5 +95,5 @@
  * @return error code on error.
  */
-typedef int (*state_change_handler)(nic_t *);
+typedef errno_t (*state_change_handler)(nic_t *);
 
 /**
@@ -108,5 +108,5 @@
  * @return ENOTSUP	If this mode is not supported
  */
-typedef int (*unicast_mode_change_handler)(nic_t *,
+typedef errno_t (*unicast_mode_change_handler)(nic_t *,
     nic_unicast_mode_t, const nic_address_t *, size_t);
 
@@ -122,5 +122,5 @@
  * @return ENOTSUP	If this mode is not supported
  */
-typedef int (*multicast_mode_change_handler)(nic_t *,
+typedef errno_t (*multicast_mode_change_handler)(nic_t *,
     nic_multicast_mode_t, const nic_address_t *, size_t);
 
@@ -134,5 +134,5 @@
  * @return ENOTSUP	If this mode is not supported
  */
-typedef int (*broadcast_mode_change_handler)(nic_t *, nic_broadcast_mode_t);
+typedef errno_t (*broadcast_mode_change_handler)(nic_t *, nic_broadcast_mode_t);
 
 /**
@@ -172,5 +172,5 @@
  * 					limit of these HW filters was reached.
  */
-typedef int (*wol_virtue_add_handler)(nic_t *, const nic_wol_virtue_t *);
+typedef errno_t (*wol_virtue_add_handler)(nic_t *, const nic_wol_virtue_t *);
 
 /**
@@ -195,5 +195,5 @@
  * @return EINVAL	If this mode cannot be set up under no circumstances
  */
-typedef int (*poll_mode_change_handler)(nic_t *,
+typedef errno_t (*poll_mode_change_handler)(nic_t *,
     nic_poll_mode_t, const struct timeval *);
 
@@ -211,10 +211,10 @@
 
 /* Functions called in the main function */
-extern int nic_driver_init(const char *);
+extern errno_t nic_driver_init(const char *);
 extern void nic_driver_implement(driver_ops_t *, ddf_dev_ops_t *,
     nic_iface_t *);
 
 /* Functions called in add_device */
-extern int nic_get_resources(nic_t *, hw_res_list_parsed_t *);
+extern errno_t nic_get_resources(nic_t *, hw_res_list_parsed_t *);
 extern void nic_set_specific(nic_t *, void *);
 extern void nic_set_send_frame_handler(nic_t *, send_frame_handler);
@@ -239,6 +239,6 @@
 extern nic_device_state_t nic_query_state(nic_t *);
 extern void nic_set_tx_busy(nic_t *, int);
-extern int nic_report_address(nic_t *, const nic_address_t *);
-extern int nic_report_poll_mode(nic_t *, nic_poll_mode_t, struct timeval *);
+extern errno_t nic_report_address(nic_t *, const nic_address_t *);
+extern errno_t nic_report_poll_mode(nic_t *, nic_poll_mode_t, struct timeval *);
 extern void nic_query_address(nic_t *, nic_address_t *);
 extern void nic_received_frame(nic_t *, nic_frame_t *);
@@ -268,5 +268,5 @@
 extern void nic_query_blocked_sources(const nic_t *,
     size_t, nic_address_t *, size_t *);
-extern int nic_query_vlan_mask(const nic_t *, nic_vlan_mask_t *);
+extern errno_t nic_query_vlan_mask(const nic_t *, nic_vlan_mask_t *);
 extern int nic_query_wol_max_caps(const nic_t *, nic_wv_type_t);
 extern void nic_set_wol_max_caps(nic_t *, nic_wv_type_t, int);
Index: uspace/lib/nic/include/nic_addr_db.h
===================================================================
--- uspace/lib/nic/include/nic_addr_db.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic_addr_db.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -55,9 +55,9 @@
 
 
-extern int nic_addr_db_init(nic_addr_db_t *db, size_t addr_len);
+extern errno_t nic_addr_db_init(nic_addr_db_t *db, size_t addr_len);
 extern void nic_addr_db_clear(nic_addr_db_t *db);
 extern void nic_addr_db_destroy(nic_addr_db_t *db);
-extern int nic_addr_db_insert(nic_addr_db_t *db, const uint8_t *addr);
-extern int nic_addr_db_remove(nic_addr_db_t *db, const uint8_t *addr);
+extern errno_t nic_addr_db_insert(nic_addr_db_t *db, const uint8_t *addr);
+extern errno_t nic_addr_db_remove(nic_addr_db_t *db, const uint8_t *addr);
 extern bool nic_addr_db_contains(const nic_addr_db_t *db, const uint8_t *addr);
 extern void nic_addr_db_foreach(const nic_addr_db_t *db,
Index: uspace/lib/nic/include/nic_ev.h
===================================================================
--- uspace/lib/nic/include/nic_ev.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic_ev.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -43,7 +43,7 @@
 #include <stddef.h>
 
-extern int nic_ev_addr_changed(async_sess_t *, const nic_address_t *);
-extern int nic_ev_device_state(async_sess_t *, sysarg_t);
-extern int nic_ev_received(async_sess_t *, void *, size_t);
+extern errno_t nic_ev_addr_changed(async_sess_t *, const nic_address_t *);
+extern errno_t nic_ev_device_state(async_sess_t *, sysarg_t);
+extern errno_t nic_ev_received(async_sess_t *, void *, size_t);
 
 #endif
Index: uspace/lib/nic/include/nic_impl.h
===================================================================
--- uspace/lib/nic/include/nic_impl.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic_impl.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -46,42 +46,42 @@
  * inject some adaptation layer between the DDF call and NICF implementation */
 
-extern int nic_get_address_impl(ddf_fun_t *dev_fun, nic_address_t *address);
-extern int nic_send_frame_impl(ddf_fun_t *dev_fun, void *data, size_t size);
-extern int nic_callback_create_impl(ddf_fun_t *dev_fun);
-extern int nic_get_state_impl(ddf_fun_t *dev_fun, nic_device_state_t *state);
-extern int nic_set_state_impl(ddf_fun_t *dev_fun, nic_device_state_t state);
-extern int nic_get_stats_impl(ddf_fun_t *dev_fun, nic_device_stats_t *stats);
-extern int nic_unicast_get_mode_impl(ddf_fun_t *dev_fun,
+extern errno_t nic_get_address_impl(ddf_fun_t *dev_fun, nic_address_t *address);
+extern errno_t nic_send_frame_impl(ddf_fun_t *dev_fun, void *data, size_t size);
+extern errno_t nic_callback_create_impl(ddf_fun_t *dev_fun);
+extern errno_t nic_get_state_impl(ddf_fun_t *dev_fun, nic_device_state_t *state);
+extern errno_t nic_set_state_impl(ddf_fun_t *dev_fun, nic_device_state_t state);
+extern errno_t nic_get_stats_impl(ddf_fun_t *dev_fun, nic_device_stats_t *stats);
+extern errno_t nic_unicast_get_mode_impl(ddf_fun_t *dev_fun,
     nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
-extern int nic_unicast_set_mode_impl(ddf_fun_t *dev_fun,
+extern errno_t nic_unicast_set_mode_impl(ddf_fun_t *dev_fun,
     nic_unicast_mode_t, const nic_address_t *, size_t);
-extern int nic_multicast_get_mode_impl(ddf_fun_t *dev_fun,
+extern errno_t nic_multicast_get_mode_impl(ddf_fun_t *dev_fun,
     nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
-extern int nic_multicast_set_mode_impl(ddf_fun_t *dev_fun,
+extern errno_t nic_multicast_set_mode_impl(ddf_fun_t *dev_fun,
     nic_multicast_mode_t, const nic_address_t *, size_t);
-extern int nic_broadcast_get_mode_impl(ddf_fun_t *, nic_broadcast_mode_t *);
-extern int nic_broadcast_set_mode_impl(ddf_fun_t *, nic_broadcast_mode_t);
-extern int nic_blocked_sources_get_impl(ddf_fun_t *,
+extern errno_t nic_broadcast_get_mode_impl(ddf_fun_t *, nic_broadcast_mode_t *);
+extern errno_t nic_broadcast_set_mode_impl(ddf_fun_t *, nic_broadcast_mode_t);
+extern errno_t nic_blocked_sources_get_impl(ddf_fun_t *,
     size_t, nic_address_t *, size_t *);
-extern int nic_blocked_sources_set_impl(ddf_fun_t *, const nic_address_t *, size_t);
-extern int nic_vlan_get_mask_impl(ddf_fun_t *, nic_vlan_mask_t *);
-extern int nic_vlan_set_mask_impl(ddf_fun_t *, const nic_vlan_mask_t *);
-extern int nic_wol_virtue_add_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
+extern errno_t nic_blocked_sources_set_impl(ddf_fun_t *, const nic_address_t *, size_t);
+extern errno_t nic_vlan_get_mask_impl(ddf_fun_t *, nic_vlan_mask_t *);
+extern errno_t nic_vlan_set_mask_impl(ddf_fun_t *, const nic_vlan_mask_t *);
+extern errno_t nic_wol_virtue_add_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
     const void *data, size_t length, nic_wv_id_t *new_id);
-extern int nic_wol_virtue_remove_impl(ddf_fun_t *dev_fun, nic_wv_id_t id);
-extern int nic_wol_virtue_probe_impl(ddf_fun_t *dev_fun, nic_wv_id_t id,
+extern errno_t nic_wol_virtue_remove_impl(ddf_fun_t *dev_fun, nic_wv_id_t id);
+extern errno_t nic_wol_virtue_probe_impl(ddf_fun_t *dev_fun, nic_wv_id_t id,
     nic_wv_type_t *type, size_t max_length, void *data, size_t *length);
-extern int nic_wol_virtue_list_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
+extern errno_t nic_wol_virtue_list_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
     size_t max_count, nic_wv_id_t *id_list, size_t *id_count);
-extern int nic_wol_virtue_get_caps_impl(ddf_fun_t *, nic_wv_type_t, int *);
-extern int nic_poll_get_mode_impl(ddf_fun_t *,
+extern errno_t nic_wol_virtue_get_caps_impl(ddf_fun_t *, nic_wv_type_t, int *);
+extern errno_t nic_poll_get_mode_impl(ddf_fun_t *,
     nic_poll_mode_t *, struct timeval *);
-extern int nic_poll_set_mode_impl(ddf_fun_t *,
+extern errno_t nic_poll_set_mode_impl(ddf_fun_t *,
     nic_poll_mode_t, const struct timeval *);
-extern int nic_poll_now_impl(ddf_fun_t *);
+extern errno_t nic_poll_now_impl(ddf_fun_t *);
 
 extern void nic_default_handler_impl(ddf_fun_t *dev_fun,
 	ipc_callid_t callid, ipc_call_t *call);
-extern int nic_open_impl(ddf_fun_t *fun);
+extern errno_t nic_open_impl(ddf_fun_t *fun);
 extern void nic_close_impl(ddf_fun_t *fun);
 
Index: uspace/lib/nic/include/nic_rx_control.h
===================================================================
--- uspace/lib/nic/include/nic_rx_control.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic_rx_control.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -114,7 +114,7 @@
 } __attribute__ ((packed)) vlan_header_t;
 
-extern int nic_rxc_init(nic_rxc_t *rxc);
-extern int nic_rxc_clear(nic_rxc_t *rxc);
-extern int nic_rxc_set_addr(nic_rxc_t *rxc,
+extern errno_t nic_rxc_init(nic_rxc_t *rxc);
+extern errno_t nic_rxc_clear(nic_rxc_t *rxc);
+extern errno_t nic_rxc_set_addr(nic_rxc_t *rxc,
 	const nic_address_t *prev_addr, const nic_address_t *curr_addr);
 extern bool nic_rxc_check(const nic_rxc_t *rxc,
@@ -126,20 +126,20 @@
 extern void nic_rxc_unicast_get_mode(const nic_rxc_t *, nic_unicast_mode_t *,
 	size_t max_count, nic_address_t *address_list, size_t *address_count);
-extern int nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
+extern errno_t nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
 	const nic_address_t *address_list, size_t address_count);
 extern void nic_rxc_multicast_get_mode(const nic_rxc_t *,
 	nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
-extern int nic_rxc_multicast_set_mode(nic_rxc_t *, nic_multicast_mode_t mode,
+extern errno_t nic_rxc_multicast_set_mode(nic_rxc_t *, nic_multicast_mode_t mode,
 	const nic_address_t *address_list, size_t address_count);
 extern void nic_rxc_broadcast_get_mode(const nic_rxc_t *,
 	nic_broadcast_mode_t *mode);
-extern int nic_rxc_broadcast_set_mode(nic_rxc_t *,
+extern errno_t nic_rxc_broadcast_set_mode(nic_rxc_t *,
 	nic_broadcast_mode_t mode);
 extern void nic_rxc_blocked_sources_get(const nic_rxc_t *,
 	size_t max_count, nic_address_t *address_list, size_t *address_count);
-extern int nic_rxc_blocked_sources_set(nic_rxc_t *,
+extern errno_t nic_rxc_blocked_sources_set(nic_rxc_t *,
 	const nic_address_t *address_list, size_t address_count);
-extern int nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask);
-extern int nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask);
+extern errno_t nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask);
+extern errno_t nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask);
 
 #endif
Index: uspace/lib/nic/include/nic_wol_virtues.h
===================================================================
--- uspace/lib/nic/include/nic_wol_virtues.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/include/nic_wol_virtues.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -74,10 +74,10 @@
 } nic_wol_virtues_t;
 
-extern int nic_wol_virtues_init(nic_wol_virtues_t *);
+extern errno_t nic_wol_virtues_init(nic_wol_virtues_t *);
 extern void nic_wol_virtues_clear(nic_wol_virtues_t *);
-extern int nic_wol_virtues_verify(nic_wv_type_t, const void *, size_t);
-extern int nic_wol_virtues_list(const nic_wol_virtues_t *, nic_wv_type_t type,
+extern errno_t nic_wol_virtues_verify(nic_wv_type_t, const void *, size_t);
+extern errno_t nic_wol_virtues_list(const nic_wol_virtues_t *, nic_wv_type_t type,
 	size_t max_count, nic_wv_id_t *id_list, size_t *id_count);
-extern int nic_wol_virtues_add(nic_wol_virtues_t *, nic_wol_virtue_t *);
+extern errno_t nic_wol_virtues_add(nic_wol_virtues_t *, nic_wol_virtue_t *);
 extern nic_wol_virtue_t *nic_wol_virtues_remove(nic_wol_virtues_t *,
 	nic_wv_id_t);
Index: uspace/lib/nic/src/nic_addr_db.c
===================================================================
--- uspace/lib/nic/src/nic_addr_db.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_addr_db.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -120,5 +120,5 @@
  * @return ENOMEM	If there was not enough memory to initialize the storage
  */
-int nic_addr_db_init(nic_addr_db_t *db, size_t addr_len)
+errno_t nic_addr_db_init(nic_addr_db_t *db, size_t addr_len)
 {
 	assert(db);
@@ -168,5 +168,5 @@
  * @return EEXIST	If this adress already is in the db
  */
-int nic_addr_db_insert(nic_addr_db_t *db, const uint8_t *addr)
+errno_t nic_addr_db_insert(nic_addr_db_t *db, const uint8_t *addr)
 {
 	assert(db && addr);
@@ -200,5 +200,5 @@
  * @return ENOENT	If there is no address
  */
-int nic_addr_db_remove(nic_addr_db_t *db, const uint8_t *addr)
+errno_t nic_addr_db_remove(nic_addr_db_t *db, const uint8_t *addr)
 {
 	assert(db && addr);
Index: uspace/lib/nic/src/nic_driver.c
===================================================================
--- uspace/lib/nic/src/nic_driver.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_driver.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -61,5 +61,5 @@
  * @param name	Name of the device/driver (used in logging)
  */
-int nic_driver_init(const char *name)
+errno_t nic_driver_init(const char *name)
 {
 	list_initialize(&nic_globals.frame_list_cache);
@@ -243,5 +243,5 @@
  * @return EOK or an error code
  */
-int nic_get_resources(nic_t *nic_data, hw_res_list_parsed_t *resources)
+errno_t nic_get_resources(nic_t *nic_data, hw_res_list_parsed_t *resources)
 {
 	ddf_dev_t *dev = nic_data->dev;
@@ -399,8 +399,8 @@
  *  @return EINVAL
  */
-int nic_report_poll_mode(nic_t *nic_data, nic_poll_mode_t mode,
+errno_t nic_report_poll_mode(nic_t *nic_data, nic_poll_mode_t mode,
 	struct timeval *period)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	fibril_rwlock_write_lock(&nic_data->main_lock);
 	nic_data->poll_mode = mode;
@@ -423,5 +423,5 @@
  *
  */
-int nic_report_address(nic_t *nic_data, const nic_address_t *address)
+errno_t nic_report_address(nic_t *nic_data, const nic_address_t *address)
 {
 	assert(nic_data);
@@ -434,5 +434,5 @@
 	/* Notify NIL layer (and uppper) if bound - not in add_device */
 	if (nic_data->client_session != NULL) {
-		int rc = nic_ev_addr_changed(nic_data->client_session,
+		errno_t rc = nic_ev_addr_changed(nic_data->client_session,
 		    address);
 
@@ -450,5 +450,5 @@
 	 * calls this should not happen.
 	 */
-	int rc = nic_rxc_set_addr(&nic_data->rx_control,
+	errno_t rc = nic_rxc_set_addr(&nic_data->rx_control,
 	    &nic_data->mac, address);
 	
@@ -808,5 +808,5 @@
  * @return ENOENT
  */
-int nic_query_vlan_mask(const nic_t *nic_data, nic_vlan_mask_t *mask)
+errno_t nic_query_vlan_mask(const nic_t *nic_data, nic_vlan_mask_t *mask)
 {
 	assert(mask);
@@ -1039,5 +1039,5 @@
  *  @return 0, never reached
  */
-static int period_fibril_fun(void *data)
+static errno_t period_fibril_fun(void *data)
 {
 	nic_t *nic = data;
Index: uspace/lib/nic/src/nic_ev.c
===================================================================
--- uspace/lib/nic/src/nic_ev.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_ev.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -42,5 +42,5 @@
 
 /** Device address changed. */
-int nic_ev_addr_changed(async_sess_t *sess, const nic_address_t *addr)
+errno_t nic_ev_addr_changed(async_sess_t *sess, const nic_address_t *addr)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -48,5 +48,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, NIC_EV_ADDR_CHANGED, &answer);
-	int retval = async_data_write_start(exch, addr,
+	errno_t retval = async_data_write_start(exch, addr,
 	    sizeof(nic_address_t));
 
@@ -63,7 +63,7 @@
 
 /** Device state changed. */
-int nic_ev_device_state(async_sess_t *sess, sysarg_t state)
+errno_t nic_ev_device_state(async_sess_t *sess, sysarg_t state)
 {
-	int rc;
+	errno_t rc;
 
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -75,5 +75,5 @@
 
 /** Frame received. */
-int nic_ev_received(async_sess_t *sess, void *data, size_t size)
+errno_t nic_ev_received(async_sess_t *sess, void *data, size_t size)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -81,5 +81,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, NIC_EV_RECEIVED, &answer);
-	int retval = async_data_write_start(exch, data, size);
+	errno_t retval = async_data_write_start(exch, data, size);
 
 	async_exchange_end(exch);
Index: uspace/lib/nic/src/nic_impl.c
===================================================================
--- uspace/lib/nic/src/nic_impl.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_impl.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -52,5 +52,5 @@
  * @return EOK always.
  */
-int nic_get_state_impl(ddf_fun_t *fun, nic_device_state_t *state)
+errno_t nic_get_state_impl(ddf_fun_t *fun, nic_device_state_t *state)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -72,5 +72,5 @@
  * @return EINVAL	If the state cannot be changed
  */
-int nic_set_state_impl(ddf_fun_t *fun, nic_device_state_t state)
+errno_t nic_set_state_impl(ddf_fun_t *fun, nic_device_state_t state)
 {
 	if (state >= NIC_STATE_MAX) {
@@ -108,5 +108,5 @@
 	}
 	if (event_handler != NULL) {
-		int rc = event_handler(nic_data);
+		errno_t rc = event_handler(nic_data);
 		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&nic_data->main_lock);
@@ -117,5 +117,5 @@
 	if (state == NIC_STATE_STOPPED) {
 		/* Notify upper layers that we are reseting the MAC */
-		int rc = nic_ev_addr_changed(nic_data->client_session,
+		errno_t rc = nic_ev_addr_changed(nic_data->client_session,
 			&nic_data->default_mac);
 		nic_data->poll_mode = nic_data->default_poll_mode;
@@ -168,5 +168,5 @@
  * @return EBUSY	If the device is not in state when the frame can be sent.
  */
-int nic_send_frame_impl(ddf_fun_t *fun, void *data, size_t size)
+errno_t nic_send_frame_impl(ddf_fun_t *fun, void *data, size_t size)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -191,5 +191,5 @@
  * @return EOK		On success, or an error code.
  */
-int nic_callback_create_impl(ddf_fun_t *fun)
+errno_t nic_callback_create_impl(ddf_fun_t *fun)
 {
 	nic_t *nic = nic_get_from_ddf_fun(fun);
@@ -216,5 +216,5 @@
  * @return ELIMIT	If the buffer is too short
  */
-int nic_get_address_impl(ddf_fun_t *fun, nic_address_t *address)
+errno_t nic_get_address_impl(ddf_fun_t *fun, nic_address_t *address)
 {
 	assert(address);
@@ -235,5 +235,5 @@
  * @return EOK (cannot fail)
  */
-int nic_get_stats_impl(ddf_fun_t *fun, nic_device_stats_t *stats)
+errno_t nic_get_stats_impl(ddf_fun_t *fun, nic_device_stats_t *stats)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -257,5 +257,5 @@
  * @return EOK
  */
-int nic_unicast_get_mode_impl(ddf_fun_t *fun, nic_unicast_mode_t *mode,
+errno_t nic_unicast_get_mode_impl(ddf_fun_t *fun, nic_unicast_mode_t *mode,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -281,5 +281,5 @@
  * @return ENOMEM
  */
-int nic_unicast_set_mode_impl(ddf_fun_t *fun,
+errno_t nic_unicast_set_mode_impl(ddf_fun_t *fun,
 	nic_unicast_mode_t mode, const nic_address_t *addr_list, size_t addr_count)
 {
@@ -294,5 +294,5 @@
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_unicast_mode_change) {
 		rc = nic_data->on_unicast_mode_change(nic_data,
@@ -324,5 +324,5 @@
  * @return EOK
  */
-int nic_multicast_get_mode_impl(ddf_fun_t *fun, nic_multicast_mode_t *mode,
+errno_t nic_multicast_get_mode_impl(ddf_fun_t *fun, nic_multicast_mode_t *mode,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -348,5 +348,5 @@
  * @return ENOMEM
  */
-int nic_multicast_set_mode_impl(ddf_fun_t *fun,	nic_multicast_mode_t mode,
+errno_t nic_multicast_set_mode_impl(ddf_fun_t *fun,	nic_multicast_mode_t mode,
 	const nic_address_t *addr_list, size_t addr_count)
 {
@@ -361,5 +361,5 @@
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_multicast_mode_change) {
 		rc = nic_data->on_multicast_mode_change(nic_data, mode, addr_list, addr_count);
@@ -381,5 +381,5 @@
  * @return EOK
  */
-int nic_broadcast_get_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t *mode)
+errno_t nic_broadcast_get_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t *mode)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -401,9 +401,9 @@
  * @return ENOMEM
  */
-int nic_broadcast_set_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t mode)
+errno_t nic_broadcast_set_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t mode)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_broadcast_mode_change) {
 		rc = nic_data->on_broadcast_mode_change(nic_data, mode);
@@ -427,5 +427,5 @@
  * @return EOK
  */
-int nic_blocked_sources_get_impl(ddf_fun_t *fun,
+errno_t nic_blocked_sources_get_impl(ddf_fun_t *fun,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -450,5 +450,5 @@
  * @return ENOMEM
  */
-int nic_blocked_sources_set_impl(ddf_fun_t *fun,
+errno_t nic_blocked_sources_set_impl(ddf_fun_t *fun,
 	const nic_address_t *addr_list, size_t addr_count)
 {
@@ -458,5 +458,5 @@
 		nic_data->on_blocked_sources_change(nic_data, addr_list, addr_count);
 	}
-	int rc = nic_rxc_blocked_sources_set(&nic_data->rx_control,
+	errno_t rc = nic_rxc_blocked_sources_set(&nic_data->rx_control,
 		addr_list, addr_count);
 	fibril_rwlock_write_unlock(&nic_data->rxc_lock);
@@ -473,9 +473,9 @@
  * @return ENOENT	If the mask is not set
  */
-int nic_vlan_get_mask_impl(ddf_fun_t *fun, nic_vlan_mask_t *mask)
+errno_t nic_vlan_get_mask_impl(ddf_fun_t *fun, nic_vlan_mask_t *mask)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
-	int rc = nic_rxc_vlan_get_mask(&nic_data->rx_control, mask);
+	errno_t rc = nic_rxc_vlan_get_mask(&nic_data->rx_control, mask);
 	fibril_rwlock_read_unlock(&nic_data->rxc_lock);
 	return rc;
@@ -491,9 +491,9 @@
  * @return ENOMEM
  */
-int nic_vlan_set_mask_impl(ddf_fun_t *fun, const nic_vlan_mask_t *mask)
+errno_t nic_vlan_set_mask_impl(ddf_fun_t *fun, const nic_vlan_mask_t *mask)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = nic_rxc_vlan_set_mask(&nic_data->rx_control, mask);
+	errno_t rc = nic_rxc_vlan_set_mask(&nic_data->rx_control, mask);
 	if (rc == EOK && nic_data->on_vlan_mask_change) {
 		nic_data->on_vlan_mask_change(nic_data, mask);
@@ -518,5 +518,5 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_add_impl(ddf_fun_t *fun, nic_wv_type_t type,
+errno_t nic_wol_virtue_add_impl(ddf_fun_t *fun, nic_wv_type_t type,
 	const void *data, size_t length, nic_wv_id_t *new_id)
 {
@@ -560,5 +560,5 @@
 	}
 	/* Call the user-defined add callback */
-	int rc = nic_data->on_wol_virtue_add(nic_data, virtue);
+	errno_t rc = nic_data->on_wol_virtue_add(nic_data, virtue);
 	if (rc != EOK) {
 		free(virtue->data);
@@ -593,5 +593,5 @@
  * @return ENOENT	If the virtue identifier is not valid.
  */
-int nic_wol_virtue_remove_impl(ddf_fun_t *fun, nic_wv_id_t id)
+errno_t nic_wol_virtue_remove_impl(ddf_fun_t *fun, nic_wv_id_t id)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -629,5 +629,5 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_probe_impl(ddf_fun_t *fun, nic_wv_id_t id,
+errno_t nic_wol_virtue_probe_impl(ddf_fun_t *fun, nic_wv_id_t id,
 	nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
 {
@@ -667,10 +667,10 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_list_impl(ddf_fun_t *fun, nic_wv_type_t type,
+errno_t nic_wol_virtue_list_impl(ddf_fun_t *fun, nic_wv_type_t type,
 	size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->wv_lock);
-	int rc = nic_wol_virtues_list(&nic_data->wol_virtues, type,
+	errno_t rc = nic_wol_virtues_list(&nic_data->wol_virtues, type,
 		max_count, id_list, id_count);
 	fibril_rwlock_read_unlock(&nic_data->wv_lock);
@@ -688,5 +688,5 @@
  * @return EOK		If the operation was successfully completed
   */
-int nic_wol_virtue_get_caps_impl(ddf_fun_t *fun, nic_wv_type_t type, int *count)
+errno_t nic_wol_virtue_get_caps_impl(ddf_fun_t *fun, nic_wv_type_t type, int *count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -710,5 +710,5 @@
  * @return EPARTY	Error in communication protocol
  */
-int nic_poll_get_mode_impl(ddf_fun_t *fun,
+errno_t nic_poll_get_mode_impl(ddf_fun_t *fun,
 	nic_poll_mode_t *mode, struct timeval *period)
 {
@@ -733,5 +733,5 @@
  * @return EPARTY	Error in communication protocol
  */
-int nic_poll_set_mode_impl(ddf_fun_t *fun,
+errno_t nic_poll_set_mode_impl(ddf_fun_t *fun,
 	nic_poll_mode_t mode, const struct timeval *period)
 {
@@ -754,5 +754,5 @@
 	}
 	fibril_rwlock_write_lock(&nic_data->main_lock);
-	int rc = nic_data->on_poll_mode_change(nic_data, mode, period);
+	errno_t rc = nic_data->on_poll_mode_change(nic_data, mode, period);
 	assert(rc == EOK || rc == ENOTSUP || rc == EINVAL);
 	if (rc == ENOTSUP && (nic_data->on_poll_request != NULL) && 
@@ -783,5 +783,5 @@
  * @return EINVAL	If the NIC is not in state where it allows on demand polling
  */
-int nic_poll_now_impl(ddf_fun_t *fun) {
+errno_t nic_poll_now_impl(ddf_fun_t *fun) {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->main_lock);
@@ -821,5 +821,5 @@
  * @return EOK always.
  */
-int nic_open_impl(ddf_fun_t *fun)
+errno_t nic_open_impl(ddf_fun_t *fun)
 {
 	return EOK;
Index: uspace/lib/nic/src/nic_rx_control.c
===================================================================
--- uspace/lib/nic/src/nic_rx_control.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_rx_control.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -52,8 +52,8 @@
  * @return EINVAL	Internal error, should not happen
  */
-int nic_rxc_init(nic_rxc_t *rxc)
+errno_t nic_rxc_init(nic_rxc_t *rxc)
 {
 	memset(rxc, 0, sizeof(nic_rxc_t));
-	int rc;
+	errno_t rc;
 	rc = nic_addr_db_init(&rxc->blocked_sources, ETH_ADDR);
 	if (rc != EOK) {
@@ -84,5 +84,5 @@
  * @param filters
  */
-int nic_rxc_clear(nic_rxc_t *rxc)
+errno_t nic_rxc_clear(nic_rxc_t *rxc)
 {
 	nic_addr_db_destroy(&rxc->unicast_addrs);
@@ -103,9 +103,9 @@
  *
  */
-int nic_rxc_set_addr(nic_rxc_t *rxc, const nic_address_t *prev_addr,
+errno_t nic_rxc_set_addr(nic_rxc_t *rxc, const nic_address_t *prev_addr,
     const nic_address_t *curr_addr)
 {
 	if (prev_addr != NULL) {
-		int rc = nic_addr_db_remove(&rxc->unicast_addrs,
+		errno_t rc = nic_addr_db_remove(&rxc->unicast_addrs,
 		    (const uint8_t *) &prev_addr->address);
 		if (rc != EOK)
@@ -173,5 +173,5 @@
  * @return ENOMEM	If there was not enough memory
  */
-int nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
+errno_t nic_rxc_unicast_set_mode(nic_rxc_t *rxc, nic_unicast_mode_t mode,
 	const nic_address_t *address_list, size_t address_count)
 {
@@ -188,5 +188,5 @@
 	size_t i;
 	for (i = 0; i < address_count; ++i) {
-		int rc = nic_addr_db_insert(&rxc->unicast_addrs,
+		errno_t rc = nic_addr_db_insert(&rxc->unicast_addrs,
 			(const uint8_t *) &address_list[i].address);
 		if (rc == ENOMEM) {
@@ -237,5 +237,5 @@
  * @return ENOMEM	If there was not enough memory
  */
-int nic_rxc_multicast_set_mode(nic_rxc_t *rxc, nic_multicast_mode_t mode,
+errno_t nic_rxc_multicast_set_mode(nic_rxc_t *rxc, nic_multicast_mode_t mode,
 	const nic_address_t *address_list, size_t address_count)
 {
@@ -251,5 +251,5 @@
 	size_t i;
 	for (i = 0; i < address_count; ++i) {
-		int rc = nic_addr_db_insert(&rxc->multicast_addrs,
+		errno_t rc = nic_addr_db_insert(&rxc->multicast_addrs,
 			(const uint8_t *)&address_list[i].address);
 		if (rc == ENOMEM) {
@@ -279,5 +279,5 @@
  * @return EOK		On success
  */
-int nic_rxc_broadcast_set_mode(nic_rxc_t *rxc, nic_broadcast_mode_t mode)
+errno_t nic_rxc_broadcast_set_mode(nic_rxc_t *rxc, nic_broadcast_mode_t mode)
 {
 	rxc->broadcast_mode = mode;
@@ -320,5 +320,5 @@
  * @return ENOMEM	If there was not enough memory
  */
-int nic_rxc_blocked_sources_set(nic_rxc_t *rxc,
+errno_t nic_rxc_blocked_sources_set(nic_rxc_t *rxc,
 	const nic_address_t *address_list, size_t address_count)
 {
@@ -330,5 +330,5 @@
 	size_t i;
 	for (i = 0; i < address_count; ++i) {
-		int rc = nic_addr_db_insert(&rxc->blocked_sources,
+		errno_t rc = nic_addr_db_insert(&rxc->blocked_sources,
 			(const uint8_t *) &address_list[i].address);
 		if (rc == ENOMEM) {
@@ -348,5 +348,5 @@
  * @return ENOENT
  */
-int nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask)
+errno_t nic_rxc_vlan_get_mask(const nic_rxc_t *rxc, nic_vlan_mask_t *mask)
 {
 	if (rxc->vlan_mask == NULL) {
@@ -366,5 +366,5 @@
  * @return ENOMEM
  */
-int nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask)
+errno_t nic_rxc_vlan_set_mask(nic_rxc_t *rxc, const nic_vlan_mask_t *mask)
 {
 	if (mask == NULL) {
Index: uspace/lib/nic/src/nic_wol_virtues.c
===================================================================
--- uspace/lib/nic/src/nic_wol_virtues.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_wol_virtues.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -71,5 +71,5 @@
  * @return ENOMEM	On not enough memory
  */
-int nic_wol_virtues_init(nic_wol_virtues_t *wvs)
+errno_t nic_wol_virtues_init(nic_wol_virtues_t *wvs)
 {
 	memset(wvs, 0, sizeof(nic_wol_virtues_t));
@@ -124,5 +124,5 @@
  * @return ENOTSUP	This type is unknown
  */
-int nic_wol_virtues_verify(nic_wv_type_t type, const void *data, size_t length)
+errno_t nic_wol_virtues_verify(nic_wv_type_t type, const void *data, size_t length)
 {
 	switch (type) {
@@ -160,5 +160,5 @@
  * @return ENOMEM	Not enough memory to activate the virtue
  */
-int nic_wol_virtues_add(nic_wol_virtues_t *wvs, nic_wol_virtue_t *virtue)
+errno_t nic_wol_virtues_add(nic_wol_virtues_t *wvs, nic_wol_virtue_t *virtue)
 {
 	if (!nic_wv_is_multi(virtue->type) &&
@@ -247,5 +247,5 @@
  * @return EINVAL	If the filter type is invalid
  */
-int nic_wol_virtues_list(const nic_wol_virtues_t *wvs, nic_wv_type_t type,
+errno_t nic_wol_virtues_list(const nic_wol_virtues_t *wvs, nic_wv_type_t type,
 	size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
 {
