Changeset ebb1489 in mainline for uspace/srv/net/inetsrv/inetsrv.c


Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
Children:
0472cf17
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/inetsrv.c

    r2a0c827c rebb1489  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    7979};
    8080
     81static const char *inet_cfg_path = "/w/cfg/inetsrv.sif";
     82
    8183static FIBRIL_MUTEX_INITIALIZE(client_list_lock);
    8284static LIST_INITIALIZE(client_list);
     85inet_cfg_t *cfg;
    8386
    8487static void inet_default_conn(ipc_call_t *, void *);
     
    8689static errno_t inet_init(void)
    8790{
     91        port_id_t port;
     92        errno_t rc;
    8893        loc_srv_t *srv;
    8994
    9095        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_init()");
    9196
    92         port_id_t port;
    93         errno_t rc = async_create_port(INTERFACE_INET,
     97        rc = inet_link_discovery_start();
     98        if (rc != EOK)
     99                return rc;
     100
     101        rc = inet_cfg_open(inet_cfg_path, &cfg);
     102        if (rc != EOK)
     103                return rc;
     104
     105        rc = async_create_port(INTERFACE_INET,
    94106            inet_default_conn, NULL, &port);
    95107        if (rc != EOK)
     
    556568
    557569        printf(NAME ": Accepting connections.\n");
     570
    558571        task_retval(0);
     572
     573        (void)inet_link_autoconf();
    559574        async_manager();
    560575
Note: See TracChangeset for help on using the changeset viewer.