Changeset a1e2df13 in mainline for uspace/srv/net/inetsrv


Ignore:
Timestamp:
2012-11-11T21:31:03Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
25eec4ef
Parents:
141a20d (diff), d1538a1 (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.
Message:

Merge mainline changes.

Location:
uspace/srv/net/inetsrv
Files:
9 edited

Legend:

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

    r141a20d ra1e2df13  
    5959
    6060        if (addr == NULL) {
    61                 log_msg(LVL_ERROR, "Failed allocating address object. "
     61                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating address object. "
    6262                    "Out of memory.");
    6363                return NULL;
     
    114114        uint32_t mask;
    115115
    116         log_msg(LVL_DEBUG, "inet_addrobj_find(%x)", (unsigned)addr->ipv4);
     116        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find(%x)", (unsigned)addr->ipv4);
    117117
    118118        fibril_mutex_lock(&addr_list_lock);
     
    125125                if ((naddr->naddr.ipv4 & mask) == (addr->ipv4 & mask)) {
    126126                        fibril_mutex_unlock(&addr_list_lock);
    127                         log_msg(LVL_DEBUG, "inet_addrobj_find: found %p",
     127                        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: found %p",
    128128                            naddr);
    129129                        return naddr;
     
    131131        }
    132132
    133         log_msg(LVL_DEBUG, "inet_addrobj_find: Not found");
     133        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: Not found");
    134134        fibril_mutex_unlock(&addr_list_lock);
    135135
     
    147147        assert(fibril_mutex_is_locked(&addr_list_lock));
    148148
    149         log_msg(LVL_DEBUG, "inet_addrobj_find_by_name_locked('%s', '%s')",
     149        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find_by_name_locked('%s', '%s')",
    150150            name, ilink->svc_name);
    151151
     
    155155
    156156                if (naddr->ilink == ilink && str_cmp(naddr->name, name) == 0) {
    157                         log_msg(LVL_DEBUG, "inet_addrobj_find_by_name_locked: found %p",
     157                        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find_by_name_locked: found %p",
    158158                            naddr);
    159159                        return naddr;
     
    161161        }
    162162
    163         log_msg(LVL_DEBUG, "inet_addrobj_find_by_name_locked: Not found");
     163        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find_by_name_locked: Not found");
    164164
    165165        return NULL;
     
    177177        inet_addrobj_t *aobj;
    178178
    179         log_msg(LVL_DEBUG, "inet_addrobj_find_by_name('%s', '%s')",
     179        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find_by_name('%s', '%s')",
    180180            name, ilink->svc_name);
    181181
     
    194194inet_addrobj_t *inet_addrobj_get_by_id(sysarg_t id)
    195195{
    196         log_msg(LVL_DEBUG, "inet_addrobj_get_by_id(%zu)", (size_t)id);
     196        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_get_by_id(%zu)", (size_t)id);
    197197
    198198        fibril_mutex_lock(&addr_list_lock);
  • uspace/srv/net/inetsrv/icmp.c

    r141a20d ra1e2df13  
    5757        uint8_t type;
    5858
    59         log_msg(LVL_DEBUG, "icmp_recv()");
     59        log_msg(LOG_DEFAULT, LVL_DEBUG, "icmp_recv()");
    6060
    6161        if (dgram->size < 1)
     
    8484        int rc;
    8585
    86         log_msg(LVL_DEBUG, "icmp_recv_echo_request()");
     86        log_msg(LOG_DEFAULT, LVL_DEBUG, "icmp_recv_echo_request()");
    8787
    8888        if (dgram->size < sizeof(icmp_echo_t))
     
    124124        uint16_t ident;
    125125
    126         log_msg(LVL_DEBUG, "icmp_recv_echo_reply()");
     126        log_msg(LOG_DEFAULT, LVL_DEBUG, "icmp_recv_echo_reply()");
    127127
    128128        if (dgram->size < sizeof(icmp_echo_t))
  • uspace/srv/net/inetsrv/inet_link.c

    r141a20d ra1e2df13  
    6464        int rc;
    6565
    66         log_msg(LVL_DEBUG, "inet_iplink_recv()");
     66        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_iplink_recv()");
    6767        rc = inet_pdu_decode(sdu->data, sdu->size, &packet);
    6868        if (rc != EOK) {
    69                 log_msg(LVL_DEBUG, "failed decoding PDU");
     69                log_msg(LOG_DEFAULT, LVL_DEBUG, "failed decoding PDU");
    7070                return rc;
    7171        }
    7272
    73         log_msg(LVL_DEBUG, "call inet_recv_packet()");
     73        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()");
    7474        rc = inet_recv_packet(&packet);
    75         log_msg(LVL_DEBUG, "call inet_recv_packet -> %d", rc);
     75        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc);
    7676        free(packet.data);
    7777
     
    9191        rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
    9292        if (rc != EOK) {
    93                 log_msg(LVL_ERROR, "Failed resolving category 'iplink'.");
     93                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
    9494                fibril_mutex_unlock(&inet_discovery_lock);
    9595                return ENOENT;
     
    9898        rc = loc_category_get_svcs(iplink_cat, &svcs, &count);
    9999        if (rc != EOK) {
    100                 log_msg(LVL_ERROR, "Failed getting list of IP links.");
     100                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links.");
    101101                fibril_mutex_unlock(&inet_discovery_lock);
    102102                return EIO;
     
    116116
    117117                if (!already_known) {
    118                         log_msg(LVL_DEBUG, "Found IP link '%lu'",
     118                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Found IP link '%lu'",
    119119                            (unsigned long) svcs[i]);
    120120                        rc = inet_link_open(svcs[i]);
    121121                        if (rc != EOK)
    122                                 log_msg(LVL_ERROR, "Could not open IP link.");
     122                                log_msg(LOG_DEFAULT, LVL_ERROR, "Could not open IP link.");
    123123                }
    124124        }
     
    133133
    134134        if (ilink == NULL) {
    135                 log_msg(LVL_ERROR, "Failed allocating link structure. "
     135                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating link structure. "
    136136                    "Out of memory.");
    137137                return NULL;
     
    156156        int rc;
    157157
    158         log_msg(LVL_DEBUG, "inet_link_open()");
     158        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_link_open()");
    159159        ilink = inet_link_new();
    160160        if (ilink == NULL)
     
    166166        rc = loc_service_get_name(sid, &ilink->svc_name);
    167167        if (rc != EOK) {
    168                 log_msg(LVL_ERROR, "Failed getting service name.");
     168                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name.");
    169169                goto error;
    170170        }
     
    172172        ilink->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid, 0);
    173173        if (ilink->sess == NULL) {
    174                 log_msg(LVL_ERROR, "Failed connecting '%s'", ilink->svc_name);
     174                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting '%s'", ilink->svc_name);
    175175                goto error;
    176176        }
     
    178178        rc = iplink_open(ilink->sess, &inet_iplink_ev_ops, &ilink->iplink);
    179179        if (rc != EOK) {
    180                 log_msg(LVL_ERROR, "Failed opening IP link '%s'",
     180                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed opening IP link '%s'",
    181181                    ilink->svc_name);
    182182                goto error;
     
    185185        rc = iplink_get_mtu(ilink->iplink, &ilink->def_mtu);
    186186        if (rc != EOK) {
    187                 log_msg(LVL_ERROR, "Failed determinning MTU of link '%s'",
     187                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed determinning MTU of link '%s'",
    188188                    ilink->svc_name);
    189189                goto error;
    190190        }
    191191
    192         log_msg(LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name);
     192        log_msg(LOG_DEFAULT, LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name);
    193193        list_append(&ilink->link_list, &inet_link_list);
    194194
     
    209209        rc = inet_addrobj_add(addr);
    210210        if (rc != EOK) {
    211                 log_msg(LVL_ERROR, "Failed setting IP address on internet link.");
     211                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link.");
    212212                inet_addrobj_delete(addr);
    213213                /* XXX Roll back */
     
    218218        rc = iplink_addr_add(ilink->iplink, &iaddr);
    219219        if (rc != EOK) {
    220                 log_msg(LVL_ERROR, "Failed setting IP address on internet link.");
     220                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link.");
    221221                inet_addrobj_remove(addr);
    222222                inet_addrobj_delete(addr);
     
    245245        rc = loc_register_cat_change_cb(inet_link_cat_change_cb);
    246246        if (rc != EOK) {
    247                 log_msg(LVL_ERROR, "Failed registering callback for IP link "
     247                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link "
    248248                    "discovery (%d).", rc);
    249249                return rc;
  • uspace/srv/net/inetsrv/inetcfg.c

    r141a20d ra1e2df13  
    6161        ilink = inet_link_get_by_id(link_id);
    6262        if (ilink == NULL) {
    63                 log_msg(LVL_DEBUG, "Link %lu not found.",
     63                log_msg(LOG_DEFAULT, LVL_DEBUG, "Link %lu not found.",
    6464                    (unsigned long) link_id);
    6565                return ENOENT;
     
    7777        rc = inet_addrobj_add(addr);
    7878        if (rc != EOK) {
    79                 log_msg(LVL_DEBUG, "Duplicate address name '%s'.", addr->name);
     79                log_msg(LOG_DEFAULT, LVL_DEBUG, "Duplicate address name '%s'.", addr->name);
    8080                inet_addrobj_delete(addr);
    8181                return rc;
     
    8585        rc = iplink_addr_add(ilink->iplink, &iaddr);
    8686        if (rc != EOK) {
    87                 log_msg(LVL_ERROR, "Failed setting IP address on internet link.");
     87                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link.");
    8888                inet_addrobj_remove(addr);
    8989                inet_addrobj_delete(addr);
     
    130130        ilink = inet_link_get_by_id(link_id);
    131131        if (ilink == NULL) {
    132                 log_msg(LVL_DEBUG, "Link %zu not found.", (size_t) link_id);
     132                log_msg(LOG_DEFAULT, LVL_DEBUG, "Link %zu not found.", (size_t) link_id);
    133133                return ENOENT;
    134134        }
     
    136136        addr = inet_addrobj_find_by_name(name, ilink);
    137137        if (addr == NULL) {
    138                 log_msg(LVL_DEBUG, "Address '%s' not found.", name);
     138                log_msg(LOG_DEFAULT, LVL_DEBUG, "Address '%s' not found.", name);
    139139                return ENOENT;
    140140        }
     
    228228        sroute = inet_sroute_find_by_name(name);
    229229        if (sroute == NULL) {
    230                 log_msg(LVL_DEBUG, "Static route '%s' not found.", name);
     230                log_msg(LOG_DEFAULT, LVL_DEBUG, "Static route '%s' not found.", name);
    231231                return ENOENT;
    232232        }
     
    245245        int rc;
    246246
    247         log_msg(LVL_DEBUG, "inetcfg_addr_create_static_srv()");
     247        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_create_static_srv()");
    248248
    249249        rc = async_data_write_accept((void **) &name, true, 0, LOC_NAME_MAXLEN,
     
    269269        int rc;
    270270
    271         log_msg(LVL_DEBUG, "inetcfg_addr_delete_srv()");
     271        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_delete_srv()");
    272272
    273273        addr_id = IPC_GET_ARG1(*call);
     
    287287
    288288        addr_id = IPC_GET_ARG1(*call);
    289         log_msg(LVL_DEBUG, "inetcfg_addr_get_srv()");
     289        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_get_srv()");
    290290
    291291        ainfo.naddr.ipv4 = 0;
     
    321321        int rc;
    322322
    323         log_msg(LVL_DEBUG, "inetcfg_addr_get_id_srv()");
     323        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_get_id_srv()");
    324324
    325325        link_id = IPC_GET_ARG1(*call);
     
    348348        int rc;
    349349
    350         log_msg(LVL_DEBUG, "inetcfg_get_addr_list_srv()");
     350        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_addr_list_srv()");
    351351
    352352        if (!async_data_read_receive(&rcallid, &max_size)) {
     
    382382        int rc;
    383383
    384         log_msg(LVL_DEBUG, "inetcfg_get_link_list_srv()");
     384        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_link_list_srv()");
    385385
    386386        if (!async_data_read_receive(&rcallid, &max_size)) {
     
    415415        int rc;
    416416
    417         log_msg(LVL_DEBUG, "inetcfg_get_sroute_list_srv()");
     417        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_sroute_list_srv()");
    418418
    419419        if (!async_data_read_receive(&rcallid, &max_size)) {
     
    449449
    450450        link_id = IPC_GET_ARG1(*call);
    451         log_msg(LVL_DEBUG, "inetcfg_link_get_srv()");
     451        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_link_get_srv()");
    452452
    453453        linfo.name = NULL;
     
    482482        int rc;
    483483
    484         log_msg(LVL_DEBUG, "inetcfg_sroute_create_srv()");
     484        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_create_srv()");
    485485
    486486        rc = async_data_write_accept((void **) &name, true, 0, LOC_NAME_MAXLEN,
     
    506506        int rc;
    507507
    508         log_msg(LVL_DEBUG, "inetcfg_sroute_delete_srv()");
     508        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_delete_srv()");
    509509
    510510        sroute_id = IPC_GET_ARG1(*call);
     
    524524
    525525        sroute_id = IPC_GET_ARG1(*call);
    526         log_msg(LVL_DEBUG, "inetcfg_sroute_get_srv()");
     526        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_get_srv()");
    527527
    528528        srinfo.dest.ipv4 = 0;
     
    557557        int rc;
    558558
    559         log_msg(LVL_DEBUG, "inetcfg_sroute_get_id_srv()");
     559        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_get_id_srv()");
    560560
    561561        rc = async_data_write_accept((void **) &name, true, 0, LOC_NAME_MAXLEN,
     
    574574void inet_cfg_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    575575{
    576         log_msg(LVL_DEBUG, "inet_cfg_conn()");
     576        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_cfg_conn()");
    577577
    578578        /* Accept the connection */
  • uspace/srv/net/inetsrv/inetping.c

    r141a20d ra1e2df13  
    7676        client = inetping_client_find(ident);
    7777        if (client == NULL) {
    78                 log_msg(LVL_DEBUG, "Unknown ICMP ident. Dropping.");
     78                log_msg(LOG_DEFAULT, LVL_DEBUG, "Unknown ICMP ident. Dropping.");
    7979                return ENOENT;
    8080        }
     
    107107        int rc;
    108108
    109         log_msg(LVL_DEBUG, "inetping_send_srv()");
     109        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetping_send_srv()");
    110110
    111111        rc = async_data_write_accept((void **) &sdu.data, false, 0, 0, 0,
     
    133133        int rc;
    134134
    135         log_msg(LVL_DEBUG, "inetping_get_srcaddr_srv()");
     135        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetping_get_srcaddr_srv()");
    136136
    137137        remote.ipv4 = IPC_GET_ARG1(*call);
     
    192192        int rc;
    193193
    194         log_msg(LVL_DEBUG, "inetping_conn()");
     194        log_msg(LOG_DEFAULT, LVL_DEBUG, "inetping_conn()");
    195195
    196196        /* Accept the connection */
  • uspace/srv/net/inetsrv/inetsrv.c

    r141a20d ra1e2df13  
    6666static int inet_init(void)
    6767{
    68         log_msg(LVL_DEBUG, "inet_init()");
     68        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_init()");
    6969       
    7070        async_set_client_connection(inet_client_conn);
     
    7272        int rc = loc_server_register(NAME);
    7373        if (rc != EOK) {
    74                 log_msg(LVL_ERROR, "Failed registering server (%d).", rc);
     74                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
    7575                return EEXIST;
    7676        }
     
    8080            INET_PORT_DEFAULT);
    8181        if (rc != EOK) {
    82                 log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
     82                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
    8383                return EEXIST;
    8484        }
     
    8787            INET_PORT_CFG);
    8888        if (rc != EOK) {
    89                 log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
     89                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
    9090                return EEXIST;
    9191        }
     
    9494            INET_PORT_PING);
    9595        if (rc != EOK) {
    96                 log_msg(LVL_ERROR, "Failed registering service (%d).", rc);
     96                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
    9797                return EEXIST;
    9898        }
     
    108108    ipc_call_t *call)
    109109{
    110         log_msg(LVL_DEBUG, "inet_callback_create_srv()");
     110        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_callback_create_srv()");
    111111
    112112        async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE);
     
    143143
    144144        if (dir->aobj == NULL) {
    145                 log_msg(LVL_DEBUG, "inet_send: No route to destination.");
     145                log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_send: No route to destination.");
    146146                return ENOENT;
    147147        }
     
    194194        int rc;
    195195
    196         log_msg(LVL_DEBUG, "inet_get_srcaddr_srv()");
     196        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_get_srcaddr_srv()");
    197197
    198198        remote.ipv4 = IPC_GET_ARG1(*call);
     
    212212        int rc;
    213213
    214         log_msg(LVL_DEBUG, "inet_send_srv()");
     214        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_send_srv()");
    215215
    216216        dgram.src.ipv4 = IPC_GET_ARG1(*call);
     
    238238
    239239        proto = IPC_GET_ARG1(*call);
    240         log_msg(LVL_DEBUG, "inet_set_proto_srv(%lu)", (unsigned long) proto);
     240        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_set_proto_srv(%lu)", (unsigned long) proto);
    241241
    242242        if (proto > UINT8_MAX) {
     
    272272        inet_client_t client;
    273273
    274         log_msg(LVL_DEBUG, "inet_default_conn()");
     274        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_default_conn()");
    275275
    276276        /* Accept the connection */
     
    378378        inet_client_t *client;
    379379
    380         log_msg(LVL_DEBUG, "inet_recv_dgram_local()");
     380        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_recv_dgram_local()");
    381381
    382382        /* ICMP messages are handled internally */
     
    386386        client = inet_client_find(proto);
    387387        if (client == NULL) {
    388                 log_msg(LVL_DEBUG, "No client found for protocol 0x%" PRIx8,
     388                log_msg(LOG_DEFAULT, LVL_DEBUG, "No client found for protocol 0x%" PRIx8,
    389389                    proto);
    390390                return ENOENT;
     
    428428        printf(NAME ": HelenOS Internet Protocol service\n");
    429429
    430         if (log_init(NAME, LVL_WARN) != EOK) {
     430        if (log_init(NAME) != EOK) {
    431431                printf(NAME ": Failed to initialize logging.\n");
    432432                return 1;
  • uspace/srv/net/inetsrv/pdu.c

    r141a20d ra1e2df13  
    204204        uint16_t foff;
    205205
    206         log_msg(LVL_DEBUG, "inet_pdu_decode()");
     206        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_pdu_decode()");
    207207
    208208        if (size < sizeof(ip_header_t)) {
    209                 log_msg(LVL_DEBUG, "PDU too short (%zu)", size);
     209                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
    210210                return EINVAL;
    211211        }
     
    216216            hdr->ver_ihl);
    217217        if (version != 4) {
    218                 log_msg(LVL_DEBUG, "Version (%d) != 4", version);
     218                log_msg(LOG_DEFAULT, LVL_DEBUG, "Version (%d) != 4", version);
    219219                return EINVAL;
    220220        }
     
    222222        tot_len = uint16_t_be2host(hdr->tot_len);
    223223        if (tot_len < sizeof(ip_header_t)) {
    224                 log_msg(LVL_DEBUG, "Total Length too small (%zu)", tot_len);
     224                log_msg(LOG_DEFAULT, LVL_DEBUG, "Total Length too small (%zu)", tot_len);
    225225                return EINVAL;
    226226        }
    227227
    228228        if (tot_len > size) {
    229                 log_msg(LVL_DEBUG, "Total Length = %zu > PDU size = %zu",
     229                log_msg(LOG_DEFAULT, LVL_DEBUG, "Total Length = %zu > PDU size = %zu",
    230230                        tot_len, size);
    231231                return EINVAL;
     
    256256        packet->data = calloc(packet->size, 1);
    257257        if (packet->data == NULL) {
    258                 log_msg(LVL_WARN, "Out of memory.");
     258                log_msg(LOG_DEFAULT, LVL_WARN, "Out of memory.");
    259259                return ENOMEM;
    260260        }
  • uspace/srv/net/inetsrv/reass.c

    r141a20d ra1e2df13  
    8686        int rc;
    8787
    88         log_msg(LVL_DEBUG, "inet_reass_queue_packet()");
     88        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_reass_queue_packet()");
    8989
    9090        fibril_mutex_lock(&reass_dgram_map_lock);
     
    9595                /* Only happens when we are out of memory */
    9696                fibril_mutex_unlock(&reass_dgram_map_lock);
    97                 log_msg(LVL_DEBUG, "Allocation failed, packet dropped.");
     97                log_msg(LOG_DEFAULT, LVL_DEBUG, "Allocation failed, packet dropped.");
    9898                return ENOMEM;
    9999        }
  • uspace/srv/net/inetsrv/sroute.c

    r141a20d ra1e2df13  
    5757
    5858        if (sroute == NULL) {
    59                 log_msg(LVL_ERROR, "Failed allocating static route object. "
     59                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating static route object. "
    6060                    "Out of memory.");
    6161                return NULL;
     
    100100        inet_sroute_t *best;
    101101
    102         log_msg(LVL_DEBUG, "inet_sroute_find(%x)", (unsigned)addr->ipv4);
     102        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find(%x)", (unsigned)addr->ipv4);
    103103
    104104        fibril_mutex_lock(&sroute_list_lock);
     
    117117                if ((sroute->dest.ipv4 & mask) == (addr->ipv4 & mask)) {
    118118                        fibril_mutex_unlock(&sroute_list_lock);
    119                         log_msg(LVL_DEBUG, "inet_sroute_find: found %p",
     119                        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find: found %p",
    120120                            sroute);
    121121                        return sroute;
     
    123123        }
    124124
    125         log_msg(LVL_DEBUG, "inet_sroute_find: Not found");
     125        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find: Not found");
    126126        fibril_mutex_unlock(&sroute_list_lock);
    127127
     
    136136inet_sroute_t *inet_sroute_find_by_name(const char *name)
    137137{
    138         log_msg(LVL_DEBUG, "inet_sroute_find_by_name('%s')",
     138        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find_by_name('%s')",
    139139            name);
    140140
     
    147147                if (str_cmp(sroute->name, name) == 0) {
    148148                        fibril_mutex_unlock(&sroute_list_lock);
    149                         log_msg(LVL_DEBUG, "inet_sroute_find_by_name: found %p",
     149                        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find_by_name: found %p",
    150150                            sroute);
    151151                        return sroute;
     
    153153        }
    154154
    155         log_msg(LVL_DEBUG, "inet_sroute_find_by_name: Not found");
     155        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_find_by_name: Not found");
    156156        fibril_mutex_unlock(&sroute_list_lock);
    157157
     
    166166inet_sroute_t *inet_sroute_get_by_id(sysarg_t id)
    167167{
    168         log_msg(LVL_DEBUG, "inet_sroute_get_by_id(%zu)", (size_t)id);
     168        log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_sroute_get_by_id(%zu)", (size_t)id);
    169169
    170170        fibril_mutex_lock(&sroute_list_lock);
Note: See TracChangeset for help on using the changeset viewer.