[c76e926] | 1 | /*
|
---|
| 2 | * Copyright (c) 2012 Jiri Svoboda
|
---|
| 3 | * All rights reserved.
|
---|
| 4 | *
|
---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
---|
| 6 | * modification, are permitted provided that the following conditions
|
---|
| 7 | * are met:
|
---|
| 8 | *
|
---|
| 9 | * - Redistributions of source code must retain the above copyright
|
---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | * documentation and/or other materials provided with the distribution.
|
---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
---|
| 15 | * derived from this software without specific prior written permission.
|
---|
| 16 | *
|
---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | /** @addtogroup inet
|
---|
| 30 | * @{
|
---|
| 31 | */
|
---|
| 32 | /**
|
---|
| 33 | * @file
|
---|
| 34 | * @brief Internet Protocol service
|
---|
| 35 | */
|
---|
| 36 |
|
---|
| 37 | #include <adt/list.h>
|
---|
| 38 | #include <async.h>
|
---|
| 39 | #include <errno.h>
|
---|
| 40 | #include <fibril_synch.h>
|
---|
| 41 | #include <io/log.h>
|
---|
| 42 | #include <ipc/inet.h>
|
---|
| 43 | #include <ipc/services.h>
|
---|
| 44 | #include <loc.h>
|
---|
| 45 | #include <stdio.h>
|
---|
[ecff3d9] | 46 | #include <stdlib.h>
|
---|
[c76e926] | 47 | #include <sys/types.h>
|
---|
| 48 |
|
---|
[ceba4bed] | 49 | #include "addrobj.h"
|
---|
[637a3b4] | 50 | #include "icmp.h"
|
---|
| 51 | #include "icmp_std.h"
|
---|
[b4ec1ea] | 52 | #include "inetsrv.h"
|
---|
[0e25780] | 53 | #include "inetcfg.h"
|
---|
[6428115] | 54 | #include "inetping.h"
|
---|
[e2e56e67] | 55 | #include "inet_link.h"
|
---|
[7f95c904] | 56 | #include "reass.h"
|
---|
[8bf672d] | 57 | #include "sroute.h"
|
---|
[c76e926] | 58 |
|
---|
[b4ec1ea] | 59 | #define NAME "inetsrv"
|
---|
[c76e926] | 60 |
|
---|
| 61 | static void inet_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
|
---|
| 62 |
|
---|
| 63 | static FIBRIL_MUTEX_INITIALIZE(client_list_lock);
|
---|
| 64 | static LIST_INITIALIZE(client_list);
|
---|
| 65 |
|
---|
| 66 | static int inet_init(void)
|
---|
| 67 | {
|
---|
| 68 | log_msg(LVL_DEBUG, "inet_init()");
|
---|
[1038a9c] | 69 |
|
---|
[c76e926] | 70 | async_set_client_connection(inet_client_conn);
|
---|
[1038a9c] | 71 |
|
---|
| 72 | int rc = loc_server_register(NAME);
|
---|
[c76e926] | 73 | if (rc != EOK) {
|
---|
| 74 | log_msg(LVL_ERROR, "Failed registering server (%d).", rc);
|
---|
| 75 | return EEXIST;
|
---|
| 76 | }
|
---|
[1038a9c] | 77 |
|
---|
| 78 | service_id_t sid;
|
---|
[0e25780] | 79 | rc = loc_service_register_with_iface(SERVICE_NAME_INET, &sid,
|
---|
| 80 | INET_PORT_DEFAULT);
|
---|
| 81 | if (rc != EOK) {
|
---|
| 82 | log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
|
---|
| 83 | return EEXIST;
|
---|
| 84 | }
|
---|
[1038a9c] | 85 |
|
---|
[0e25780] | 86 | rc = loc_service_register_with_iface(SERVICE_NAME_INETCFG, &sid,
|
---|
| 87 | INET_PORT_CFG);
|
---|
[c76e926] | 88 | if (rc != EOK) {
|
---|
| 89 | log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
|
---|
| 90 | return EEXIST;
|
---|
| 91 | }
|
---|
[1038a9c] | 92 |
|
---|
[6428115] | 93 | rc = loc_service_register_with_iface(SERVICE_NAME_INETPING, &sid,
|
---|
| 94 | INET_PORT_PING);
|
---|
| 95 | if (rc != EOK) {
|
---|
| 96 | log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
|
---|
| 97 | return EEXIST;
|
---|
| 98 | }
|
---|
[1038a9c] | 99 |
|
---|
[e2e56e67] | 100 | rc = inet_link_discovery_start();
|
---|
| 101 | if (rc != EOK)
|
---|
| 102 | return EEXIST;
|
---|
[1038a9c] | 103 |
|
---|
[c76e926] | 104 | return EOK;
|
---|
| 105 | }
|
---|
| 106 |
|
---|
[ceba4bed] | 107 | static void inet_callback_create_srv(inet_client_t *client, ipc_callid_t callid,
|
---|
[c76e926] | 108 | ipc_call_t *call)
|
---|
| 109 | {
|
---|
[ceba4bed] | 110 | log_msg(LVL_DEBUG, "inet_callback_create_srv()");
|
---|
[c76e926] | 111 |
|
---|
| 112 | async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE);
|
---|
| 113 | if (sess == NULL) {
|
---|
| 114 | async_answer_0(callid, ENOMEM);
|
---|
| 115 | return;
|
---|
| 116 | }
|
---|
| 117 |
|
---|
| 118 | client->sess = sess;
|
---|
| 119 | async_answer_0(callid, EOK);
|
---|
| 120 | }
|
---|
| 121 |
|
---|
[8bf672d] | 122 | static int inet_find_dir(inet_addr_t *src, inet_addr_t *dest, uint8_t tos,
|
---|
| 123 | inet_dir_t *dir)
|
---|
| 124 | {
|
---|
| 125 | inet_sroute_t *sr;
|
---|
| 126 |
|
---|
| 127 | /* XXX Handle case where source address is specified */
|
---|
| 128 | (void) src;
|
---|
| 129 |
|
---|
| 130 | dir->aobj = inet_addrobj_find(dest, iaf_net);
|
---|
| 131 | if (dir->aobj != NULL) {
|
---|
| 132 | dir->ldest = *dest;
|
---|
| 133 | dir->dtype = dt_direct;
|
---|
| 134 | } else {
|
---|
| 135 | /* No direct path, try using a static route */
|
---|
| 136 | sr = inet_sroute_find(dest);
|
---|
| 137 | if (sr != NULL) {
|
---|
| 138 | dir->aobj = inet_addrobj_find(&sr->router, iaf_net);
|
---|
| 139 | dir->ldest = sr->router;
|
---|
| 140 | dir->dtype = dt_router;
|
---|
| 141 | }
|
---|
| 142 | }
|
---|
| 143 |
|
---|
| 144 | if (dir->aobj == NULL) {
|
---|
| 145 | log_msg(LVL_DEBUG, "inet_send: No route to destination.");
|
---|
| 146 | return ENOENT;
|
---|
| 147 | }
|
---|
| 148 |
|
---|
| 149 | return EOK;
|
---|
| 150 | }
|
---|
| 151 |
|
---|
[637a3b4] | 152 | int inet_route_packet(inet_dgram_t *dgram, uint8_t proto, uint8_t ttl,
|
---|
[2ff150e] | 153 | int df)
|
---|
[ceba4bed] | 154 | {
|
---|
[8bf672d] | 155 | inet_dir_t dir;
|
---|
| 156 | int rc;
|
---|
[ceba4bed] | 157 |
|
---|
[8bf672d] | 158 | rc = inet_find_dir(&dgram->src, &dgram->dest, dgram->tos, &dir);
|
---|
| 159 | if (rc != EOK)
|
---|
| 160 | return rc;
|
---|
[ceba4bed] | 161 |
|
---|
[8bf672d] | 162 | return inet_addrobj_send_dgram(dir.aobj, &dir.ldest, dgram,
|
---|
| 163 | proto, ttl, df);
|
---|
[ceba4bed] | 164 | }
|
---|
| 165 |
|
---|
[e767dbf] | 166 | static int inet_send(inet_client_t *client, inet_dgram_t *dgram,
|
---|
[2ff150e] | 167 | uint8_t proto, uint8_t ttl, int df)
|
---|
[e767dbf] | 168 | {
|
---|
[2ff150e] | 169 | return inet_route_packet(dgram, proto, ttl, df);
|
---|
[e767dbf] | 170 | }
|
---|
| 171 |
|
---|
[6428115] | 172 | int inet_get_srcaddr(inet_addr_t *remote, uint8_t tos, inet_addr_t *local)
|
---|
[bd8bfc5a] | 173 | {
|
---|
[8bf672d] | 174 | inet_dir_t dir;
|
---|
| 175 | int rc;
|
---|
[bd8bfc5a] | 176 |
|
---|
[8bf672d] | 177 | rc = inet_find_dir(NULL, remote, tos, &dir);
|
---|
| 178 | if (rc != EOK)
|
---|
| 179 | return rc;
|
---|
[bd8bfc5a] | 180 |
|
---|
[8bf672d] | 181 | /* XXX dt_local? */
|
---|
| 182 |
|
---|
| 183 | /* Take source address from the address object */
|
---|
| 184 | local->ipv4 = dir.aobj->naddr.ipv4;
|
---|
| 185 | return EOK;
|
---|
[bd8bfc5a] | 186 | }
|
---|
| 187 |
|
---|
[ceba4bed] | 188 | static void inet_get_srcaddr_srv(inet_client_t *client, ipc_callid_t callid,
|
---|
[ecff3d9] | 189 | ipc_call_t *call)
|
---|
| 190 | {
|
---|
[bd8bfc5a] | 191 | inet_addr_t remote;
|
---|
| 192 | uint8_t tos;
|
---|
| 193 | inet_addr_t local;
|
---|
| 194 | int rc;
|
---|
| 195 |
|
---|
[ceba4bed] | 196 | log_msg(LVL_DEBUG, "inet_get_srcaddr_srv()");
|
---|
[ecff3d9] | 197 |
|
---|
[bd8bfc5a] | 198 | remote.ipv4 = IPC_GET_ARG1(*call);
|
---|
| 199 | tos = IPC_GET_ARG2(*call);
|
---|
| 200 | local.ipv4 = 0;
|
---|
| 201 |
|
---|
[6428115] | 202 | rc = inet_get_srcaddr(&remote, tos, &local);
|
---|
[bd8bfc5a] | 203 | async_answer_1(callid, rc, local.ipv4);
|
---|
[ecff3d9] | 204 | }
|
---|
| 205 |
|
---|
[ceba4bed] | 206 | static void inet_send_srv(inet_client_t *client, ipc_callid_t callid,
|
---|
[c76e926] | 207 | ipc_call_t *call)
|
---|
| 208 | {
|
---|
[59157eb] | 209 | inet_dgram_t dgram;
|
---|
[ecff3d9] | 210 | uint8_t ttl;
|
---|
| 211 | int df;
|
---|
| 212 | int rc;
|
---|
| 213 |
|
---|
[ceba4bed] | 214 | log_msg(LVL_DEBUG, "inet_send_srv()");
|
---|
[ecff3d9] | 215 |
|
---|
[59157eb] | 216 | dgram.src.ipv4 = IPC_GET_ARG1(*call);
|
---|
| 217 | dgram.dest.ipv4 = IPC_GET_ARG2(*call);
|
---|
| 218 | dgram.tos = IPC_GET_ARG3(*call);
|
---|
[ecff3d9] | 219 | ttl = IPC_GET_ARG4(*call);
|
---|
| 220 | df = IPC_GET_ARG5(*call);
|
---|
| 221 |
|
---|
[59157eb] | 222 | rc = async_data_write_accept(&dgram.data, false, 0, 0, 0, &dgram.size);
|
---|
[ecff3d9] | 223 | if (rc != EOK) {
|
---|
| 224 | async_answer_0(callid, rc);
|
---|
| 225 | return;
|
---|
| 226 | }
|
---|
| 227 |
|
---|
[2ff150e] | 228 | rc = inet_send(client, &dgram, client->protocol, ttl, df);
|
---|
[ceba4bed] | 229 |
|
---|
[59157eb] | 230 | free(dgram.data);
|
---|
[ceba4bed] | 231 | async_answer_0(callid, rc);
|
---|
[c76e926] | 232 | }
|
---|
| 233 |
|
---|
[ceba4bed] | 234 | static void inet_set_proto_srv(inet_client_t *client, ipc_callid_t callid,
|
---|
[c76e926] | 235 | ipc_call_t *call)
|
---|
| 236 | {
|
---|
| 237 | sysarg_t proto;
|
---|
| 238 |
|
---|
| 239 | proto = IPC_GET_ARG1(*call);
|
---|
[ceba4bed] | 240 | log_msg(LVL_DEBUG, "inet_set_proto_srv(%lu)", (unsigned long) proto);
|
---|
[c76e926] | 241 |
|
---|
| 242 | if (proto > UINT8_MAX) {
|
---|
| 243 | async_answer_0(callid, EINVAL);
|
---|
| 244 | return;
|
---|
| 245 | }
|
---|
| 246 |
|
---|
| 247 | client->protocol = proto;
|
---|
| 248 | async_answer_0(callid, EOK);
|
---|
| 249 | }
|
---|
| 250 |
|
---|
| 251 | static void inet_client_init(inet_client_t *client)
|
---|
| 252 | {
|
---|
| 253 | client->sess = NULL;
|
---|
| 254 |
|
---|
| 255 | fibril_mutex_lock(&client_list_lock);
|
---|
| 256 | list_append(&client->client_list, &client_list);
|
---|
| 257 | fibril_mutex_unlock(&client_list_lock);
|
---|
| 258 | }
|
---|
| 259 |
|
---|
| 260 | static void inet_client_fini(inet_client_t *client)
|
---|
| 261 | {
|
---|
| 262 | async_hangup(client->sess);
|
---|
| 263 | client->sess = NULL;
|
---|
| 264 |
|
---|
| 265 | fibril_mutex_lock(&client_list_lock);
|
---|
| 266 | list_remove(&client->client_list);
|
---|
| 267 | fibril_mutex_unlock(&client_list_lock);
|
---|
| 268 | }
|
---|
| 269 |
|
---|
[0e25780] | 270 | static void inet_default_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
|
---|
[c76e926] | 271 | {
|
---|
| 272 | inet_client_t client;
|
---|
| 273 |
|
---|
[0e25780] | 274 | log_msg(LVL_DEBUG, "inet_default_conn()");
|
---|
[c76e926] | 275 |
|
---|
| 276 | /* Accept the connection */
|
---|
| 277 | async_answer_0(iid, EOK);
|
---|
| 278 |
|
---|
| 279 | inet_client_init(&client);
|
---|
| 280 |
|
---|
| 281 | while (true) {
|
---|
| 282 | ipc_call_t call;
|
---|
| 283 | ipc_callid_t callid = async_get_call(&call);
|
---|
| 284 | sysarg_t method = IPC_GET_IMETHOD(call);
|
---|
| 285 |
|
---|
| 286 | if (!method) {
|
---|
| 287 | /* The other side has hung up */
|
---|
| 288 | async_answer_0(callid, EOK);
|
---|
| 289 | return;
|
---|
| 290 | }
|
---|
| 291 |
|
---|
| 292 | switch (method) {
|
---|
| 293 | case INET_CALLBACK_CREATE:
|
---|
[ceba4bed] | 294 | inet_callback_create_srv(&client, callid, &call);
|
---|
[c76e926] | 295 | break;
|
---|
[ecff3d9] | 296 | case INET_GET_SRCADDR:
|
---|
[ceba4bed] | 297 | inet_get_srcaddr_srv(&client, callid, &call);
|
---|
[ecff3d9] | 298 | break;
|
---|
[c76e926] | 299 | case INET_SEND:
|
---|
[ceba4bed] | 300 | inet_send_srv(&client, callid, &call);
|
---|
[c76e926] | 301 | break;
|
---|
| 302 | case INET_SET_PROTO:
|
---|
[ceba4bed] | 303 | inet_set_proto_srv(&client, callid, &call);
|
---|
[c76e926] | 304 | break;
|
---|
| 305 | default:
|
---|
| 306 | async_answer_0(callid, EINVAL);
|
---|
| 307 | }
|
---|
| 308 | }
|
---|
| 309 |
|
---|
| 310 | inet_client_fini(&client);
|
---|
| 311 | }
|
---|
| 312 |
|
---|
[0e25780] | 313 | static void inet_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
|
---|
| 314 | {
|
---|
| 315 | sysarg_t port;
|
---|
| 316 |
|
---|
| 317 | port = IPC_GET_ARG1(*icall);
|
---|
| 318 |
|
---|
| 319 | switch (port) {
|
---|
| 320 | case INET_PORT_DEFAULT:
|
---|
| 321 | inet_default_conn(iid, icall, arg);
|
---|
| 322 | break;
|
---|
| 323 | case INET_PORT_CFG:
|
---|
| 324 | inet_cfg_conn(iid, icall, arg);
|
---|
| 325 | break;
|
---|
[6428115] | 326 | case INET_PORT_PING:
|
---|
| 327 | inetping_conn(iid, icall, arg);
|
---|
| 328 | break;
|
---|
[0e25780] | 329 | default:
|
---|
| 330 | async_answer_0(iid, ENOTSUP);
|
---|
| 331 | break;
|
---|
| 332 | }
|
---|
| 333 | }
|
---|
| 334 |
|
---|
[fe4310f] | 335 | static inet_client_t *inet_client_find(uint8_t proto)
|
---|
| 336 | {
|
---|
| 337 | fibril_mutex_lock(&client_list_lock);
|
---|
| 338 |
|
---|
| 339 | list_foreach(client_list, link) {
|
---|
| 340 | inet_client_t *client = list_get_instance(link, inet_client_t,
|
---|
| 341 | client_list);
|
---|
| 342 |
|
---|
| 343 | if (client->protocol == proto) {
|
---|
| 344 | fibril_mutex_unlock(&client_list_lock);
|
---|
| 345 | return client;
|
---|
| 346 | }
|
---|
| 347 | }
|
---|
| 348 |
|
---|
| 349 | fibril_mutex_unlock(&client_list_lock);
|
---|
| 350 | return NULL;
|
---|
| 351 | }
|
---|
| 352 |
|
---|
[59157eb] | 353 | int inet_ev_recv(inet_client_t *client, inet_dgram_t *dgram)
|
---|
| 354 | {
|
---|
| 355 | async_exch_t *exch = async_exchange_begin(client->sess);
|
---|
| 356 |
|
---|
| 357 | ipc_call_t answer;
|
---|
| 358 | aid_t req = async_send_3(exch, INET_EV_RECV, dgram->src.ipv4,
|
---|
| 359 | dgram->dest.ipv4, dgram->tos, &answer);
|
---|
| 360 | int rc = async_data_write_start(exch, dgram->data, dgram->size);
|
---|
| 361 | async_exchange_end(exch);
|
---|
| 362 |
|
---|
| 363 | if (rc != EOK) {
|
---|
[50b581d] | 364 | async_forget(req);
|
---|
[59157eb] | 365 | return rc;
|
---|
| 366 | }
|
---|
| 367 |
|
---|
| 368 | sysarg_t retval;
|
---|
| 369 | async_wait_for(req, &retval);
|
---|
| 370 | if (retval != EOK)
|
---|
| 371 | return retval;
|
---|
| 372 |
|
---|
| 373 | return EOK;
|
---|
| 374 | }
|
---|
| 375 |
|
---|
[7f95c904] | 376 | int inet_recv_dgram_local(inet_dgram_t *dgram, uint8_t proto)
|
---|
[e767dbf] | 377 | {
|
---|
[fe4310f] | 378 | inet_client_t *client;
|
---|
| 379 |
|
---|
| 380 | log_msg(LVL_DEBUG, "inet_recv_dgram_local()");
|
---|
| 381 |
|
---|
[637a3b4] | 382 | /* ICMP messages are handled internally */
|
---|
| 383 | if (proto == IP_PROTO_ICMP)
|
---|
| 384 | return icmp_recv(dgram);
|
---|
| 385 |
|
---|
[fe4310f] | 386 | client = inet_client_find(proto);
|
---|
| 387 | if (client == NULL) {
|
---|
| 388 | log_msg(LVL_DEBUG, "No client found for protocol 0x%" PRIx8,
|
---|
| 389 | proto);
|
---|
| 390 | return ENOENT;
|
---|
| 391 | }
|
---|
| 392 |
|
---|
| 393 | return inet_ev_recv(client, dgram);
|
---|
| 394 | }
|
---|
| 395 |
|
---|
| 396 | int inet_recv_packet(inet_packet_t *packet)
|
---|
| 397 | {
|
---|
| 398 | inet_addrobj_t *addr;
|
---|
| 399 | inet_dgram_t dgram;
|
---|
| 400 |
|
---|
| 401 | addr = inet_addrobj_find(&packet->dest, iaf_addr);
|
---|
| 402 | if (addr != NULL) {
|
---|
| 403 | /* Destined for one of the local addresses */
|
---|
| 404 |
|
---|
[7f95c904] | 405 | /* Check if packet is a complete datagram */
|
---|
| 406 | if (packet->offs == 0 && !packet->mf) {
|
---|
| 407 | /* It is complete deliver it immediately */
|
---|
| 408 | dgram.src = packet->src;
|
---|
| 409 | dgram.dest = packet->dest;
|
---|
| 410 | dgram.tos = packet->tos;
|
---|
| 411 | dgram.data = packet->data;
|
---|
| 412 | dgram.size = packet->size;
|
---|
| 413 |
|
---|
| 414 | return inet_recv_dgram_local(&dgram, packet->proto);
|
---|
| 415 | } else {
|
---|
| 416 | /* It is a fragment, queue it for reassembly */
|
---|
| 417 | inet_reass_queue_packet(packet);
|
---|
| 418 | }
|
---|
[fe4310f] | 419 | }
|
---|
| 420 |
|
---|
| 421 | return ENOENT;
|
---|
[e767dbf] | 422 | }
|
---|
| 423 |
|
---|
[c76e926] | 424 | int main(int argc, char *argv[])
|
---|
| 425 | {
|
---|
| 426 | int rc;
|
---|
| 427 |
|
---|
[e2e56e67] | 428 | printf(NAME ": HelenOS Internet Protocol service\n");
|
---|
[c76e926] | 429 |
|
---|
[06a1d077] | 430 | if (log_init(NAME, LVL_WARN) != EOK) {
|
---|
[e2e56e67] | 431 | printf(NAME ": Failed to initialize logging.\n");
|
---|
[c76e926] | 432 | return 1;
|
---|
| 433 | }
|
---|
| 434 |
|
---|
| 435 | rc = inet_init();
|
---|
| 436 | if (rc != EOK)
|
---|
| 437 | return 1;
|
---|
| 438 |
|
---|
[ecff3d9] | 439 | printf(NAME ": Accepting connections.\n");
|
---|
[c76e926] | 440 | task_retval(0);
|
---|
| 441 | async_manager();
|
---|
| 442 |
|
---|
| 443 | /* Not reached */
|
---|
| 444 | return 0;
|
---|
| 445 | }
|
---|
| 446 |
|
---|
| 447 | /** @}
|
---|
| 448 | */
|
---|