Changes in uspace/srv/net/loopip/loopip.c [c1694b6b:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/loopip/loopip.c
rc1694b6b rb7fd2a0 49 49 #define NAME "loopip" 50 50 51 static int loopip_open(iplink_srv_t *srv);52 static int loopip_close(iplink_srv_t *srv);53 static int loopip_send(iplink_srv_t *srv, iplink_sdu_t *sdu);54 static int loopip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu);55 static int loopip_get_mtu(iplink_srv_t *srv, size_t *mtu);56 static int loopip_get_mac48(iplink_srv_t *srv, addr48_t *mac);57 static int loopip_addr_add(iplink_srv_t *srv, inet_addr_t *addr);58 static int loopip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr);51 static errno_t loopip_open(iplink_srv_t *srv); 52 static errno_t loopip_close(iplink_srv_t *srv); 53 static errno_t loopip_send(iplink_srv_t *srv, iplink_sdu_t *sdu); 54 static errno_t loopip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu); 55 static errno_t loopip_get_mtu(iplink_srv_t *srv, size_t *mtu); 56 static errno_t loopip_get_mac48(iplink_srv_t *srv, addr48_t *mac); 57 static errno_t loopip_addr_add(iplink_srv_t *srv, inet_addr_t *addr); 58 static errno_t loopip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr); 59 59 60 60 static void loopip_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg); … … 82 82 } rqueue_entry_t; 83 83 84 static int loopip_recv_fibril(void *arg)84 static errno_t loopip_recv_fibril(void *arg) 85 85 { 86 86 while (true) { … … 99 99 } 100 100 101 static int loopip_init(void)101 static errno_t loopip_init(void) 102 102 { 103 103 async_set_fallback_port_handler(loopip_client_conn, NULL); 104 104 105 int rc = loc_server_register(NAME);105 errno_t rc = loc_server_register(NAME); 106 106 if (rc != EOK) { 107 107 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server."); … … 153 153 } 154 154 155 static int loopip_open(iplink_srv_t *srv)155 static errno_t loopip_open(iplink_srv_t *srv) 156 156 { 157 157 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_open()"); … … 159 159 } 160 160 161 static int loopip_close(iplink_srv_t *srv)161 static errno_t loopip_close(iplink_srv_t *srv) 162 162 { 163 163 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_close()"); … … 165 165 } 166 166 167 static int loopip_send(iplink_srv_t *srv, iplink_sdu_t *sdu)167 static errno_t loopip_send(iplink_srv_t *srv, iplink_sdu_t *sdu) 168 168 { 169 169 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_send()"); … … 194 194 } 195 195 196 static int loopip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu)196 static errno_t loopip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu) 197 197 { 198 198 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip6_send()"); … … 223 223 } 224 224 225 static int loopip_get_mtu(iplink_srv_t *srv, size_t *mtu)225 static errno_t loopip_get_mtu(iplink_srv_t *srv, size_t *mtu) 226 226 { 227 227 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_get_mtu()"); … … 230 230 } 231 231 232 static int loopip_get_mac48(iplink_srv_t *src, addr48_t *mac)232 static errno_t loopip_get_mac48(iplink_srv_t *src, addr48_t *mac) 233 233 { 234 234 log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_get_mac48()"); … … 236 236 } 237 237 238 static int loopip_addr_add(iplink_srv_t *srv, inet_addr_t *addr)239 { 240 return EOK; 241 } 242 243 static int loopip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr)238 static errno_t loopip_addr_add(iplink_srv_t *srv, inet_addr_t *addr) 239 { 240 return EOK; 241 } 242 243 static errno_t loopip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr) 244 244 { 245 245 return EOK; … … 250 250 printf("%s: HelenOS loopback IP link provider\n", NAME); 251 251 252 int rc = log_init(NAME);252 errno_t rc = log_init(NAME); 253 253 if (rc != EOK) { 254 254 printf("%s: Failed to initialize logging: %s.\n", NAME, str_error(rc));
Note:
See TracChangeset
for help on using the changeset viewer.