Changeset a1a101d in mainline


Ignore:
Timestamp:
2012-08-17T16:58:51Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc0ccab
Parents:
920d0fc
Message:

Get rid of log_log_msg()

All calls to log_msg(LVL_*) were rewritten to
log_msg(LOG_DEFAULT, LVL_*).

Location:
uspace
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/stdio/logger1.c

    r920d0fc ra1a101d  
    3636{
    3737        for (log_level_t level = 0; level < LVL_LIMIT; level++) {
    38                 log_msg(level, "Testing logger, level %d.", (int) level);
     38                log_msg(LOG_DEFAULT, level, "Testing logger, level %d.", (int) level);
    3939        }
    4040
  • uspace/app/tester/stdio/logger2.c

    r920d0fc ra1a101d  
    4848                 */
    4949                for (log_level_t level = LVL_ERROR; level < LVL_LIMIT; level++) {
    50                         log_msg(level, "Printing level %d (%s).",
     50                        log_msg(LOG_DEFAULT, level, "Printing level %d (%s).",
    5151                            (int) level, log_level_str(level));
    52                         log_log_msg(log_alpha, level,
     52                        log_msg(log_alpha, level,
    5353                            "Printing level %d (%s) into alpha log.",
    5454                            (int) level, log_level_str(level));
    55                         log_log_msg(log_bravo, level,
     55                        log_msg(log_bravo, level,
    5656                            "Printing level %d (%s) into bravo sub-log.",
    5757                            (int) level, log_level_str(level));
  • uspace/drv/char/i8042/i8042.c

    r920d0fc ra1a101d  
    302302        const bool enabled = hw_res_enable_interrupt(parent_sess);
    303303        if (!enabled) {
    304                 log_msg(LVL_ERROR, "Failed to enable interrupts: %s.",
     304                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to enable interrupts: %s.",
    305305                    ddf_dev_get_name(ddf_dev));
    306306                rc = EIO;
  • uspace/lib/c/generic/io/log.c

    r920d0fc ra1a101d  
    192192 * @param fmt           Format string (no traling newline).
    193193 */
    194 void log_log_msg(log_t ctx, log_level_t level, const char *fmt, ...)
     194void log_msg(log_t ctx, log_level_t level, const char *fmt, ...)
    195195{
    196196        va_list args;
    197197
    198198        va_start(args, fmt);
    199         log_log_msgv(ctx, level, fmt, args);
     199        log_msgv(ctx, level, fmt, args);
    200200        va_end(args);
    201201}
     
    208208 * @param fmt           Format string (no trailing newline)
    209209 */
    210 void log_log_msgv(log_t ctx, log_level_t level, const char *fmt, va_list args)
     210void log_msgv(log_t ctx, log_level_t level, const char *fmt, va_list args)
    211211{
    212212        assert(level < LVL_LIMIT);
  • uspace/lib/c/include/io/log.h

    r920d0fc ra1a101d  
    6262extern log_t log_create(const char *, log_t);
    6363
    64 #define log_msg(level, format, ...) \
    65         log_log_msg(LOG_DEFAULT, (level), (format), ##__VA_ARGS__)
    66 #define log_msgv(level, format, args) \
    67         log_log_msgv(LOG_DEFAULT, (level), (format), (args))
    68 
    69 extern void log_log_msg(log_t, log_level_t, const char *, ...);
    70 extern void log_log_msgv(log_t, log_level_t, const char *, va_list);
     64extern void log_msg(log_t, log_level_t, const char *, ...);
     65extern void log_msgv(log_t, log_level_t, const char *, va_list);
    7166
    7267#endif
  • uspace/lib/drv/generic/log.c

    r920d0fc ra1a101d  
    5858       
    5959        va_start(args, fmt);
    60         log_msgv(level, fmt, args);
     60        log_msgv(LOG_DEFAULT, level, fmt, args);
    6161        va_end(args);
    6262}
  • uspace/lib/usb/include/usb/debug.h

    r920d0fc ra1a101d  
    5959
    6060#define usb_log_printf(level, format, ...) \
    61         log_msg(level, format, ##__VA_ARGS__)
     61        log_msg(LOG_DEFAULT, level, format, ##__VA_ARGS__)
    6262
    6363/** Log fatal error. */
  • uspace/srv/devman/devman.c

    r920d0fc ra1a101d  
    151151        fibril_mutex_unlock(&drivers_list->drivers_mutex);
    152152
    153         log_msg(LVL_NOTE, "Driver `%s' was added to the list of available "
     153        log_msg(LOG_DEFAULT, LVL_NOTE, "Driver `%s' was added to the list of available "
    154154            "drivers.", drv->name);
    155155}
     
    242242bool read_match_ids(const char *conf_path, match_id_list_t *ids)
    243243{
    244         log_msg(LVL_DEBUG, "read_match_ids(conf_path=\"%s\")", conf_path);
     244        log_msg(LOG_DEFAULT, LVL_DEBUG, "read_match_ids(conf_path=\"%s\")", conf_path);
    245245       
    246246        bool suc = false;
     
    252252        fd = open(conf_path, O_RDONLY);
    253253        if (fd < 0) {
    254                 log_msg(LVL_ERROR, "Unable to open `%s' for reading: %s.",
     254                log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to open `%s' for reading: %s.",
    255255                    conf_path, str_error(fd));
    256256                goto cleanup;
     
    261261        lseek(fd, 0, SEEK_SET);
    262262        if (len == 0) {
    263                 log_msg(LVL_ERROR, "Configuration file '%s' is empty.",
     263                log_msg(LOG_DEFAULT, LVL_ERROR, "Configuration file '%s' is empty.",
    264264                    conf_path);
    265265                goto cleanup;
     
    268268        buf = malloc(len + 1);
    269269        if (buf == NULL) {
    270                 log_msg(LVL_ERROR, "Memory allocation failed when parsing file "
     270                log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed when parsing file "
    271271                    "'%s'.", conf_path);
    272272                goto cleanup;
     
    275275        ssize_t read_bytes = read_all(fd, buf, len);
    276276        if (read_bytes <= 0) {
    277                 log_msg(LVL_ERROR, "Unable to read file '%s' (%zd).", conf_path,
     277                log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to read file '%s' (%zd).", conf_path,
    278278                    read_bytes);
    279279                goto cleanup;
     
    314314bool get_driver_info(const char *base_path, const char *name, driver_t *drv)
    315315{
    316         log_msg(LVL_DEBUG, "get_driver_info(base_path=\"%s\", name=\"%s\")",
     316        log_msg(LOG_DEFAULT, LVL_DEBUG, "get_driver_info(base_path=\"%s\", name=\"%s\")",
    317317            base_path, name);
    318318       
     
    346346        struct stat s;
    347347        if (stat(drv->binary_path, &s) == ENOENT) { /* FIXME!! */
    348                 log_msg(LVL_ERROR, "Driver not found at path `%s'.",
     348                log_msg(LOG_DEFAULT, LVL_ERROR, "Driver not found at path `%s'.",
    349349                    drv->binary_path);
    350350                goto cleanup;
     
    374374int lookup_available_drivers(driver_list_t *drivers_list, const char *dir_path)
    375375{
    376         log_msg(LVL_DEBUG, "lookup_available_drivers(dir=\"%s\")", dir_path);
     376        log_msg(LOG_DEFAULT, LVL_DEBUG, "lookup_available_drivers(dir=\"%s\")", dir_path);
    377377       
    378378        int drv_cnt = 0;
     
    408408        dev_node_t *dev;
    409409       
    410         log_msg(LVL_DEBUG, "create_root_nodes()");
     410        log_msg(LOG_DEFAULT, LVL_DEBUG, "create_root_nodes()");
    411411       
    412412        fibril_rwlock_write_lock(&tree->rwlock);
     
    495495void attach_driver(dev_tree_t *tree, dev_node_t *dev, driver_t *drv)
    496496{
    497         log_msg(LVL_DEBUG, "attach_driver(dev=\"%s\",drv=\"%s\")",
     497        log_msg(LOG_DEFAULT, LVL_DEBUG, "attach_driver(dev=\"%s\",drv=\"%s\")",
    498498            dev->pfun->pathname, drv->name);
    499499       
     
    520520        assert(drv != NULL);
    521521       
    522         log_msg(LVL_DEBUG, "detach_driver(dev=\"%s\",drv=\"%s\")",
     522        log_msg(LOG_DEFAULT, LVL_DEBUG, "detach_driver(dev=\"%s\",drv=\"%s\")",
    523523            dev->pfun->pathname, drv->name);
    524524       
     
    545545        assert(fibril_mutex_is_locked(&drv->driver_mutex));
    546546       
    547         log_msg(LVL_DEBUG, "start_driver(drv=\"%s\")", drv->name);
     547        log_msg(LOG_DEFAULT, LVL_DEBUG, "start_driver(drv=\"%s\")", drv->name);
    548548       
    549549        rc = task_spawnl(NULL, drv->binary_path, drv->binary_path, NULL);
    550550        if (rc != EOK) {
    551                 log_msg(LVL_ERROR, "Spawning driver `%s' (%s) failed: %s.",
     551                log_msg(LOG_DEFAULT, LVL_ERROR, "Spawning driver `%s' (%s) failed: %s.",
    552552                    drv->name, drv->binary_path, str_error(rc));
    553553                return false;
     
    594594        link_t *link;
    595595
    596         log_msg(LVL_DEBUG, "pass_devices_to_driver(driver=\"%s\")",
     596        log_msg(LOG_DEFAULT, LVL_DEBUG, "pass_devices_to_driver(driver=\"%s\")",
    597597            driver->name);
    598598
     
    614614                }
    615615
    616                 log_msg(LVL_DEBUG, "pass_devices_to_driver: dev->refcnt=%d\n",
     616                log_msg(LOG_DEFAULT, LVL_DEBUG, "pass_devices_to_driver: dev->refcnt=%d\n",
    617617                    (int)atomic_get(&dev->refcnt));
    618618                dev_add_ref(dev);
     
    650650         * immediately and possibly started here as well.
    651651         */
    652         log_msg(LVL_DEBUG, "Driver `%s' enters running state.", driver->name);
     652        log_msg(LOG_DEFAULT, LVL_DEBUG, "Driver `%s' enters running state.", driver->name);
    653653        driver->state = DRIVER_RUNNING;
    654654
     
    667667void initialize_running_driver(driver_t *driver, dev_tree_t *tree)
    668668{
    669         log_msg(LVL_DEBUG, "initialize_running_driver(driver=\"%s\")",
     669        log_msg(LOG_DEFAULT, LVL_DEBUG, "initialize_running_driver(driver=\"%s\")",
    670670            driver->name);
    671671       
     
    761761         * access any structures that would affect driver_t.
    762762         */
    763         log_msg(LVL_DEBUG, "add_device(drv=\"%s\", dev=\"%s\")",
     763        log_msg(LOG_DEFAULT, LVL_DEBUG, "add_device(drv=\"%s\", dev=\"%s\")",
    764764            drv->name, dev->pfun->name);
    765765       
     
    827827        driver_t *drv = find_best_match_driver(drivers_list, dev);
    828828        if (drv == NULL) {
    829                 log_msg(LVL_ERROR, "No driver found for device `%s'.",
     829                log_msg(LOG_DEFAULT, LVL_ERROR, "No driver found for device `%s'.",
    830830                    dev->pfun->pathname);
    831831                return false;
     
    867867        assert(dev != NULL);
    868868       
    869         log_msg(LVL_DEBUG, "driver_dev_remove(%p)", dev);
     869        log_msg(LOG_DEFAULT, LVL_DEBUG, "driver_dev_remove(%p)", dev);
    870870       
    871871        fibril_rwlock_read_lock(&tree->rwlock);
     
    890890        assert(dev != NULL);
    891891       
    892         log_msg(LVL_DEBUG, "driver_dev_gone(%p)", dev);
     892        log_msg(LOG_DEFAULT, LVL_DEBUG, "driver_dev_gone(%p)", dev);
    893893       
    894894        fibril_rwlock_read_lock(&tree->rwlock);
     
    911911        devman_handle_t handle;
    912912       
    913         log_msg(LVL_DEBUG, "driver_fun_online(%p)", fun);
     913        log_msg(LOG_DEFAULT, LVL_DEBUG, "driver_fun_online(%p)", fun);
    914914
    915915        fibril_rwlock_read_lock(&tree->rwlock);
     
    939939        devman_handle_t handle;
    940940       
    941         log_msg(LVL_DEBUG, "driver_fun_offline(%p)", fun);
     941        log_msg(LOG_DEFAULT, LVL_DEBUG, "driver_fun_offline(%p)", fun);
    942942
    943943        fibril_rwlock_read_lock(&tree->rwlock);
     
    970970bool init_device_tree(dev_tree_t *tree, driver_list_t *drivers_list)
    971971{
    972         log_msg(LVL_DEBUG, "init_device_tree()");
     972        log_msg(LOG_DEFAULT, LVL_DEBUG, "init_device_tree()");
    973973       
    974974        tree->current_handle = 0;
     
    12611261        fun->pathname = (char *) malloc(pathsize);
    12621262        if (fun->pathname == NULL) {
    1263                 log_msg(LVL_ERROR, "Failed to allocate device path.");
     1263                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to allocate device path.");
    12641264                return false;
    12651265        }
     
    12891289        assert(fibril_rwlock_is_write_locked(&tree->rwlock));
    12901290       
    1291         log_msg(LVL_DEBUG, "insert_dev_node(dev=%p, pfun=%p [\"%s\"])",
     1291        log_msg(LOG_DEFAULT, LVL_DEBUG, "insert_dev_node(dev=%p, pfun=%p [\"%s\"])",
    12921292            dev, pfun, pfun->pathname);
    12931293
     
    13131313        assert(fibril_rwlock_is_write_locked(&tree->rwlock));
    13141314       
    1315         log_msg(LVL_DEBUG, "remove_dev_node(dev=%p)", dev);
     1315        log_msg(LOG_DEFAULT, LVL_DEBUG, "remove_dev_node(dev=%p)", dev);
    13161316       
    13171317        /* Remove node from the handle-to-node map. */
  • uspace/srv/devman/main.c

    r920d0fc ra1a101d  
    7373        char *drv_name = NULL;
    7474
    75         log_msg(LVL_DEBUG, "devman_driver_register");
     75        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_driver_register");
    7676       
    7777        /* Get driver name. */
     
    8282        }
    8383
    84         log_msg(LVL_DEBUG, "The `%s' driver is trying to register.",
     84        log_msg(LOG_DEFAULT, LVL_DEBUG, "The `%s' driver is trying to register.",
    8585            drv_name);
    8686       
     
    8888        driver = find_driver(&drivers_list, drv_name);
    8989        if (driver == NULL) {
    90                 log_msg(LVL_ERROR, "No driver named `%s' was found.", drv_name);
     90                log_msg(LOG_DEFAULT, LVL_ERROR, "No driver named `%s' was found.", drv_name);
    9191                free(drv_name);
    9292                drv_name = NULL;
     
    102102        if (driver->sess) {
    103103                /* We already have a connection to the driver. */
    104                 log_msg(LVL_ERROR, "Driver '%s' already started.\n",
     104                log_msg(LOG_DEFAULT, LVL_ERROR, "Driver '%s' already started.\n",
    105105                    driver->name);
    106106                fibril_mutex_unlock(&driver->driver_mutex);
     
    112112        case DRIVER_NOT_STARTED:
    113113                /* Somebody started the driver manually. */
    114                 log_msg(LVL_NOTE, "Driver '%s' started manually.\n",
     114                log_msg(LOG_DEFAULT, LVL_NOTE, "Driver '%s' started manually.\n",
    115115                    driver->name);
    116116                driver->state = DRIVER_STARTING;
     
    125125       
    126126        /* Create connection to the driver. */
    127         log_msg(LVL_DEBUG, "Creating connection to the `%s' driver.",
     127        log_msg(LOG_DEFAULT, LVL_DEBUG, "Creating connection to the `%s' driver.",
    128128            driver->name);
    129129        driver->sess = async_callback_receive(EXCHANGE_PARALLEL);
     
    136136        async_sess_args_set(driver->sess, DRIVER_DEVMAN, 0, 0);
    137137       
    138         log_msg(LVL_NOTE,
     138        log_msg(LOG_DEFAULT, LVL_NOTE,
    139139            "The `%s' driver was successfully registered as running.",
    140140            driver->name);
     
    147147        fid_t fid = fibril_create(init_running_drv, driver);
    148148        if (fid == 0) {
    149                 log_msg(LVL_ERROR, "Failed to create initialization fibril " \
     149                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to create initialization fibril " \
    150150                    "for driver `%s'.", driver->name);
    151151                fibril_mutex_unlock(&driver->driver_mutex);
     
    176176        callid = async_get_call(&call);
    177177        if (DEVMAN_ADD_MATCH_ID != IPC_GET_IMETHOD(call)) {
    178                 log_msg(LVL_ERROR,
     178                log_msg(LOG_DEFAULT, LVL_ERROR,
    179179                    "Invalid protocol when trying to receive match id.");
    180180                async_answer_0(callid, EINVAL);
     
    184184       
    185185        if (match_id == NULL) {
    186                 log_msg(LVL_ERROR, "Failed to allocate match id.");
     186                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to allocate match id.");
    187187                async_answer_0(callid, ENOMEM);
    188188                return ENOMEM;
     
    198198        if (rc != EOK) {
    199199                delete_match_id(match_id);
    200                 log_msg(LVL_ERROR, "Failed to receive match id string: %s.",
     200                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to receive match id string: %s.",
    201201                    str_error(rc));
    202202                return rc;
     
    205205        list_append(&match_id->link, &match_ids->ids);
    206206       
    207         log_msg(LVL_DEBUG, "Received match id `%s', score %d.",
     207        log_msg(LOG_DEFAULT, LVL_DEBUG, "Received match id `%s', score %d.",
    208208            match_id->id, match_id->score);
    209209        return rc;
     
    248248        if (fun->state == FUN_ON_LINE) {
    249249                fibril_rwlock_write_unlock(&device_tree.rwlock);
    250                 log_msg(LVL_WARN, "Function %s is already on line.",
     250                log_msg(LOG_DEFAULT, LVL_WARN, "Function %s is already on line.",
    251251                    fun->pathname);
    252252                return EOK;
     
    264264        }
    265265       
    266         log_msg(LVL_DEBUG, "devman_add_function(fun=\"%s\")", fun->pathname);
     266        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_add_function(fun=\"%s\")", fun->pathname);
    267267       
    268268        if (fun->ftype == fun_inner) {
     
    282282                fid_t assign_fibril = fibril_create(assign_driver_fibril, dev);
    283283                if (assign_fibril == 0) {
    284                         log_msg(LVL_ERROR, "Failed to create fibril for "
     284                        log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to create fibril for "
    285285                            "assigning driver.");
    286286                        /* XXX Cleanup */
     
    305305        if (fun->state == FUN_OFF_LINE) {
    306306                fibril_rwlock_write_unlock(&device_tree.rwlock);
    307                 log_msg(LVL_WARN, "Function %s is already off line.",
     307                log_msg(LOG_DEFAULT, LVL_WARN, "Function %s is already off line.",
    308308                    fun->pathname);
    309309                return EOK;
     
    311311       
    312312        if (fun->ftype == fun_inner) {
    313                 log_msg(LVL_DEBUG, "Offlining inner function %s.",
     313                log_msg(LOG_DEFAULT, LVL_DEBUG, "Offlining inner function %s.",
    314314                    fun->pathname);
    315315               
     
    359359                if (rc != EOK) {
    360360                        fibril_rwlock_write_unlock(&device_tree.rwlock);
    361                         log_msg(LVL_ERROR, "Failed unregistering tree service.");
     361                        log_msg(LOG_DEFAULT, LVL_ERROR, "Failed unregistering tree service.");
    362362                        return EIO;
    363363                }
     
    391391        if (ftype != fun_inner && ftype != fun_exposed) {
    392392                /* Unknown function type */
    393                 log_msg(LVL_ERROR,
     393                log_msg(LOG_DEFAULT, LVL_ERROR,
    394394                    "Unknown function type %d provided by driver.",
    395395                    (int) ftype);
     
    507507        if (rc == EOK) {
    508508                loc_service_add_to_cat(fun->service_id, cat_id);
    509                 log_msg(LVL_NOTE, "Function `%s' added to category `%s'.",
     509                log_msg(LOG_DEFAULT, LVL_NOTE, "Function `%s' added to category `%s'.",
    510510                    fun->pathname, cat_name);
    511511        } else {
    512                 log_msg(LVL_ERROR, "Failed adding function `%s' to category "
     512                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed adding function `%s' to category "
    513513                    "`%s'.", fun->pathname, cat_name);
    514514        }
     
    529529        int rc;
    530530       
    531         log_msg(LVL_DEBUG, "devman_drv_fun_online()");
     531        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_drv_fun_online()");
    532532       
    533533        fun = find_fun_node(&device_tree, IPC_GET_ARG1(*icall));
     
    620620        fibril_rwlock_write_lock(&tree->rwlock);
    621621       
    622         log_msg(LVL_DEBUG, "devman_remove_function(fun='%s')", fun->pathname);
     622        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_remove_function(fun='%s')", fun->pathname);
    623623       
    624624        /* Check function state */
     
    653653                        /* Verify that driver succeeded and removed all functions */
    654654                        if (gone_rc != EOK || !list_empty(&dev->functions)) {
    655                                 log_msg(LVL_ERROR, "Driver did not remove "
     655                                log_msg(LOG_DEFAULT, LVL_ERROR, "Driver did not remove "
    656656                                    "functions for device that is gone. "
    657657                                    "Device node is now defunct.");
     
    692692                        rc = loc_service_unregister(fun->service_id);
    693693                        if (rc != EOK) {
    694                                 log_msg(LVL_ERROR, "Failed unregistering tree "
     694                                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed unregistering tree "
    695695                                    "service.");
    696696                                fibril_rwlock_write_unlock(&tree->rwlock);
     
    712712        fun_del_ref(fun);
    713713       
    714         log_msg(LVL_DEBUG, "devman_remove_function() succeeded.");
     714        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_remove_function() succeeded.");
    715715        async_answer_0(callid, EOK);
    716716}
     
    726726       
    727727        initialize_running_driver(driver, &device_tree);
    728         log_msg(LVL_DEBUG, "The `%s` driver was successfully initialized.",
     728        log_msg(LOG_DEFAULT, LVL_DEBUG, "The `%s` driver was successfully initialized.",
    729729            driver->name);
    730730        return 0;
     
    742742        client = async_get_client_data();
    743743        if (client == NULL) {
    744                 log_msg(LVL_ERROR, "Failed to allocate client data.");
     744                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to allocate client data.");
    745745                return;
    746746        }
     
    12291229         */
    12301230        if (dev == NULL) {
    1231                 log_msg(LVL_ERROR, "IPC forwarding failed - no device or "
     1231                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding failed - no device or "
    12321232                    "function with handle %" PRIun " was found.", handle);
    12331233                async_answer_0(iid, ENOENT);
     
    12361236
    12371237        if (fun == NULL && !drv_to_parent) {
    1238                 log_msg(LVL_ERROR, NAME ": devman_forward error - cannot "
     1238                log_msg(LOG_DEFAULT, LVL_ERROR, NAME ": devman_forward error - cannot "
    12391239                    "connect to handle %" PRIun ", refers to a device.",
    12401240                    handle);
     
    12641264       
    12651265        if (driver == NULL) {
    1266                 log_msg(LVL_ERROR, "IPC forwarding refused - " \
     1266                log_msg(LOG_DEFAULT, LVL_ERROR, "IPC forwarding refused - " \
    12671267                    "the device %" PRIun " is not in usable state.", handle);
    12681268                async_answer_0(iid, ENOENT);
     
    12771277       
    12781278        if (!driver->sess) {
    1279                 log_msg(LVL_ERROR,
     1279                log_msg(LOG_DEFAULT, LVL_ERROR,
    12801280                    "Could not forward to driver `%s'.", driver->name);
    12811281                async_answer_0(iid, EINVAL);
     
    12841284
    12851285        if (fun != NULL) {
    1286                 log_msg(LVL_DEBUG,
     1286                log_msg(LOG_DEFAULT, LVL_DEBUG,
    12871287                    "Forwarding request for `%s' function to driver `%s'.",
    12881288                    fun->pathname, driver->name);
    12891289        } else {
    1290                 log_msg(LVL_DEBUG,
     1290                log_msg(LOG_DEFAULT, LVL_DEBUG,
    12911291                    "Forwarding request for `%s' device to driver `%s'.",
    12921292                    dev->pfun->pathname, driver->name);
     
    13201320       
    13211321        if (fun == NULL || fun->dev == NULL || fun->dev->drv == NULL) {
    1322                 log_msg(LVL_WARN, "devman_connection_loc(): function "
     1322                log_msg(LOG_DEFAULT, LVL_WARN, "devman_connection_loc(): function "
    13231323                    "not found.\n");
    13241324                fibril_rwlock_read_unlock(&device_tree.rwlock);
     
    13381338        async_exchange_end(exch);
    13391339       
    1340         log_msg(LVL_DEBUG,
     1340        log_msg(LOG_DEFAULT, LVL_DEBUG,
    13411341            "Forwarding loc service request for `%s' function to driver `%s'.",
    13421342            fun->pathname, driver->name);
     
    13941394static bool devman_init(void)
    13951395{
    1396         log_msg(LVL_DEBUG, "devman_init - looking for available drivers.");
     1396        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_init - looking for available drivers.");
    13971397       
    13981398        /* Initialize list of available drivers. */
     
    14001400        if (lookup_available_drivers(&drivers_list,
    14011401            DRIVER_DEFAULT_STORE) == 0) {
    1402                 log_msg(LVL_FATAL, "No drivers found.");
     1402                log_msg(LOG_DEFAULT, LVL_FATAL, "No drivers found.");
    14031403                return false;
    14041404        }
    14051405       
    1406         log_msg(LVL_DEBUG, "devman_init - list of drivers has been initialized.");
     1406        log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_init - list of drivers has been initialized.");
    14071407       
    14081408        /* Create root device node. */
    14091409        if (!init_device_tree(&device_tree, &drivers_list)) {
    1410                 log_msg(LVL_FATAL, "Failed to initialize device tree.");
     1410                log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to initialize device tree.");
    14111411                return false;
    14121412        }
     
    14401440       
    14411441        if (!devman_init()) {
    1442                 log_msg(LVL_ERROR, "Error while initializing service.");
     1442                log_msg(LOG_DEFAULT, LVL_ERROR, "Error while initializing service.");
    14431443                return -1;
    14441444        }
     
    14471447        rc = service_register(SERVICE_DEVMAN);
    14481448        if (rc != EOK) {
    1449                 log_msg(LVL_ERROR, "Failed registering as a service.");
     1449                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering as a service.");
    14501450                return rc;
    14511451        }
  • uspace/srv/net/ethip/arp.c

    r920d0fc ra1a101d  
    5959        ethip_link_addr_t *laddr;
    6060
    61         log_msg(LVL_DEBUG, "arp_received()");
     61        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_received()");
    6262
    6363        rc = arp_pdu_decode(frame->data, frame->size, &packet);
     
    6565                return;
    6666
    67         log_msg(LVL_DEBUG, "ARP PDU decoded, opcode=%d, tpa=%x",
     67        log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU decoded, opcode=%d, tpa=%x",
    6868            packet.opcode, packet.target_proto_addr.ipv4);
    6969
    7070        laddr = ethip_nic_addr_find(nic, &packet.target_proto_addr);
    7171        if (laddr != NULL) {
    72                 log_msg(LVL_DEBUG, "Request/reply to my address");
     72                log_msg(LOG_DEFAULT, LVL_DEBUG, "Request/reply to my address");
    7373
    7474                (void) atrans_add(&packet.sender_proto_addr,
     
    122122        size_t fsize;
    123123
    124         log_msg(LVL_DEBUG, "arp_send_packet()");
     124        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_send_packet()");
    125125
    126126        rc = arp_pdu_encode(packet, &pdata, &psize);
  • uspace/srv/net/ethip/ethip.c

    r920d0fc ra1a101d  
    7777        int rc = loc_server_register(NAME);
    7878        if (rc != EOK) {
    79                 log_msg(LVL_ERROR, "Failed registering server.");
     79                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server.");
    8080                return rc;
    8181        }
     
    9696        char *svc_name = NULL;
    9797
    98         log_msg(LVL_DEBUG, "ethip_iplink_init()");
     98        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_iplink_init()");
    9999
    100100        iplink_srv_init(&nic->iplink);
     
    104104        rc = asprintf(&svc_name, "net/eth%u", ++link_num);
    105105        if (rc < 0) {
    106                 log_msg(LVL_ERROR, "Out of memory.");
     106                log_msg(LOG_DEFAULT, LVL_ERROR, "Out of memory.");
    107107                goto error;
    108108        }
     
    110110        rc = loc_service_register(svc_name, &sid);
    111111        if (rc != EOK) {
    112                 log_msg(LVL_ERROR, "Failed registering service %s.", svc_name);
     112                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service %s.", svc_name);
    113113                goto error;
    114114        }
     
    118118        rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
    119119        if (rc != EOK) {
    120                 log_msg(LVL_ERROR, "Failed resolving category 'iplink'.");
     120                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
    121121                goto error;
    122122        }
     
    124124        rc = loc_service_add_to_cat(sid, iplink_cat);
    125125        if (rc != EOK) {
    126                 log_msg(LVL_ERROR, "Failed adding %s to category.", svc_name);
     126                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed adding %s to category.", svc_name);
    127127                goto error;
    128128        }
     
    142142
    143143        sid = (service_id_t)IPC_GET_ARG1(*icall);
    144         log_msg(LVL_DEBUG, "ethip_client_conn(%u)", (unsigned)sid);
     144        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_client_conn(%u)", (unsigned)sid);
    145145        nic = ethip_nic_find_by_iplink_sid(sid);
    146146        if (nic == NULL) {
    147                 log_msg(LVL_WARN, "Uknown service ID.");
     147                log_msg(LOG_DEFAULT, LVL_WARN, "Uknown service ID.");
    148148                return;
    149149        }
     
    154154static int ethip_open(iplink_srv_t *srv)
    155155{
    156         log_msg(LVL_DEBUG, "ethip_open()");
     156        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_open()");
    157157        return EOK;
    158158}
     
    160160static int ethip_close(iplink_srv_t *srv)
    161161{
    162         log_msg(LVL_DEBUG, "ethip_close()");
     162        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_close()");
    163163        return EOK;
    164164}
     
    173173        int rc;
    174174
    175         log_msg(LVL_DEBUG, "ethip_send()");
     175        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_send()");
    176176
    177177        rc = arp_translate(nic, &sdu->lsrc, &sdu->ldest, &dest_mac_addr);
    178178        if (rc != EOK) {
    179                 log_msg(LVL_WARN, "Failed to look up IP address 0x%" PRIx32,
     179                log_msg(LOG_DEFAULT, LVL_WARN, "Failed to look up IP address 0x%" PRIx32,
    180180                    sdu->ldest.ipv4);
    181181                return rc;
     
    200200int ethip_received(iplink_srv_t *srv, void *data, size_t size)
    201201{
    202         log_msg(LVL_DEBUG, "ethip_received(): srv=%p", srv);
     202        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_received(): srv=%p", srv);
    203203        ethip_nic_t *nic = (ethip_nic_t *)srv->arg;
    204204        eth_frame_t frame;
     
    206206        int rc;
    207207
    208         log_msg(LVL_DEBUG, "ethip_received()");
    209 
    210         log_msg(LVL_DEBUG, " - eth_pdu_decode");
     208        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_received()");
     209
     210        log_msg(LOG_DEFAULT, LVL_DEBUG, " - eth_pdu_decode");
    211211        rc = eth_pdu_decode(data, size, &frame);
    212212        if (rc != EOK) {
    213                 log_msg(LVL_DEBUG, " - eth_pdu_decode failed");
     213                log_msg(LOG_DEFAULT, LVL_DEBUG, " - eth_pdu_decode failed");
    214214                return rc;
    215215        }
     
    220220                break;
    221221        case ETYPE_IP:
    222                 log_msg(LVL_DEBUG, " - construct SDU");
     222                log_msg(LOG_DEFAULT, LVL_DEBUG, " - construct SDU");
    223223                sdu.lsrc.ipv4 = (192 << 24) | (168 << 16) | (0 << 8) | 1;
    224224                sdu.ldest.ipv4 = (192 << 24) | (168 << 16) | (0 << 8) | 4;
    225225                sdu.data = frame.data;
    226226                sdu.size = frame.size;
    227                 log_msg(LVL_DEBUG, " - call iplink_ev_recv");
     227                log_msg(LOG_DEFAULT, LVL_DEBUG, " - call iplink_ev_recv");
    228228                rc = iplink_ev_recv(&nic->iplink, &sdu);
    229229                break;
    230230        default:
    231                 log_msg(LVL_DEBUG, "Unknown ethertype 0x%" PRIx16,
     231                log_msg(LOG_DEFAULT, LVL_DEBUG, "Unknown ethertype 0x%" PRIx16,
    232232                    frame.etype_len);
    233233        }
     
    239239static int ethip_get_mtu(iplink_srv_t *srv, size_t *mtu)
    240240{
    241         log_msg(LVL_DEBUG, "ethip_get_mtu()");
     241        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_get_mtu()");
    242242        *mtu = 1500;
    243243        return EOK;
     
    248248        ethip_nic_t *nic = (ethip_nic_t *)srv->arg;
    249249
    250         log_msg(LVL_DEBUG, "ethip_addr_add(0x%" PRIx32 ")", addr->ipv4);
     250        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_addr_add(0x%" PRIx32 ")", addr->ipv4);
    251251        return ethip_nic_addr_add(nic, addr);
    252252}
     
    256256        ethip_nic_t *nic = (ethip_nic_t *)srv->arg;
    257257
    258         log_msg(LVL_DEBUG, "ethip_addr_remove(0x%" PRIx32 ")", addr->ipv4);
     258        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_addr_remove(0x%" PRIx32 ")", addr->ipv4);
    259259        return ethip_nic_addr_add(nic, addr);
    260260}
  • uspace/srv/net/ethip/ethip_nic.c

    r920d0fc ra1a101d  
    6868        rc = loc_category_get_id("nic", &iplink_cat, IPC_FLAG_BLOCKING);
    6969        if (rc != EOK) {
    70                 log_msg(LVL_ERROR, "Failed resolving category 'nic'.");
     70                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'nic'.");
    7171                fibril_mutex_unlock(&ethip_discovery_lock);
    7272                return ENOENT;
     
    7575        rc = loc_category_get_svcs(iplink_cat, &svcs, &count);
    7676        if (rc != EOK) {
    77                 log_msg(LVL_ERROR, "Failed getting list of IP links.");
     77                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links.");
    7878                fibril_mutex_unlock(&ethip_discovery_lock);
    7979                return EIO;
     
    9393
    9494                if (!already_known) {
    95                         log_msg(LVL_DEBUG, "Found NIC '%lu'",
     95                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Found NIC '%lu'",
    9696                            (unsigned long) svcs[i]);
    9797                        rc = ethip_nic_open(svcs[i]);
    9898                        if (rc != EOK)
    99                                 log_msg(LVL_ERROR, "Could not open NIC.");
     99                                log_msg(LOG_DEFAULT, LVL_ERROR, "Could not open NIC.");
    100100                }
    101101        }
     
    110110
    111111        if (nic == NULL) {
    112                 log_msg(LVL_ERROR, "Failed allocating NIC structure. "
     112                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating NIC structure. "
    113113                    "Out of memory.");
    114114                return NULL;
     
    126126
    127127        if (laddr == NULL) {
    128                 log_msg(LVL_ERROR, "Failed allocating NIC address structure. "
     128                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating NIC address structure. "
    129129                    "Out of memory.");
    130130                return NULL;
     
    153153        nic_address_t nic_address;
    154154       
    155         log_msg(LVL_DEBUG, "ethip_nic_open()");
     155        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_open()");
    156156        ethip_nic_t *nic = ethip_nic_new();
    157157        if (nic == NULL)
     
    160160        int rc = loc_service_get_name(sid, &nic->svc_name);
    161161        if (rc != EOK) {
    162                 log_msg(LVL_ERROR, "Failed getting service name.");
     162                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name.");
    163163                goto error;
    164164        }
     
    166166        nic->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid, 0);
    167167        if (nic->sess == NULL) {
    168                 log_msg(LVL_ERROR, "Failed connecting '%s'", nic->svc_name);
     168                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting '%s'", nic->svc_name);
    169169                goto error;
    170170        }
     
    174174        rc = nic_callback_create(nic->sess, ethip_nic_cb_conn, nic);
    175175        if (rc != EOK) {
    176                 log_msg(LVL_ERROR, "Failed creating callback connection "
     176                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed creating callback connection "
    177177                    "from '%s'", nic->svc_name);
    178178                goto error;
    179179        }
    180180
    181         log_msg(LVL_DEBUG, "Opened NIC '%s'", nic->svc_name);
     181        log_msg(LOG_DEFAULT, LVL_DEBUG, "Opened NIC '%s'", nic->svc_name);
    182182        list_append(&nic->nic_list, &ethip_nic_list);
    183183        in_list = true;
     
    189189        rc = nic_get_address(nic->sess, &nic_address);
    190190        if (rc != EOK) {
    191                 log_msg(LVL_ERROR, "Error getting MAC address of NIC '%s'.",
     191                log_msg(LOG_DEFAULT, LVL_ERROR, "Error getting MAC address of NIC '%s'.",
    192192                    nic->svc_name);
    193193                goto error;
     
    198198        rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE);
    199199        if (rc != EOK) {
    200                 log_msg(LVL_ERROR, "Error activating NIC '%s'.",
     200                log_msg(LOG_DEFAULT, LVL_ERROR, "Error activating NIC '%s'.",
    201201                    nic->svc_name);
    202202                goto error;
    203203        }
    204204
    205         log_msg(LVL_DEBUG, "Initialized IP link service, MAC = 0x%" PRIx64,
     205        log_msg(LOG_DEFAULT, LVL_DEBUG, "Initialized IP link service, MAC = 0x%" PRIx64,
    206206            nic->mac_addr.addr);
    207207
     
    225225    ipc_call_t *call)
    226226{
    227         log_msg(LVL_DEBUG, "ethip_nic_addr_changed()");
     227        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_changed()");
    228228        async_answer_0(callid, ENOTSUP);
    229229}
     
    236236        size_t size;
    237237
    238         log_msg(LVL_DEBUG, "ethip_nic_received() nic=%p", nic);
     238        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() nic=%p", nic);
    239239
    240240        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
    241241        if (rc != EOK) {
    242                 log_msg(LVL_DEBUG, "data_write_accept() failed");
     242                log_msg(LOG_DEFAULT, LVL_DEBUG, "data_write_accept() failed");
    243243                return;
    244244        }
    245245
    246         log_msg(LVL_DEBUG, "Ethernet PDU contents (%zu bytes)",
     246        log_msg(LOG_DEFAULT, LVL_DEBUG, "Ethernet PDU contents (%zu bytes)",
    247247            size);
    248248
    249         log_msg(LVL_DEBUG, "call ethip_received");
     249        log_msg(LOG_DEFAULT, LVL_DEBUG, "call ethip_received");
    250250        rc = ethip_received(&nic->iplink, data, size);
    251         log_msg(LVL_DEBUG, "free data");
     251        log_msg(LOG_DEFAULT, LVL_DEBUG, "free data");
    252252        free(data);
    253253
    254         log_msg(LVL_DEBUG, "ethip_nic_received() done, rc=%d", rc);
     254        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%d", rc);
    255255        async_answer_0(callid, rc);
    256256}
     
    259259    ipc_call_t *call)
    260260{
    261         log_msg(LVL_DEBUG, "ethip_nic_device_state()");
     261        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_device_state()");
    262262        async_answer_0(callid, ENOTSUP);
    263263}
     
    267267        ethip_nic_t *nic = (ethip_nic_t *)arg;
    268268
    269         log_msg(LVL_DEBUG, "ethnip_nic_cb_conn()");
     269        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethnip_nic_cb_conn()");
    270270
    271271        while (true) {
     
    298298        int rc = loc_register_cat_change_cb(ethip_nic_cat_change_cb);
    299299        if (rc != EOK) {
    300                 log_msg(LVL_ERROR, "Failed registering callback for NIC "
     300                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for NIC "
    301301                    "discovery (%d).", rc);
    302302                return rc;
     
    308308ethip_nic_t *ethip_nic_find_by_iplink_sid(service_id_t iplink_sid)
    309309{
    310         log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid(%u)",
     310        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid(%u)",
    311311            (unsigned) iplink_sid);
    312312
    313313        list_foreach(ethip_nic_list, link) {
    314                 log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - element");
     314                log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid - element");
    315315                ethip_nic_t *nic = list_get_instance(link, ethip_nic_t,
    316316                    nic_list);
    317317
    318318                if (nic->iplink_sid == iplink_sid) {
    319                         log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - found %p", nic);
     319                        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid - found %p", nic);
    320320                        return nic;
    321321                }
    322322        }
    323323
    324         log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - not found");
     324        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_find_by_iplink_sid - not found");
    325325        return NULL;
    326326}
     
    329329{
    330330        int rc;
    331         log_msg(LVL_DEBUG, "ethip_nic_send(size=%zu)", size);
     331        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_send(size=%zu)", size);
    332332        rc = nic_send_frame(nic->sess, data, size);
    333         log_msg(LVL_DEBUG, "nic_send_frame -> %d", rc);
     333        log_msg(LOG_DEFAULT, LVL_DEBUG, "nic_send_frame -> %d", rc);
    334334        return rc;
    335335}
     
    339339        ethip_link_addr_t *laddr;
    340340
    341         log_msg(LVL_DEBUG, "ethip_nic_addr_add()");
     341        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_add()");
    342342        laddr = ethip_nic_addr_new(addr);
    343343        if (laddr == NULL)
     
    352352        ethip_link_addr_t *laddr;
    353353
    354         log_msg(LVL_DEBUG, "ethip_nic_addr_remove()");
     354        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_remove()");
    355355
    356356        laddr = ethip_nic_addr_find(nic, addr);
     
    366366    iplink_srv_addr_t *addr)
    367367{
    368         log_msg(LVL_DEBUG, "ethip_nic_addr_find()");
     368        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_find()");
    369369
    370370        list_foreach(nic->addr_list, link) {
  • uspace/srv/net/ethip/pdu.c

    r920d0fc ra1a101d  
    6969            frame->size);
    7070
    71         log_msg(LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x",
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x",
    7272            frame->src, frame->dest, frame->etype_len);
    73         log_msg(LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
     73        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
    7474
    7575        *rdata = data;
     
    8383        eth_header_t *hdr;
    8484
    85         log_msg(LVL_DEBUG, "eth_pdu_decode()");
     85        log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()");
    8686
    8787        if (size < sizeof(eth_header_t)) {
    88                 log_msg(LVL_DEBUG, "PDU too short (%zu)", size);
     88                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
    8989                return EINVAL;
    9090        }
     
    104104            frame->size);
    105105
    106         log_msg(LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x",
     106        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x",
    107107            frame->src, frame->dest, frame->etype_len);
    108         log_msg(LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
     108        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
    109109
    110110        return EOK;
     
    143143        uint16_t fopcode;
    144144
    145         log_msg(LVL_DEBUG, "arp_pdu_encode()");
     145        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()");
    146146
    147147        size = sizeof(arp_eth_packet_fmt_t);
     
    183183        arp_eth_packet_fmt_t *pfmt;
    184184
    185         log_msg(LVL_DEBUG, "arp_pdu_decode()");
     185        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()");
    186186
    187187        if (size < sizeof(arp_eth_packet_fmt_t)) {
    188                 log_msg(LVL_DEBUG, "ARP PDU too short (%zu)", size);
     188                log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size);
    189189                return EINVAL;
    190190        }
     
    193193
    194194        if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) {
    195                 log_msg(LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
     195                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
    196196                    AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space));
    197197                return EINVAL;
     
    199199
    200200        if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) {
    201                 log_msg(LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
     201                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
    202202                    ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space));
    203203                return EINVAL;
     
    205205
    206206        if (pfmt->hw_addr_size != ETH_ADDR_SIZE) {
    207                 log_msg(LVL_DEBUG, "HW address size != %zu (%zu)",
     207                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)",
    208208                    (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size);
    209209                return EINVAL;
     
    211211
    212212        if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) {
    213                 log_msg(LVL_DEBUG, "Proto address size != %zu (%zu)",
     213                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)",
    214214                    (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size);
    215215                return EINVAL;
     
    220220        case AOP_REPLY: packet->opcode = aop_reply; break;
    221221        default:
    222                 log_msg(LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
     222                log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
    223223                    uint16_t_be2host(pfmt->opcode));
    224224                return EINVAL;
     
    231231        packet->target_proto_addr.ipv4 =
    232232            uint32_t_be2host(pfmt->target_proto_addr);
    233         log_msg(LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
     233        log_msg(LOG_DEFAULT, LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
    234234
    235235        return EOK;
  • uspace/srv/net/inetsrv/addrobj.c

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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;
  • uspace/srv/net/inetsrv/pdu.c

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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

    r920d0fc ra1a101d  
    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);
  • uspace/srv/net/loopip/loopip.c

    r920d0fc ra1a101d  
    7575{
    7676        while (true) {
    77                 log_msg(LVL_DEBUG, "loopip_recv_fibril(): Wait for one item");
     77                log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_recv_fibril(): Wait for one item");
    7878                link_t *link = prodcons_consume(&loopip_rcv_queue);
    7979                rqueue_entry_t *rqe = list_get_instance(link, rqueue_entry_t, link);
     
    9696        rc = loc_server_register(NAME);
    9797        if (rc != EOK) {
    98                 log_msg(LVL_ERROR, "Failed registering server.");
     98                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server.");
    9999                return rc;
    100100        }
     
    108108        rc = loc_service_register(svc_name, &sid);
    109109        if (rc != EOK) {
    110                 log_msg(LVL_ERROR, "Failed registering service %s.", svc_name);
     110                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service %s.", svc_name);
    111111                return rc;
    112112        }
     
    114114        rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
    115115        if (rc != EOK) {
    116                 log_msg(LVL_ERROR, "Failed resolving category 'iplink'.");
     116                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
    117117                return rc;
    118118        }
     
    120120        rc = loc_service_add_to_cat(sid, iplink_cat);
    121121        if (rc != EOK) {
    122                 log_msg(LVL_ERROR, "Failed adding %s to category.", svc_name);
     122                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed adding %s to category.", svc_name);
    123123                return rc;
    124124        }
     
    135135static void loopip_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    136136{
    137         log_msg(LVL_DEBUG, "loopip_client_conn()");
     137        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_client_conn()");
    138138        iplink_conn(iid, icall, &loopip_iplink);
    139139}
     
    141141static int loopip_open(iplink_srv_t *srv)
    142142{
    143         log_msg(LVL_DEBUG, "loopip_open()");
     143        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_open()");
    144144        return EOK;
    145145}
     
    147147static int loopip_close(iplink_srv_t *srv)
    148148{
    149         log_msg(LVL_DEBUG, "loopip_close()");
     149        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_close()");
    150150        return EOK;
    151151}
     
    155155        rqueue_entry_t *rqe;
    156156
    157         log_msg(LVL_DEBUG, "loopip_send()");
     157        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_send()");
    158158
    159159        rqe = calloc(1, sizeof(rqueue_entry_t));
     
    184184static int loopip_get_mtu(iplink_srv_t *srv, size_t *mtu)
    185185{
    186         log_msg(LVL_DEBUG, "loopip_get_mtu()");
     186        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_get_mtu()");
    187187        *mtu = 1500;
    188188        return EOK;
     
    191191static int loopip_addr_add(iplink_srv_t *srv, iplink_srv_addr_t *addr)
    192192{
    193         log_msg(LVL_DEBUG, "loopip_addr_add(0x%" PRIx32 ")", addr->ipv4);
     193        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_addr_add(0x%" PRIx32 ")", addr->ipv4);
    194194        return EOK;
    195195}
     
    197197static int loopip_addr_remove(iplink_srv_t *srv, iplink_srv_addr_t *addr)
    198198{
    199         log_msg(LVL_DEBUG, "loopip_addr_remove(0x%" PRIx32 ")", addr->ipv4);
     199        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_addr_remove(0x%" PRIx32 ")", addr->ipv4);
    200200        return EOK;
    201201}
  • uspace/srv/net/tcp/conn.c

    r920d0fc ra1a101d  
    164164static void tcp_conn_free(tcp_conn_t *conn)
    165165{
    166         log_msg(LVL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn);
     166        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn);
    167167        tcp_tqueue_fini(&conn->retransmit);
    168168
     
    184184void tcp_conn_addref(tcp_conn_t *conn)
    185185{
    186         log_msg(LVL_DEBUG2, "%s: tcp_conn_addref(%p)", conn->name, conn);
     186        log_msg(LOG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_addref(%p)", conn->name, conn);
    187187        atomic_inc(&conn->refcnt);
    188188}
     
    196196void tcp_conn_delref(tcp_conn_t *conn)
    197197{
    198         log_msg(LVL_DEBUG2, "%s: tcp_conn_delref(%p)", conn->name, conn);
     198        log_msg(LOG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_delref(%p)", conn->name, conn);
    199199
    200200        if (atomic_predec(&conn->refcnt) == 0)
     
    211211void tcp_conn_delete(tcp_conn_t *conn)
    212212{
    213         log_msg(LVL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn);
     213        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn);
    214214
    215215        assert(conn->deleted == false);
     
    245245        tcp_cstate_t old_state;
    246246
    247         log_msg(LVL_DEBUG, "tcp_conn_state_set(%p)", conn);
     247        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set(%p)", conn);
    248248
    249249        old_state = conn->cstate;
     
    253253        /* Run user callback function */
    254254        if (conn->cstate_cb != NULL) {
    255                 log_msg(LVL_DEBUG, "tcp_conn_state_set() - run user CB");
     255                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - run user CB");
    256256                conn->cstate_cb(conn, conn->cstate_cb_arg);
    257257        } else {
    258                 log_msg(LVL_DEBUG, "tcp_conn_state_set() - no user CB");
     258                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - no user CB");
    259259        }
    260260
     
    293293        case st_syn_received:
    294294        case st_established:
    295                 log_msg(LVL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name);
     295                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name);
    296296                tcp_conn_state_set(conn, st_fin_wait_1);
    297297                break;
    298298        case st_close_wait:
    299                 log_msg(LVL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name);
     299                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name);
    300300                tcp_conn_state_set(conn, st_last_ack);
    301301                break;
    302302        default:
    303                 log_msg(LVL_ERROR, "%s: Connection state %d", conn->name,
     303                log_msg(LOG_DEFAULT, LVL_ERROR, "%s: Connection state %d", conn->name,
    304304                    conn->cstate);
    305305                assert(false);
     
    312312static bool tcp_socket_match(tcp_sock_t *sock, tcp_sock_t *patt)
    313313{
    314         log_msg(LVL_DEBUG2, "tcp_socket_match(sock=(%x,%u), pat=(%x,%u))",
     314        log_msg(LOG_DEFAULT, LVL_DEBUG2, "tcp_socket_match(sock=(%x,%u), pat=(%x,%u))",
    315315            sock->addr.ipv4, sock->port, patt->addr.ipv4, patt->port);
    316316
     
    323323                return false;
    324324
    325         log_msg(LVL_DEBUG2, " -> match");
     325        log_msg(LOG_DEFAULT, LVL_DEBUG2, " -> match");
    326326
    327327        return true;
     
    331331static bool tcp_sockpair_match(tcp_sockpair_t *sp, tcp_sockpair_t *pattern)
    332332{
    333         log_msg(LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern);
     333        log_msg(LOG_DEFAULT, LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern);
    334334
    335335        if (!tcp_socket_match(&sp->local, &pattern->local))
     
    353353tcp_conn_t *tcp_conn_find_ref(tcp_sockpair_t *sp)
    354354{
    355         log_msg(LVL_DEBUG, "tcp_conn_find_ref(%p)", sp);
     355        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_find_ref(%p)", sp);
    356356
    357357        fibril_mutex_lock(&conn_list_lock);
     
    360360                tcp_conn_t *conn = list_get_instance(link, tcp_conn_t, link);
    361361                tcp_sockpair_t *csp = &conn->ident;
    362                 log_msg(LVL_DEBUG2, "compare with conn (f:(%x,%u), l:(%x,%u))",
     362                log_msg(LOG_DEFAULT, LVL_DEBUG2, "compare with conn (f:(%x,%u), l:(%x,%u))",
    363363                    csp->foreign.addr.ipv4, csp->foreign.port,
    364364                    csp->local.addr.ipv4, csp->local.port);
     
    380380static void tcp_conn_reset(tcp_conn_t *conn)
    381381{
    382         log_msg(LVL_DEBUG, "%s: tcp_conn_reset()", conn->name);
     382        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_reset()", conn->name);
    383383        tcp_conn_state_set(conn, st_closed);
    384384        conn->reset = true;
     
    398398{
    399399        /* TODO */
    400         log_msg(LVL_DEBUG, "%s: tcp_reset_signal()", conn->name);
     400        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_reset_signal()", conn->name);
    401401}
    402402
     
    422422                return true;
    423423        case st_closed:
    424                 log_msg(LVL_WARN, "state=%d", (int) conn->cstate);
     424                log_msg(LOG_DEFAULT, LVL_WARN, "state=%d", (int) conn->cstate);
    425425                assert(false);
    426426        }
     
    436436static void tcp_conn_sa_listen(tcp_conn_t *conn, tcp_segment_t *seg)
    437437{
    438         log_msg(LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg);
     438        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg);
    439439
    440440        if ((seg->ctrl & CTL_RST) != 0) {
    441                 log_msg(LVL_DEBUG, "Ignoring incoming RST.");
     441                log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring incoming RST.");
    442442                return;
    443443        }
    444444
    445445        if ((seg->ctrl & CTL_ACK) != 0) {
    446                 log_msg(LVL_DEBUG, "Incoming ACK, send acceptable RST.");
     446                log_msg(LOG_DEFAULT, LVL_DEBUG, "Incoming ACK, send acceptable RST.");
    447447                tcp_reply_rst(&conn->ident, seg);
    448448                return;
     
    450450
    451451        if ((seg->ctrl & CTL_SYN) == 0) {
    452                 log_msg(LVL_DEBUG, "SYN not present. Ignoring segment.");
    453                 return;
    454         }
    455 
    456         log_msg(LVL_DEBUG, "Got SYN, sending SYN, ACK.");
     452                log_msg(LOG_DEFAULT, LVL_DEBUG, "SYN not present. Ignoring segment.");
     453                return;
     454        }
     455
     456        log_msg(LOG_DEFAULT, LVL_DEBUG, "Got SYN, sending SYN, ACK.");
    457457
    458458        conn->rcv_nxt = seg->seq + 1;
     
    460460
    461461
    462         log_msg(LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt);
     462        log_msg(LOG_DEFAULT, LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt);
    463463
    464464        if (seg->len > 1)
    465                 log_msg(LVL_WARN, "SYN combined with data, ignoring data.");
     465                log_msg(LOG_DEFAULT, LVL_WARN, "SYN combined with data, ignoring data.");
    466466
    467467        /* XXX select ISS */
     
    493493static void tcp_conn_sa_syn_sent(tcp_conn_t *conn, tcp_segment_t *seg)
    494494{
    495         log_msg(LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg);
     495        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg);
    496496
    497497        if ((seg->ctrl & CTL_ACK) != 0) {
    498                 log_msg(LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u",
     498                log_msg(LOG_DEFAULT, LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u",
    499499                    conn->snd_una, seg->ack, conn->snd_nxt);
    500500                if (!seq_no_ack_acceptable(conn, seg->ack)) {
    501501                        if ((seg->ctrl & CTL_RST) == 0) {
    502                                 log_msg(LVL_WARN, "ACK not acceptable, send RST");
     502                                log_msg(LOG_DEFAULT, LVL_WARN, "ACK not acceptable, send RST");
    503503                                tcp_reply_rst(&conn->ident, seg);
    504504                        } else {
    505                                 log_msg(LVL_WARN, "RST,ACK not acceptable, drop");
     505                                log_msg(LOG_DEFAULT, LVL_WARN, "RST,ACK not acceptable, drop");
    506506                        }
    507507                        return;
     
    512512                /* If we get here, we have either an acceptable ACK or no ACK */
    513513                if ((seg->ctrl & CTL_ACK) != 0) {
    514                         log_msg(LVL_DEBUG, "%s: Connection reset. -> Closed",
     514                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Connection reset. -> Closed",
    515515                            conn->name);
    516516                        /* Reset connection */
     
    518518                        return;
    519519                } else {
    520                         log_msg(LVL_DEBUG, "%s: RST without ACK, drop",
     520                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: RST without ACK, drop",
    521521                            conn->name);
    522522                        return;
     
    527527
    528528        if ((seg->ctrl & CTL_SYN) == 0) {
    529                 log_msg(LVL_DEBUG, "No SYN bit, ignoring segment.");
     529                log_msg(LOG_DEFAULT, LVL_DEBUG, "No SYN bit, ignoring segment.");
    530530                return;
    531531        }
     
    544544        }
    545545
    546         log_msg(LVL_DEBUG, "Sent SYN, got SYN.");
     546        log_msg(LOG_DEFAULT, LVL_DEBUG, "Sent SYN, got SYN.");
    547547
    548548        /*
     
    551551         * will always be accepted as new window setting.
    552552         */
    553         log_msg(LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", "
     553        log_msg(LOG_DEFAULT, LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", "
    554554            "SND.WL2 = %" PRIu32, seg->wnd, seg->seq, seg->seq);
    555555        conn->snd_wnd = seg->wnd;
     
    558558
    559559        if (seq_no_syn_acked(conn)) {
    560                 log_msg(LVL_DEBUG, "%s: syn acked -> Established", conn->name);
     560                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn acked -> Established", conn->name);
    561561                tcp_conn_state_set(conn, st_established);
    562562                tcp_tqueue_ctrl_seg(conn, CTL_ACK /* XXX */);
    563563        } else {
    564                 log_msg(LVL_DEBUG, "%s: syn not acked -> Syn-Received",
     564                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn not acked -> Syn-Received",
    565565                    conn->name);
    566566                tcp_conn_state_set(conn, st_syn_received);
     
    582582        tcp_segment_t *pseg;
    583583
    584         log_msg(LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg);
     584        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg);
    585585
    586586        /* Discard unacceptable segments ("old duplicates") */
    587587        if (!seq_no_segment_acceptable(conn, seg)) {
    588                 log_msg(LVL_DEBUG, "Replying ACK to unacceptable segment.");
     588                log_msg(LOG_DEFAULT, LVL_DEBUG, "Replying ACK to unacceptable segment.");
    589589                tcp_tqueue_ctrl_seg(conn, CTL_ACK);
    590590                tcp_segment_delete(seg);
     
    682682        assert(seq_no_in_rcv_wnd(conn, seg->seq));
    683683
    684         log_msg(LVL_WARN, "SYN is in receive window, should send reset. XXX");
     684        log_msg(LOG_DEFAULT, LVL_WARN, "SYN is in receive window, should send reset. XXX");
    685685
    686686        /*
     
    705705        if (!seq_no_ack_acceptable(conn, seg->ack)) {
    706706                /* ACK is not acceptable, send RST. */
    707                 log_msg(LVL_WARN, "Segment ACK not acceptable, sending RST.");
     707                log_msg(LOG_DEFAULT, LVL_WARN, "Segment ACK not acceptable, sending RST.");
    708708                tcp_reply_rst(&conn->ident, seg);
    709709                tcp_segment_delete(seg);
     
    711711        }
    712712
    713         log_msg(LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name);
     713        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name);
    714714
    715715        tcp_conn_state_set(conn, st_established);
     
    730730static cproc_t tcp_conn_seg_proc_ack_est(tcp_conn_t *conn, tcp_segment_t *seg)
    731731{
    732         log_msg(LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg);
    733 
    734         log_msg(LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u",
     732        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg);
     733
     734        log_msg(LOG_DEFAULT, LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u",
    735735            (unsigned)seg->ack, (unsigned)conn->snd_una,
    736736            (unsigned)conn->snd_nxt);
    737737
    738738        if (!seq_no_ack_acceptable(conn, seg->ack)) {
    739                 log_msg(LVL_DEBUG, "ACK not acceptable.");
     739                log_msg(LOG_DEFAULT, LVL_DEBUG, "ACK not acceptable.");
    740740                if (!seq_no_ack_duplicate(conn, seg->ack)) {
    741                         log_msg(LVL_WARN, "Not acceptable, not duplicate. "
     741                        log_msg(LOG_DEFAULT, LVL_WARN, "Not acceptable, not duplicate. "
    742742                            "Send ACK and drop.");
    743743                        /* Not acceptable, not duplicate. Send ACK and drop. */
     
    746746                        return cp_done;
    747747                } else {
    748                         log_msg(LVL_DEBUG, "Ignoring duplicate ACK.");
     748                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring duplicate ACK.");
    749749                }
    750750        } else {
     
    758758                conn->snd_wl2 = seg->ack;
    759759
    760                 log_msg(LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32
     760                log_msg(LOG_DEFAULT, LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32
    761761                    ", SND.WL1=%" PRIu32 ", SND.WL2=%" PRIu32,
    762762                    conn->snd_wnd, conn->snd_wl1, conn->snd_wl2);
     
    785785
    786786        if (conn->fin_is_acked) {
    787                 log_msg(LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name);
     787                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name);
    788788                tcp_conn_state_set(conn, st_fin_wait_2);
    789789        }
     
    850850
    851851        if (conn->fin_is_acked) {
    852                 log_msg(LVL_DEBUG, "%s: FIN acked -> Closed", conn->name);
     852                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Closed", conn->name);
    853853                tcp_conn_remove(conn);
    854854                tcp_conn_state_set(conn, st_closed);
     
    881881static cproc_t tcp_conn_seg_proc_ack(tcp_conn_t *conn, tcp_segment_t *seg)
    882882{
    883         log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",
     883        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",
    884884            conn->name, conn, seg);
    885885
    886886        if ((seg->ctrl & CTL_ACK) == 0) {
    887                 log_msg(LVL_WARN, "Segment has no ACK. Dropping.");
     887                log_msg(LOG_DEFAULT, LVL_WARN, "Segment has no ACK. Dropping.");
    888888                tcp_segment_delete(seg);
    889889                return cp_done;
     
    940940        size_t xfer_size;
    941941
    942         log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",
     942        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",
    943943            conn->name, conn, seg);
    944944
     
    982982        fibril_condvar_broadcast(&conn->rcv_buf_cv);
    983983
    984         log_msg(LVL_DEBUG, "Received %zu bytes of data.", xfer_size);
     984        log_msg(LOG_DEFAULT, LVL_DEBUG, "Received %zu bytes of data.", xfer_size);
    985985
    986986        /* Advance RCV.NXT */
     
    998998                tcp_conn_trim_seg_to_wnd(conn, seg);
    999999        } else {
    1000                 log_msg(LVL_DEBUG, "%s: Nothing left in segment, dropping "
     1000                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Nothing left in segment, dropping "
    10011001                    "(xfer_size=%zu, SEG.LEN=%zu, seg->ctrl=%u)",
    10021002                    conn->name, xfer_size, seg->len, (unsigned)seg->ctrl);
     
    10181018static cproc_t tcp_conn_seg_proc_fin(tcp_conn_t *conn, tcp_segment_t *seg)
    10191019{
    1020         log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",
     1020        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",
    10211021            conn->name, conn, seg);
    1022         log_msg(LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,
     1022        log_msg(LOG_DEFAULT, LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,
    10231023            (unsigned) seg->ctrl);
    10241024
    10251025        /* Only process FIN if no text is left in segment. */
    10261026        if (tcp_segment_text_size(seg) == 0 && (seg->ctrl & CTL_FIN) != 0) {
    1027                 log_msg(LVL_DEBUG, " - FIN found in segment.");
     1027                log_msg(LOG_DEFAULT, LVL_DEBUG, " - FIN found in segment.");
    10281028
    10291029                /* Send ACK */
     
    10421042                case st_syn_received:
    10431043                case st_established:
    1044                         log_msg(LVL_DEBUG, "%s: FIN received -> Close-Wait",
     1044                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Close-Wait",
    10451045                            conn->name);
    10461046                        tcp_conn_state_set(conn, st_close_wait);
    10471047                        break;
    10481048                case st_fin_wait_1:
    1049                         log_msg(LVL_DEBUG, "%s: FIN received -> Closing",
     1049                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Closing",
    10501050                            conn->name);
    10511051                        tcp_conn_state_set(conn, st_closing);
    10521052                        break;
    10531053                case st_fin_wait_2:
    1054                         log_msg(LVL_DEBUG, "%s: FIN received -> Time-Wait",
     1054                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Time-Wait",
    10551055                            conn->name);
    10561056                        tcp_conn_state_set(conn, st_time_wait);
     
    10911091static void tcp_conn_seg_process(tcp_conn_t *conn, tcp_segment_t *seg)
    10921092{
    1093         log_msg(LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg);
     1093        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg);
    10941094        tcp_segment_dump(seg);
    10951095
     
    10971097        /* XXX Permit valid ACKs, URGs and RSTs */
    10981098/*      if (!seq_no_segment_acceptable(conn, seg)) {
    1099                 log_msg(LVL_WARN, "Segment not acceptable, dropping.");
     1099                log_msg(LOG_DEFAULT, LVL_WARN, "Segment not acceptable, dropping.");
    11001100                if ((seg->ctrl & CTL_RST) == 0) {
    11011101                        tcp_tqueue_ctrl_seg(conn, CTL_ACK);
     
    11311131         */
    11321132        if (seg->len > 0) {
    1133                 log_msg(LVL_DEBUG, "Re-insert segment %p. seg->len=%zu",
     1133                log_msg(LOG_DEFAULT, LVL_DEBUG, "Re-insert segment %p. seg->len=%zu",
    11341134                    seg, (size_t) seg->len);
    11351135                tcp_iqueue_insert_seg(&conn->incoming, seg);
     
    11461146void tcp_conn_segment_arrived(tcp_conn_t *conn, tcp_segment_t *seg)
    11471147{
    1148         log_msg(LVL_DEBUG, "%c: tcp_conn_segment_arrived(%p)",
     1148        log_msg(LOG_DEFAULT, LVL_DEBUG, "%c: tcp_conn_segment_arrived(%p)",
    11491149            conn->name, seg);
    11501150
     
    11651165                tcp_conn_sa_queue(conn, seg); break;
    11661166        case st_closed:
    1167                 log_msg(LVL_DEBUG, "state=%d", (int) conn->cstate);
     1167                log_msg(LOG_DEFAULT, LVL_DEBUG, "state=%d", (int) conn->cstate);
    11681168                assert(false);
    11691169        }
     
    11781178        tcp_conn_t *conn = (tcp_conn_t *) arg;
    11791179
    1180         log_msg(LVL_DEBUG, "tw_timeout_func(%p)", conn);
     1180        log_msg(LOG_DEFAULT, LVL_DEBUG, "tw_timeout_func(%p)", conn);
    11811181
    11821182        fibril_mutex_lock(&conn->lock);
    11831183
    11841184        if (conn->cstate == st_closed) {
    1185                 log_msg(LVL_DEBUG, "Connection already closed.");
     1185                log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed.");
    11861186                fibril_mutex_unlock(&conn->lock);
    11871187                tcp_conn_delref(conn);
     
    11891189        }
    11901190
    1191         log_msg(LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name);
     1191        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name);
    11921192        tcp_conn_remove(conn);
    11931193        tcp_conn_state_set(conn, st_closed);
     
    12401240void tcp_unexpected_segment(tcp_sockpair_t *sp, tcp_segment_t *seg)
    12411241{
    1242         log_msg(LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg);
     1242        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg);
    12431243
    12441244        if ((seg->ctrl & CTL_RST) == 0)
     
    12681268        tcp_segment_t *rseg;
    12691269
    1270         log_msg(LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg);
     1270        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg);
    12711271
    12721272        rseg = tcp_segment_make_rst(seg);
  • uspace/srv/net/tcp/iqueue.c

    r920d0fc ra1a101d  
    6767        tcp_iqueue_entry_t *qe;
    6868        link_t *link;
    69         log_msg(LVL_DEBUG, "tcp_iqueue_insert_seg()");
     69        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_iqueue_insert_seg()");
    7070
    7171        iqe = calloc(1, sizeof(tcp_iqueue_entry_t));
    7272        if (iqe == NULL) {
    73                 log_msg(LVL_ERROR, "Failed allocating IQE.");
     73                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating IQE.");
    7474                return;
    7575        }
     
    108108        link_t *link;
    109109
    110         log_msg(LVL_DEBUG, "tcp_get_ready_seg()");
     110        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_get_ready_seg()");
    111111
    112112        link = list_first(&iqueue->list);
    113113        if (link == NULL) {
    114                 log_msg(LVL_DEBUG, "iqueue is empty");
     114                log_msg(LOG_DEFAULT, LVL_DEBUG, "iqueue is empty");
    115115                return ENOENT;
    116116        }
     
    119119
    120120        while (!seq_no_segment_acceptable(iqueue->conn, iqe->seg)) {
    121                 log_msg(LVL_DEBUG, "Skipping unacceptable segment (RCV.NXT=%"
     121                log_msg(LOG_DEFAULT, LVL_DEBUG, "Skipping unacceptable segment (RCV.NXT=%"
    122122                    PRIu32 ", RCV.NXT+RCV.WND=%" PRIu32 ", SEG.SEQ=%" PRIu32
    123123                    ", SEG.LEN=%" PRIu32 ")", iqueue->conn->rcv_nxt,
     
    130130                link = list_first(&iqueue->list);
    131131                if (link == NULL) {
    132                         log_msg(LVL_DEBUG, "iqueue is empty");
     132                        log_msg(LOG_DEFAULT, LVL_DEBUG, "iqueue is empty");
    133133                        return ENOENT;
    134134                }
     
    139139        /* Do not return segments that are not ready for processing */
    140140        if (!seq_no_segment_ready(iqueue->conn, iqe->seg)) {
    141                 log_msg(LVL_DEBUG, "Next segment not ready: SEG.SEQ=%u, "
     141                log_msg(LOG_DEFAULT, LVL_DEBUG, "Next segment not ready: SEG.SEQ=%u, "
    142142                    "RCV.NXT=%u, SEG.LEN=%u", iqe->seg->seq,
    143143                    iqueue->conn->rcv_nxt, iqe->seg->len);
     
    145145        }
    146146
    147         log_msg(LVL_DEBUG, "Returning ready segment %p", iqe->seg);
     147        log_msg(LOG_DEFAULT, LVL_DEBUG, "Returning ready segment %p", iqe->seg);
    148148        list_remove(&iqe->link);
    149149        *seg = iqe->seg;
  • uspace/srv/net/tcp/ncsim.c

    r920d0fc ra1a101d  
    7474        link_t *link;
    7575
    76         log_msg(LVL_DEBUG, "tcp_ncsim_bounce_seg()");
     76        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_ncsim_bounce_seg()");
    7777        tcp_rqueue_bounce_seg(sp, seg);
    7878        return;
     
    8080        if (0 /*random() % 4 == 3*/) {
    8181                /* Drop segment */
    82                 log_msg(LVL_ERROR, "NCSim dropping segment");
     82                log_msg(LOG_DEFAULT, LVL_ERROR, "NCSim dropping segment");
    8383                tcp_segment_delete(seg);
    8484                return;
     
    8787        sqe = calloc(1, sizeof(tcp_squeue_entry_t));
    8888        if (sqe == NULL) {
    89                 log_msg(LVL_ERROR, "Failed allocating SQE.");
     89                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating SQE.");
    9090                return;
    9191        }
     
    126126        int rc;
    127127
    128         log_msg(LVL_DEBUG, "tcp_ncsim_fibril()");
     128        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_ncsim_fibril()");
    129129
    130130
     
    139139                        sqe = list_get_instance(link, tcp_squeue_entry_t, link);
    140140
    141                         log_msg(LVL_DEBUG, "NCSim - Sleep");
     141                        log_msg(LOG_DEFAULT, LVL_DEBUG, "NCSim - Sleep");
    142142                        rc = fibril_condvar_wait_timeout(&sim_queue_cv,
    143143                            &sim_queue_lock, sqe->delay);
     
    147147                fibril_mutex_unlock(&sim_queue_lock);
    148148
    149                 log_msg(LVL_DEBUG, "NCSim - End Sleep");
     149                log_msg(LOG_DEFAULT, LVL_DEBUG, "NCSim - End Sleep");
    150150                tcp_rqueue_bounce_seg(&sqe->sp, sqe->seg);
    151151                free(sqe);
     
    161161        fid_t fid;
    162162
    163         log_msg(LVL_DEBUG, "tcp_ncsim_fibril_start()");
     163        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_ncsim_fibril_start()");
    164164
    165165        fid = fibril_create(tcp_ncsim_fibril, NULL);
    166166        if (fid == 0) {
    167                 log_msg(LVL_ERROR, "Failed creating ncsim fibril.");
     167                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed creating ncsim fibril.");
    168168                return;
    169169        }
  • uspace/srv/net/tcp/rqueue.c

    r920d0fc ra1a101d  
    7474        tcp_sockpair_t rident;
    7575
    76         log_msg(LVL_DEBUG, "tcp_rqueue_bounce_seg()");
     76        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_rqueue_bounce_seg()");
    7777
    7878#ifdef BOUNCE_TRANSCODE
     
    8181
    8282        if (tcp_pdu_encode(sp, seg, &pdu) != EOK) {
    83                 log_msg(LVL_WARN, "Not enough memory. Segment dropped.");
     83                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. Segment dropped.");
    8484                return;
    8585        }
    8686
    8787        if (tcp_pdu_decode(pdu, &rident, &dseg) != EOK) {
    88                 log_msg(LVL_WARN, "Not enough memory. Segment dropped.");
     88                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. Segment dropped.");
    8989                return;
    9090        }
     
    112112{
    113113        tcp_rqueue_entry_t *rqe;
    114         log_msg(LVL_DEBUG, "tcp_rqueue_insert_seg()");
     114        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_rqueue_insert_seg()");
    115115
    116116        tcp_segment_dump(seg);
     
    118118        rqe = calloc(1, sizeof(tcp_rqueue_entry_t));
    119119        if (rqe == NULL) {
    120                 log_msg(LVL_ERROR, "Failed allocating RQE.");
     120                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating RQE.");
    121121                return;
    122122        }
     
    134134        tcp_rqueue_entry_t *rqe;
    135135
    136         log_msg(LVL_DEBUG, "tcp_rqueue_fibril()");
     136        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_rqueue_fibril()");
    137137
    138138        while (true) {
     
    152152        fid_t fid;
    153153
    154         log_msg(LVL_DEBUG, "tcp_rqueue_fibril_start()");
     154        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_rqueue_fibril_start()");
    155155
    156156        fid = fibril_create(tcp_rqueue_fibril, NULL);
    157157        if (fid == 0) {
    158                 log_msg(LVL_ERROR, "Failed creating rqueue fibril.");
     158                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed creating rqueue fibril.");
    159159                return;
    160160        }
  • uspace/srv/net/tcp/segment.c

    r920d0fc ra1a101d  
    248248void tcp_segment_dump(tcp_segment_t *seg)
    249249{
    250         log_msg(LVL_DEBUG2, "Segment dump:");
    251         log_msg(LVL_DEBUG2, " - ctrl = %u", (unsigned)seg->ctrl);
    252         log_msg(LVL_DEBUG2, " - seq = % " PRIu32, seg->seq);
    253         log_msg(LVL_DEBUG2, " - ack = % " PRIu32, seg->ack);
    254         log_msg(LVL_DEBUG2, " - len = % " PRIu32, seg->len);
    255         log_msg(LVL_DEBUG2, " - wnd = % " PRIu32, seg->wnd);
    256         log_msg(LVL_DEBUG2, " - up = % " PRIu32, seg->up);
     250        log_msg(LOG_DEFAULT, LVL_DEBUG2, "Segment dump:");
     251        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - ctrl = %u", (unsigned)seg->ctrl);
     252        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - seq = % " PRIu32, seg->seq);
     253        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - ack = % " PRIu32, seg->ack);
     254        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - len = % " PRIu32, seg->len);
     255        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - wnd = % " PRIu32, seg->wnd);
     256        log_msg(LOG_DEFAULT, LVL_DEBUG2, " - up = % " PRIu32, seg->up);
    257257}
    258258
  • uspace/srv/net/tcp/sock.c

    r920d0fc ra1a101d  
    9191static void tcp_sock_notify_data(socket_core_t *sock_core)
    9292{
    93         log_msg(LVL_DEBUG, "tcp_sock_notify_data(%d)", sock_core->socket_id);
     93        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_notify_data(%d)", sock_core->socket_id);
    9494        async_exch_t *exch = async_exchange_begin(sock_core->sess);
    9595        async_msg_5(exch, NET_SOCKET_RECEIVED, (sysarg_t)sock_core->socket_id,
     
    100100static void tcp_sock_notify_aconn(socket_core_t *lsock_core)
    101101{
    102         log_msg(LVL_DEBUG, "tcp_sock_notify_aconn(%d)", lsock_core->socket_id);
     102        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_notify_aconn(%d)", lsock_core->socket_id);
    103103        async_exch_t *exch = async_exchange_begin(lsock_core->sess);
    104104        async_msg_5(exch, NET_SOCKET_ACCEPTED, (sysarg_t)lsock_core->socket_id,
     
    111111        tcp_sockdata_t *sock;
    112112
    113         log_msg(LVL_DEBUG, "tcp_sock_create()");
     113        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_create()");
    114114        *rsock = NULL;
    115115
     
    133133static void tcp_sock_uncreate(tcp_sockdata_t *sock)
    134134{
    135         log_msg(LVL_DEBUG, "tcp_sock_uncreate()");
     135        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_uncreate()");
    136136        free(sock);
    137137}
     
    142142        int rc;
    143143
    144         log_msg(LVL_DEBUG, "tcp_sock_finish_setup()");
     144        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_finish_setup()");
    145145
    146146        sock->recv_fibril = fibril_create(tcp_sock_recv_fibril, sock);
     
    171171        ipc_call_t answer;
    172172
    173         log_msg(LVL_DEBUG, "tcp_sock_socket()");
     173        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_socket()");
    174174
    175175        rc = tcp_sock_create(client, &sock);
     
    208208        tcp_sockdata_t *socket;
    209209
    210         log_msg(LVL_DEBUG, "tcp_sock_bind()");
    211         log_msg(LVL_DEBUG, " - async_data_write_accept");
     210        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_bind()");
     211        log_msg(LOG_DEFAULT, LVL_DEBUG, " - async_data_write_accept");
    212212        rc = async_data_write_accept((void **) &addr, false, 0, 0, 0, &addr_len);
    213213        if (rc != EOK) {
     
    216216        }
    217217
    218         log_msg(LVL_DEBUG, " - call socket_bind");
     218        log_msg(LOG_DEFAULT, LVL_DEBUG, " - call socket_bind");
    219219        rc = socket_bind(&client->sockets, &gsock, SOCKET_GET_SOCKET_ID(call),
    220220            addr, addr_len, TCP_FREE_PORTS_START, TCP_FREE_PORTS_END,
     
    225225        }
    226226
    227         log_msg(LVL_DEBUG, " - call socket_cores_find");
     227        log_msg(LOG_DEFAULT, LVL_DEBUG, " - call socket_cores_find");
    228228        sock_core = socket_cores_find(&client->sockets, SOCKET_GET_SOCKET_ID(call));
    229229        if (sock_core != NULL) {
     
    233233        }
    234234
    235         log_msg(LVL_DEBUG, " - success");
     235        log_msg(LOG_DEFAULT, LVL_DEBUG, " - success");
    236236        async_answer_0(callid, EOK);
    237237}
     
    250250        int i;
    251251
    252         log_msg(LVL_DEBUG, "tcp_sock_listen()");
     252        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_listen()");
    253253
    254254        socket_id = SOCKET_GET_SOCKET_ID(call);
     
    284284        }
    285285
    286         log_msg(LVL_DEBUG, " - open connections");
     286        log_msg(LOG_DEFAULT, LVL_DEBUG, " - open connections");
    287287
    288288        lsocket.addr.ipv4 = TCP_IPV4_ANY;
     
    337337        tcp_sock_t fsocket;
    338338
    339         log_msg(LVL_DEBUG, "tcp_sock_connect()");
     339        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_connect()");
    340340
    341341        rc = async_data_write_accept((void **) &addr, false, 0, 0, 0, &addr_len);
     
    377377                        fibril_mutex_unlock(&socket->lock);
    378378                        async_answer_0(callid, rc);
    379                         log_msg(LVL_DEBUG, "tcp_sock_connect: Failed to "
     379                        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_connect: Failed to "
    380380                            "determine local address.");
    381381                        return;
     
    383383
    384384                socket->laddr.ipv4 = loc_addr.ipv4;
    385                 log_msg(LVL_DEBUG, "Local IP address is %x", socket->laddr.ipv4);
     385                log_msg(LOG_DEFAULT, LVL_DEBUG, "Local IP address is %x", socket->laddr.ipv4);
    386386        }
    387387
     
    431431        int rc;
    432432
    433         log_msg(LVL_DEBUG, "tcp_sock_accept()");
     433        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_accept()");
    434434
    435435        socket_id = SOCKET_GET_SOCKET_ID(call);
     
    445445        fibril_mutex_lock(&socket->lock);
    446446
    447         log_msg(LVL_DEBUG, " - verify socket->conn");
     447        log_msg(LOG_DEFAULT, LVL_DEBUG, " - verify socket->conn");
    448448        if (socket->conn != NULL) {
    449449                fibril_mutex_unlock(&socket->lock);
     
    498498
    499499        asocket->conn = conn;
    500         log_msg(LVL_DEBUG, "tcp_sock_accept():create asocket\n");
     500        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_accept():create asocket\n");
    501501
    502502        rc = tcp_sock_finish_setup(asocket, &asock_id);
     
    510510        fibril_add_ready(asocket->recv_fibril);
    511511
    512         log_msg(LVL_DEBUG, "tcp_sock_accept(): find acore\n");
     512        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_accept(): find acore\n");
    513513
    514514        SOCKET_SET_DATA_FRAGMENT_SIZE(answer, TCP_SOCK_FRAGMENT_SIZE);
     
    521521       
    522522        /* Push one fragment notification to client's queue */
    523         log_msg(LVL_DEBUG, "tcp_sock_accept(): notify data\n");
     523        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_accept(): notify data\n");
    524524        fibril_mutex_unlock(&socket->lock);
    525525}
     
    539539        int rc;
    540540
    541         log_msg(LVL_DEBUG, "tcp_sock_send()");
     541        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_send()");
    542542        socket_id = SOCKET_GET_SOCKET_ID(call);
    543543        fragments = SOCKET_GET_DATA_FRAGMENTS(call);
     
    611611static void tcp_sock_sendto(tcp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    612612{
    613         log_msg(LVL_DEBUG, "tcp_sock_sendto()");
     613        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_sendto()");
    614614        async_answer_0(callid, ENOTSUP);
    615615}
     
    629629        int rc;
    630630
    631         log_msg(LVL_DEBUG, "%p: tcp_sock_recv[from]()", client);
     631        log_msg(LOG_DEFAULT, LVL_DEBUG, "%p: tcp_sock_recv[from]()", client);
    632632
    633633        socket_id = SOCKET_GET_SOCKET_ID(call);
     
    651651        (void)flags;
    652652
    653         log_msg(LVL_DEBUG, "tcp_sock_recvfrom(): lock recv_buffer_lock");
     653        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_recvfrom(): lock recv_buffer_lock");
    654654        fibril_mutex_lock(&socket->recv_buffer_lock);
    655655        while (socket->recv_buffer_used == 0 && socket->recv_error == TCP_EOK) {
    656                 log_msg(LVL_DEBUG, "wait for recv_buffer_cv + recv_buffer_used != 0");
     656                log_msg(LOG_DEFAULT, LVL_DEBUG, "wait for recv_buffer_cv + recv_buffer_used != 0");
    657657                fibril_condvar_wait(&socket->recv_buffer_cv,
    658658                    &socket->recv_buffer_lock);
    659659        }
    660660
    661         log_msg(LVL_DEBUG, "Got data in sock recv_buffer");
     661        log_msg(LOG_DEFAULT, LVL_DEBUG, "Got data in sock recv_buffer");
    662662
    663663        data_len = socket->recv_buffer_used;
     
    679679        }
    680680
    681         log_msg(LVL_DEBUG, "**** recv result -> %d", rc);
     681        log_msg(LOG_DEFAULT, LVL_DEBUG, "**** recv result -> %d", rc);
    682682        if (rc != EOK) {
    683683                fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    694694                addr.sin_port = host2uint16_t_be(rsock->port);
    695695
    696                 log_msg(LVL_DEBUG, "addr read receive");
     696                log_msg(LOG_DEFAULT, LVL_DEBUG, "addr read receive");
    697697                if (!async_data_read_receive(&rcallid, &addr_length)) {
    698698                        fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    705705                        addr_length = sizeof(addr);
    706706
    707                 log_msg(LVL_DEBUG, "addr read finalize");
     707                log_msg(LOG_DEFAULT, LVL_DEBUG, "addr read finalize");
    708708                rc = async_data_read_finalize(rcallid, &addr, addr_length);
    709709                if (rc != EOK) {
     
    715715        }
    716716
    717         log_msg(LVL_DEBUG, "data read receive");
     717        log_msg(LOG_DEFAULT, LVL_DEBUG, "data read receive");
    718718        if (!async_data_read_receive(&rcallid, &length)) {
    719719                fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    726726                length = data_len;
    727727
    728         log_msg(LVL_DEBUG, "data read finalize");
     728        log_msg(LOG_DEFAULT, LVL_DEBUG, "data read finalize");
    729729        rc = async_data_read_finalize(rcallid, socket->recv_buffer, length);
    730730
    731731        socket->recv_buffer_used -= length;
    732         log_msg(LVL_DEBUG, "tcp_sock_recvfrom: %zu left in buffer",
     732        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_recvfrom: %zu left in buffer",
    733733            socket->recv_buffer_used);
    734734        if (socket->recv_buffer_used > 0) {
     
    758758        int rc;
    759759
    760         log_msg(LVL_DEBUG, "tcp_sock_close()");
     760        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close()");
    761761        socket_id = SOCKET_GET_SOCKET_ID(call);
    762762
     
    798798static void tcp_sock_getsockopt(tcp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    799799{
    800         log_msg(LVL_DEBUG, "tcp_sock_getsockopt()");
     800        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_getsockopt()");
    801801        async_answer_0(callid, ENOTSUP);
    802802}
     
    804804static void tcp_sock_setsockopt(tcp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    805805{
    806         log_msg(LVL_DEBUG, "tcp_sock_setsockopt()");
     806        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_setsockopt()");
    807807        async_answer_0(callid, ENOTSUP);
    808808}
     
    815815        tcp_sockdata_t *socket = lconn->socket;
    816816
    817         log_msg(LVL_DEBUG, "tcp_sock_cstate_cb()");
     817        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_cstate_cb()");
    818818        fibril_mutex_lock(&socket->lock);
    819819        assert(conn == lconn->conn);
     
    828828        list_append(&lconn->ready_list, &socket->ready);
    829829
    830         log_msg(LVL_DEBUG, "tcp_sock_cstate_cb(): notify accept");
     830        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_cstate_cb(): notify accept");
    831831
    832832        /* Push one accept notification to client's queue */
     
    842842        tcp_error_t trc;
    843843
    844         log_msg(LVL_DEBUG, "tcp_sock_recv_fibril()");
     844        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_recv_fibril()");
    845845
    846846        fibril_mutex_lock(&sock->recv_buffer_lock);
    847847
    848848        while (true) {
    849                 log_msg(LVL_DEBUG, "call tcp_uc_receive()");
     849                log_msg(LOG_DEFAULT, LVL_DEBUG, "call tcp_uc_receive()");
    850850                while (sock->recv_buffer_used != 0 && sock->sock_core != NULL)
    851851                        fibril_condvar_wait(&sock->recv_buffer_cv,
     
    863863                }
    864864
    865                 log_msg(LVL_DEBUG, "got data - broadcast recv_buffer_cv");
     865                log_msg(LOG_DEFAULT, LVL_DEBUG, "got data - broadcast recv_buffer_cv");
    866866
    867867                sock->recv_buffer_used = data_len;
     
    895895                        break;
    896896
    897                 log_msg(LVL_DEBUG, "tcp_sock_connection: METHOD=%d\n",
     897                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_connection: METHOD=%d\n",
    898898                    (int)IPC_GET_IMETHOD(call));
    899899
     
    940940
    941941        /* Clean up */
    942         log_msg(LVL_DEBUG, "tcp_sock_connection: Clean up");
     942        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_connection: Clean up");
    943943        async_hangup(client.sess);
    944944        socket_cores_release(NULL, &client.sockets, &gsock, tcp_free_sock_data);
  • uspace/srv/net/tcp/tcp.c

    r920d0fc ra1a101d  
    6969        size_t pdu_raw_size;
    7070
    71         log_msg(LVL_DEBUG, "tcp_inet_ev_recv()");
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_inet_ev_recv()");
    7272
    7373        pdu_raw = dgram->data;
     
    7676        /* Split into header and payload. */
    7777
    78         log_msg(LVL_DEBUG, "tcp_inet_ev_recv() - split header/payload");
     78        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_inet_ev_recv() - split header/payload");
    7979
    8080        tcp_pdu_t *pdu;
     
    8484
    8585        if (pdu_raw_size < sizeof(tcp_header_t)) {
    86                 log_msg(LVL_WARN, "pdu_raw_size = %zu < sizeof(tcp_header_t) = %zu",
     86                log_msg(LOG_DEFAULT, LVL_WARN, "pdu_raw_size = %zu < sizeof(tcp_header_t) = %zu",
    8787                    pdu_raw_size, sizeof(tcp_header_t));
    8888                return EINVAL;
     
    9696
    9797        if (pdu_raw_size < hdr_size) {
    98                 log_msg(LVL_WARN, "pdu_raw_size = %zu < hdr_size = %zu",
     98                log_msg(LOG_DEFAULT, LVL_WARN, "pdu_raw_size = %zu < hdr_size = %zu",
    9999                    pdu_raw_size, hdr_size);
    100100                return EINVAL;
     
    102102
    103103        if (hdr_size < sizeof(tcp_header_t)) {
    104                 log_msg(LVL_WARN, "hdr_size = %zu < sizeof(tcp_header_t) = %zu",
     104                log_msg(LOG_DEFAULT, LVL_WARN, "hdr_size = %zu < sizeof(tcp_header_t) = %zu",
    105105                    hdr_size, sizeof(tcp_header_t));            return EINVAL;
    106106        }
    107107
    108         log_msg(LVL_DEBUG, "pdu_raw_size=%zu, hdr_size=%zu",
     108        log_msg(LOG_DEFAULT, LVL_DEBUG, "pdu_raw_size=%zu, hdr_size=%zu",
    109109            pdu_raw_size, hdr_size);
    110110        pdu = tcp_pdu_create(pdu_raw, hdr_size, pdu_raw + hdr_size,
    111111            pdu_raw_size - hdr_size);
    112112        if (pdu == NULL) {
    113                 log_msg(LVL_WARN, "Failed creating PDU. Dropped.");
     113                log_msg(LOG_DEFAULT, LVL_WARN, "Failed creating PDU. Dropped.");
    114114                return ENOMEM;
    115115        }
     
    117117        pdu->src_addr.ipv4 = dgram->src.ipv4;
    118118        pdu->dest_addr.ipv4 = dgram->dest.ipv4;
    119         log_msg(LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
     119        log_msg(LOG_DEFAULT, LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
    120120            pdu->src_addr.ipv4, pdu->dest_addr.ipv4);
    121121
     
    137137        pdu_raw = malloc(pdu_raw_size);
    138138        if (pdu_raw == NULL) {
    139                 log_msg(LVL_ERROR, "Failed to transmit PDU. Out of memory.");
     139                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to transmit PDU. Out of memory.");
    140140                return;
    141141        }
     
    153153        rc = inet_send(&dgram, INET_TTL_MAX, 0);
    154154        if (rc != EOK)
    155                 log_msg(LVL_ERROR, "Failed to transmit PDU.");
     155                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to transmit PDU.");
    156156}
    157157
     
    162162        tcp_sockpair_t rident;
    163163
    164         log_msg(LVL_DEBUG, "tcp_received_pdu()");
     164        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_received_pdu()");
    165165
    166166        if (tcp_pdu_decode(pdu, &rident, &dseg) != EOK) {
    167                 log_msg(LVL_WARN, "Not enough memory. PDU dropped.");
     167                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. PDU dropped.");
    168168                return;
    169169        }
     
    177177        int rc;
    178178
    179         log_msg(LVL_DEBUG, "tcp_init()");
     179        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_init()");
    180180
    181181        tcp_rqueue_init();
     
    189189        rc = inet_init(IP_PROTO_TCP, &tcp_inet_ev_ops);
    190190        if (rc != EOK) {
    191                 log_msg(LVL_ERROR, "Failed connecting to internet service.");
     191                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting to internet service.");
    192192                return ENOENT;
    193193        }
     
    195195        rc = tcp_sock_init();
    196196        if (rc != EOK) {
    197                 log_msg(LVL_ERROR, "Failed initializing socket service.");
     197                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed initializing socket service.");
    198198                return ENOENT;
    199199        }
  • uspace/srv/net/tcp/tqueue.c

    r920d0fc ra1a101d  
    8888        tcp_segment_t *seg;
    8989
    90         log_msg(LVL_DEBUG, "tcp_tqueue_ctrl_seg(%p, %u)", conn, ctrl);
     90        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_tqueue_ctrl_seg(%p, %u)", conn, ctrl);
    9191
    9292        seg = tcp_segment_make_ctrl(ctrl);
     
    9999        tcp_tqueue_entry_t *tqe;
    100100
    101         log_msg(LVL_DEBUG, "%s: tcp_tqueue_seg(%p, %p)", conn->name, conn,
     101        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_seg(%p, %p)", conn->name, conn,
    102102            seg);
    103103
     
    109109                rt_seg = tcp_segment_dup(seg);
    110110                if (rt_seg == NULL) {
    111                         log_msg(LVL_ERROR, "Memory allocation failed.");
     111                        log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed.");
    112112                        /* XXX Handle properly */
    113113                        return;
     
    116116                tqe = calloc(1, sizeof(tcp_tqueue_entry_t));
    117117                if (tqe == NULL) {
    118                         log_msg(LVL_ERROR, "Memory allocation failed.");
     118                        log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed.");
    119119                        /* XXX Handle properly */
    120120                        return;
     
    165165        tcp_segment_t *seg;
    166166
    167         log_msg(LVL_DEBUG, "%s: tcp_tqueue_new_data()", conn->name);
     167        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_new_data()", conn->name);
    168168
    169169        /* Number of free sequence numbers in send window */
     
    172172
    173173        xfer_seqlen = min(snd_buf_seqlen, avail_wnd);
    174         log_msg(LVL_DEBUG, "%s: snd_buf_seqlen = %zu, SND.WND = %zu, "
     174        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: snd_buf_seqlen = %zu, SND.WND = %zu, "
    175175            "xfer_seqlen = %zu", conn->name, snd_buf_seqlen, conn->snd_wnd,
    176176            xfer_seqlen);
     
    185185
    186186        if (send_fin) {
    187                 log_msg(LVL_DEBUG, "%s: Sending out FIN.", conn->name);
     187                log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Sending out FIN.", conn->name);
    188188                /* We are sending out FIN */
    189189                ctrl = CTL_FIN;
     
    194194        seg = tcp_segment_make_data(ctrl, conn->snd_buf, data_size);
    195195        if (seg == NULL) {
    196                 log_msg(LVL_ERROR, "Memory allocation failure.");
     196                log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failure.");
    197197                return;
    198198        }
     
    223223        link_t *cur, *next;
    224224
    225         log_msg(LVL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name,
     225        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name,
    226226            conn);
    227227
     
    239239
    240240                        if ((tqe->seg->ctrl & CTL_FIN) != 0) {
    241                                 log_msg(LVL_DEBUG, "Fin has been acked");
    242                                 log_msg(LVL_DEBUG, "SND.UNA=%" PRIu32
     241                                log_msg(LOG_DEFAULT, LVL_DEBUG, "Fin has been acked");
     242                                log_msg(LOG_DEFAULT, LVL_DEBUG, "SND.UNA=%" PRIu32
    243243                                    " SEG.SEQ=%" PRIu32 " SEG.LEN=%" PRIu32,
    244244                                    conn->snd_una, tqe->seg->seq, tqe->seg->len);
     
    267267void tcp_conn_transmit_segment(tcp_conn_t *conn, tcp_segment_t *seg)
    268268{
    269         log_msg(LVL_DEBUG, "%s: tcp_conn_transmit_segment(%p, %p)",
     269        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_transmit_segment(%p, %p)",
    270270            conn->name, conn, seg);
    271271
     
    282282void tcp_transmit_segment(tcp_sockpair_t *sp, tcp_segment_t *seg)
    283283{
    284         log_msg(LVL_DEBUG, "tcp_transmit_segment(f:(%x,%u),l:(%x,%u), %p)",
     284        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_transmit_segment(f:(%x,%u),l:(%x,%u), %p)",
    285285            sp->foreign.addr.ipv4, sp->foreign.port,
    286286            sp->local.addr.ipv4, sp->local.port, seg);
    287287
    288         log_msg(LVL_DEBUG, "SEG.SEQ=%" PRIu32 ", SEG.WND=%" PRIu32,
     288        log_msg(LOG_DEFAULT, LVL_DEBUG, "SEG.SEQ=%" PRIu32 ", SEG.WND=%" PRIu32,
    289289            seg->seq, seg->wnd);
    290290
     
    300300
    301301        if (tcp_pdu_encode(sp, seg, &pdu) != EOK) {
    302                 log_msg(LVL_WARN, "Not enough memory. Segment dropped.");
     302                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. Segment dropped.");
    303303                return;
    304304        }
     
    315315        link_t *link;
    316316
    317         log_msg(LVL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn);
     317        log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn);
    318318
    319319        fibril_mutex_lock(&conn->lock);
    320320
    321321        if (conn->cstate == st_closed) {
    322                 log_msg(LVL_DEBUG, "Connection already closed.");
     322                log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed.");
    323323                fibril_mutex_unlock(&conn->lock);
    324324                tcp_conn_delref(conn);
     
    328328        link = list_first(&conn->retransmit.list);
    329329        if (link == NULL) {
    330                 log_msg(LVL_DEBUG, "Nothing to retransmit");
     330                log_msg(LOG_DEFAULT, LVL_DEBUG, "Nothing to retransmit");
    331331                fibril_mutex_unlock(&conn->lock);
    332332                tcp_conn_delref(conn);
     
    338338        rt_seg = tcp_segment_dup(tqe->seg);
    339339        if (rt_seg == NULL) {
    340                 log_msg(LVL_ERROR, "Memory allocation failed.");
     340                log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed.");
    341341                fibril_mutex_unlock(&conn->lock);
    342342                tcp_conn_delref(conn);
     
    345345        }
    346346
    347         log_msg(LVL_DEBUG, "### %s: retransmitting segment", conn->name);
     347        log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmitting segment", conn->name);
    348348        tcp_conn_transmit_segment(tqe->conn, rt_seg);
    349349
     
    358358static void tcp_tqueue_timer_set(tcp_conn_t *conn)
    359359{
    360         log_msg(LVL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name);
     360        log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name);
    361361
    362362        /* Clear first to make sure we update refcnt correctly */
     
    371371static void tcp_tqueue_timer_clear(tcp_conn_t *conn)
    372372{
    373         log_msg(LVL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name);
     373        log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name);
    374374
    375375        if (fibril_timer_clear(conn->retransmit.timer) == fts_active)
  • uspace/srv/net/tcp/ucall.c

    r920d0fc ra1a101d  
    7070        tcp_conn_t *nconn;
    7171
    72         log_msg(LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)",
     72        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)",
    7373            lsock, fsock, acpass == ap_active ? "active" : "passive",
    7474            oflags == tcp_open_nonblock ? "nonblock" : "none", conn);
     
    8888
    8989        /* Wait for connection to be established or reset */
    90         log_msg(LVL_DEBUG, "tcp_uc_open: Wait for connection.");
     90        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Wait for connection.");
    9191        fibril_mutex_lock(&nconn->lock);
    9292        while (nconn->cstate == st_listen ||
     
    9797
    9898        if (nconn->cstate != st_established) {
    99                 log_msg(LVL_DEBUG, "tcp_uc_open: Connection was reset.");
     99                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was reset.");
    100100                assert(nconn->cstate == st_closed);
    101101                fibril_mutex_unlock(&nconn->lock);
     
    104104
    105105        fibril_mutex_unlock(&nconn->lock);
    106         log_msg(LVL_DEBUG, "tcp_uc_open: Connection was established.");
     106        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was established.");
    107107
    108108        *conn = nconn;
    109         log_msg(LVL_DEBUG, "tcp_uc_open -> %p", nconn);
     109        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open -> %p", nconn);
    110110        return TCP_EOK;
    111111}
     
    118118        size_t xfer_size;
    119119
    120         log_msg(LVL_DEBUG, "%s: tcp_uc_send()", conn->name);
     120        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_send()", conn->name);
    121121
    122122        fibril_mutex_lock(&conn->lock);
     
    141141                buf_free = conn->snd_buf_size - conn->snd_buf_used;
    142142                while (buf_free == 0 && !conn->reset) {
    143                         log_msg(LVL_DEBUG, "%s: buf_free == 0, waiting.",
     143                        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: buf_free == 0, waiting.",
    144144                            conn->name);
    145145                        fibril_condvar_wait(&conn->snd_buf_cv, &conn->lock);
     
    175175        size_t xfer_size;
    176176
    177         log_msg(LVL_DEBUG, "%s: tcp_uc_receive()", conn->name);
     177        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive()", conn->name);
    178178
    179179        fibril_mutex_lock(&conn->lock);
     
    186186        /* Wait for data to become available */
    187187        while (conn->rcv_buf_used == 0 && !conn->rcv_buf_fin && !conn->reset) {
    188                 log_msg(LVL_DEBUG, "tcp_uc_receive() - wait for data");
     188                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_receive() - wait for data");
    189189                fibril_condvar_wait(&conn->rcv_buf_cv, &conn->lock);
    190190        }
     
    223223        tcp_tqueue_ctrl_seg(conn, CTL_ACK);
    224224
    225         log_msg(LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes",
     225        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes",
    226226            conn->name, xfer_size);
    227227
     
    234234tcp_error_t tcp_uc_close(tcp_conn_t *conn)
    235235{
    236         log_msg(LVL_DEBUG, "%s: tcp_uc_close()", conn->name);
     236        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_close()", conn->name);
    237237
    238238        fibril_mutex_lock(&conn->lock);
     
    258258void tcp_uc_abort(tcp_conn_t *conn)
    259259{
    260         log_msg(LVL_DEBUG, "tcp_uc_abort()");
     260        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_abort()");
    261261}
    262262
     
    264264void tcp_uc_status(tcp_conn_t *conn, tcp_conn_status_t *cstatus)
    265265{
    266         log_msg(LVL_DEBUG, "tcp_uc_status()");
     266        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_status()");
    267267        cstatus->cstate = conn->cstate;
    268268}
     
    276276void tcp_uc_delete(tcp_conn_t *conn)
    277277{
    278         log_msg(LVL_DEBUG, "tcp_uc_delete()");
     278        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_delete()");
    279279        tcp_conn_delete(conn);
    280280}
     
    282282void tcp_uc_set_cstate_cb(tcp_conn_t *conn, tcp_cstate_cb_t cb, void *arg)
    283283{
    284         log_msg(LVL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)",
     284        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)",
    285285            conn, cb, arg);
    286286
     
    298298        tcp_conn_t *conn;
    299299
    300         log_msg(LVL_DEBUG, "tcp_as_segment_arrived(f:(%x,%u), l:(%x,%u))",
     300        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_as_segment_arrived(f:(%x,%u), l:(%x,%u))",
    301301            sp->foreign.addr.ipv4, sp->foreign.port,
    302302            sp->local.addr.ipv4, sp->local.port);
     
    304304        conn = tcp_conn_find_ref(sp);
    305305        if (conn == NULL) {
    306                 log_msg(LVL_WARN, "No connection found.");
     306                log_msg(LOG_DEFAULT, LVL_WARN, "No connection found.");
    307307                tcp_unexpected_segment(sp, seg);
    308308                return;
     
    312312
    313313        if (conn->cstate == st_closed) {
    314                 log_msg(LVL_WARN, "Connection is closed.");
     314                log_msg(LOG_DEFAULT, LVL_WARN, "Connection is closed.");
    315315                tcp_unexpected_segment(sp, seg);
    316316                fibril_mutex_unlock(&conn->lock);
     
    339339void tcp_to_user(void)
    340340{
    341         log_msg(LVL_DEBUG, "tcp_to_user()");
     341        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_to_user()");
    342342}
    343343
  • uspace/srv/net/udp/assoc.c

    r920d0fc ra1a101d  
    104104static void udp_assoc_free(udp_assoc_t *assoc)
    105105{
    106         log_msg(LVL_DEBUG, "%s: udp_assoc_free(%p)", assoc->name, assoc);
     106        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_assoc_free(%p)", assoc->name, assoc);
    107107
    108108        while (!list_empty(&assoc->rcv_queue)) {
     
    127127void udp_assoc_addref(udp_assoc_t *assoc)
    128128{
    129         log_msg(LVL_DEBUG, "%s: upd_assoc_addref(%p)", assoc->name, assoc);
     129        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: upd_assoc_addref(%p)", assoc->name, assoc);
    130130        atomic_inc(&assoc->refcnt);
    131131}
     
    139139void udp_assoc_delref(udp_assoc_t *assoc)
    140140{
    141         log_msg(LVL_DEBUG, "%s: udp_assoc_delref(%p)", assoc->name, assoc);
     141        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_assoc_delref(%p)", assoc->name, assoc);
    142142
    143143        if (atomic_predec(&assoc->refcnt) == 0)
     
    154154void udp_assoc_delete(udp_assoc_t *assoc)
    155155{
    156         log_msg(LVL_DEBUG, "%s: udp_assoc_delete(%p)", assoc->name, assoc);
     156        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_assoc_delete(%p)", assoc->name, assoc);
    157157
    158158        assert(assoc->deleted == false);
     
    192192void udp_assoc_set_foreign(udp_assoc_t *assoc, udp_sock_t *fsock)
    193193{
    194         log_msg(LVL_DEBUG, "udp_assoc_set_foreign(%p, %p)", assoc, fsock);
     194        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_set_foreign(%p, %p)", assoc, fsock);
    195195        fibril_mutex_lock(&assoc->lock);
    196196        assoc->ident.foreign = *fsock;
     
    205205void udp_assoc_set_local(udp_assoc_t *assoc, udp_sock_t *lsock)
    206206{
    207         log_msg(LVL_DEBUG, "udp_assoc_set_local(%p, %p)", assoc, lsock);
     207        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_set_local(%p, %p)", assoc, lsock);
    208208        fibril_mutex_lock(&assoc->lock);
    209209        assoc->ident.local = *lsock;
     
    228228        int rc;
    229229
    230         log_msg(LVL_DEBUG, "udp_assoc_send(%p, %p, %p)",
     230        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send(%p, %p, %p)",
    231231            assoc, fsock, msg);
    232232
     
    261261        udp_rcv_queue_entry_t *rqe;
    262262
    263         log_msg(LVL_DEBUG, "udp_assoc_recv()");
     263        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv()");
    264264
    265265        fibril_mutex_lock(&assoc->lock);
    266266        while (list_empty(&assoc->rcv_queue)) {
    267                 log_msg(LVL_DEBUG, "udp_assoc_recv() - waiting");
     267                log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv() - waiting");
    268268                fibril_condvar_wait(&assoc->rcv_queue_cv, &assoc->lock);
    269269        }
    270270
    271         log_msg(LVL_DEBUG, "udp_assoc_recv() - got a message");
     271        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv() - got a message");
    272272        link = list_first(&assoc->rcv_queue);
    273273        rqe = list_get_instance(link, udp_rcv_queue_entry_t, link);
     
    291291        int rc;
    292292
    293         log_msg(LVL_DEBUG, "udp_assoc_received(%p, %p)", rsp, msg);
     293        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_received(%p, %p)", rsp, msg);
    294294
    295295        assoc = udp_assoc_find_ref(rsp);
    296296        if (assoc == NULL) {
    297                 log_msg(LVL_DEBUG, "No association found. Message dropped.");
     297                log_msg(LOG_DEFAULT, LVL_DEBUG, "No association found. Message dropped.");
    298298                /* XXX Generate ICMP error. */
    299299                /* XXX Might propagate error directly by error return. */
     
    303303        rc = udp_assoc_queue_msg(assoc, rsp, msg);
    304304        if (rc != EOK) {
    305                 log_msg(LVL_DEBUG, "Out of memory. Message dropped.");
     305                log_msg(LOG_DEFAULT, LVL_DEBUG, "Out of memory. Message dropped.");
    306306                /* XXX Generate ICMP error? */
    307307        }
     
    313313        udp_rcv_queue_entry_t *rqe;
    314314
    315         log_msg(LVL_DEBUG, "udp_assoc_queue_msg(%p, %p, %p)",
     315        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_queue_msg(%p, %p, %p)",
    316316            assoc, sp, msg);
    317317
     
    336336static bool udp_socket_match(udp_sock_t *sock, udp_sock_t *patt)
    337337{
    338         log_msg(LVL_DEBUG, "udp_socket_match(sock=(%x,%u), pat=(%x,%u))",
     338        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_socket_match(sock=(%x,%u), pat=(%x,%u))",
    339339            sock->addr.ipv4, sock->port, patt->addr.ipv4, patt->port);
    340340
     
    347347                return false;
    348348
    349         log_msg(LVL_DEBUG, " -> match");
     349        log_msg(LOG_DEFAULT, LVL_DEBUG, " -> match");
    350350
    351351        return true;
     
    355355static bool udp_sockpair_match(udp_sockpair_t *sp, udp_sockpair_t *pattern)
    356356{
    357         log_msg(LVL_DEBUG, "udp_sockpair_match(%p, %p)", sp, pattern);
     357        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sockpair_match(%p, %p)", sp, pattern);
    358358
    359359        if (!udp_socket_match(&sp->local, &pattern->local))
     
    363363                return false;
    364364
    365         log_msg(LVL_DEBUG, "Socket pair matched.");
     365        log_msg(LOG_DEFAULT, LVL_DEBUG, "Socket pair matched.");
    366366        return true;
    367367}
     
    379379static udp_assoc_t *udp_assoc_find_ref(udp_sockpair_t *sp)
    380380{
    381         log_msg(LVL_DEBUG, "udp_assoc_find_ref(%p)", sp);
     381        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_find_ref(%p)", sp);
    382382
    383383        fibril_mutex_lock(&assoc_list_lock);
     
    386386                udp_assoc_t *assoc = list_get_instance(link, udp_assoc_t, link);
    387387                udp_sockpair_t *asp = &assoc->ident;
    388                 log_msg(LVL_DEBUG, "compare with assoc (f:(%x,%u), l:(%x,%u))",
     388                log_msg(LOG_DEFAULT, LVL_DEBUG, "compare with assoc (f:(%x,%u), l:(%x,%u))",
    389389                    asp->foreign.addr.ipv4, asp->foreign.port,
    390390                    asp->local.addr.ipv4, asp->local.port);
     
    395395
    396396                if (udp_sockpair_match(sp, asp)) {
    397                         log_msg(LVL_DEBUG, "Returning assoc %p", assoc);
     397                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Returning assoc %p", assoc);
    398398                        udp_assoc_addref(assoc);
    399399                        fibril_mutex_unlock(&assoc_list_lock);
  • uspace/srv/net/udp/sock.c

    r920d0fc ra1a101d  
    8888static void udp_sock_notify_data(socket_core_t *sock_core)
    8989{
    90         log_msg(LVL_DEBUG, "udp_sock_notify_data(%d)", sock_core->socket_id);
     90        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_notify_data(%d)", sock_core->socket_id);
    9191        async_exch_t *exch = async_exchange_begin(sock_core->sess);
    9292        async_msg_5(exch, NET_SOCKET_RECEIVED, (sysarg_t)sock_core->socket_id,
     
    103103        ipc_call_t answer;
    104104
    105         log_msg(LVL_DEBUG, "udp_sock_socket()");
     105        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_socket()");
    106106        sock = calloc(sizeof(udp_sockdata_t), 1);
    107107        if (sock == NULL) {
     
    167167        udp_error_t urc;
    168168
    169         log_msg(LVL_DEBUG, "udp_sock_bind()");
    170         log_msg(LVL_DEBUG, " - async_data_write_accept");
     169        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_bind()");
     170        log_msg(LOG_DEFAULT, LVL_DEBUG, " - async_data_write_accept");
    171171
    172172        addr = NULL;
     
    178178        }
    179179
    180         log_msg(LVL_DEBUG, " - call socket_bind");
     180        log_msg(LOG_DEFAULT, LVL_DEBUG, " - call socket_bind");
    181181        rc = socket_bind(&client->sockets, &gsock, SOCKET_GET_SOCKET_ID(call),
    182182            addr, addr_size, UDP_FREE_PORTS_START, UDP_FREE_PORTS_END,
     
    192192        }
    193193
    194         log_msg(LVL_DEBUG, " - call socket_cores_find");
     194        log_msg(LOG_DEFAULT, LVL_DEBUG, " - call socket_cores_find");
    195195        sock_core = socket_cores_find(&client->sockets, SOCKET_GET_SOCKET_ID(call));
    196196        if (sock_core == NULL) {
     
    222222        }
    223223
    224         log_msg(LVL_DEBUG, " - success");
     224        log_msg(LOG_DEFAULT, LVL_DEBUG, " - success");
    225225        async_answer_0(callid, rc);
    226226out:
     
    231231static void udp_sock_listen(udp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    232232{
    233         log_msg(LVL_DEBUG, "udp_sock_listen()");
     233        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_listen()");
    234234        async_answer_0(callid, ENOTSUP);
    235235}
     
    237237static void udp_sock_connect(udp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    238238{
    239         log_msg(LVL_DEBUG, "udp_sock_connect()");
     239        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_connect()");
    240240        async_answer_0(callid, ENOTSUP);
    241241}
     
    243243static void udp_sock_accept(udp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    244244{
    245         log_msg(LVL_DEBUG, "udp_sock_accept()");
     245        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_accept()");
    246246        async_answer_0(callid, ENOTSUP);
    247247}
     
    264264        int rc;
    265265
    266         log_msg(LVL_DEBUG, "udp_sock_send()");
     266        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_send()");
    267267
    268268        addr = NULL;
     
    323323                        fibril_mutex_unlock(&socket->lock);
    324324                        async_answer_0(callid, rc);
    325                         log_msg(LVL_DEBUG, "udp_sock_sendto: Failed to "
     325                        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_sendto: Failed to "
    326326                            "determine local address.");
    327327                        return;
     
    329329
    330330                socket->assoc->ident.local.addr.ipv4 = loc_addr.ipv4;
    331                 log_msg(LVL_DEBUG, "Local IP address is %x",
     331                log_msg(LOG_DEFAULT, LVL_DEBUG, "Local IP address is %x",
    332332                    socket->assoc->ident.local.addr.ipv4);
    333333        }
     
    405405        int rc;
    406406
    407         log_msg(LVL_DEBUG, "%p: udp_sock_recv[from]()", client);
     407        log_msg(LOG_DEFAULT, LVL_DEBUG, "%p: udp_sock_recv[from]()", client);
    408408
    409409        socket_id = SOCKET_GET_SOCKET_ID(call);
     
    427427        (void)flags;
    428428
    429         log_msg(LVL_DEBUG, "udp_sock_recvfrom(): lock recv_buffer lock");
     429        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_recvfrom(): lock recv_buffer lock");
    430430        fibril_mutex_lock(&socket->recv_buffer_lock);
    431431        while (socket->recv_buffer_used == 0 && socket->recv_error == UDP_EOK) {
    432                 log_msg(LVL_DEBUG, "udp_sock_recvfrom(): wait for cv");
     432                log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_recvfrom(): wait for cv");
    433433                fibril_condvar_wait(&socket->recv_buffer_cv,
    434434                    &socket->recv_buffer_lock);
    435435        }
    436436
    437         log_msg(LVL_DEBUG, "Got data in sock recv_buffer");
     437        log_msg(LOG_DEFAULT, LVL_DEBUG, "Got data in sock recv_buffer");
    438438
    439439        rsock = socket->recv_fsock;
     
    441441        urc = socket->recv_error;
    442442
    443         log_msg(LVL_DEBUG, "**** recv data_len=%zu", data_len);
     443        log_msg(LOG_DEFAULT, LVL_DEBUG, "**** recv data_len=%zu", data_len);
    444444
    445445        switch (urc) {
     
    458458        }
    459459
    460         log_msg(LVL_DEBUG, "**** udp_uc_receive -> %d", rc);
     460        log_msg(LOG_DEFAULT, LVL_DEBUG, "**** udp_uc_receive -> %d", rc);
    461461        if (rc != EOK) {
    462462                fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    472472                addr.sin_port = host2uint16_t_be(rsock.port);
    473473
    474                 log_msg(LVL_DEBUG, "addr read receive");
     474                log_msg(LOG_DEFAULT, LVL_DEBUG, "addr read receive");
    475475                if (!async_data_read_receive(&rcallid, &addr_length)) {
    476476                        fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    483483                        addr_length = sizeof(addr);
    484484
    485                 log_msg(LVL_DEBUG, "addr read finalize");
     485                log_msg(LOG_DEFAULT, LVL_DEBUG, "addr read finalize");
    486486                rc = async_data_read_finalize(rcallid, &addr, addr_length);
    487487                if (rc != EOK) {
     
    493493        }
    494494
    495         log_msg(LVL_DEBUG, "data read receive");
     495        log_msg(LOG_DEFAULT, LVL_DEBUG, "data read receive");
    496496        if (!async_data_read_receive(&rcallid, &length)) {
    497497                fibril_mutex_unlock(&socket->recv_buffer_lock);
     
    504504                length = data_len;
    505505
    506         log_msg(LVL_DEBUG, "data read finalize");
     506        log_msg(LOG_DEFAULT, LVL_DEBUG, "data read finalize");
    507507        rc = async_data_read_finalize(rcallid, socket->recv_buffer, length);
    508508
     
    510510                rc = EOVERFLOW;
    511511
    512         log_msg(LVL_DEBUG, "read_data_length <- %zu", length);
     512        log_msg(LOG_DEFAULT, LVL_DEBUG, "read_data_length <- %zu", length);
    513513        IPC_SET_ARG2(answer, 0);
    514514        SOCKET_SET_READ_DATA_LENGTH(answer, length);
     
    531531        int rc;
    532532
    533         log_msg(LVL_DEBUG, "tcp_sock_close()");
     533        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close()");
    534534        socket_id = SOCKET_GET_SOCKET_ID(call);
    535535
     
    557557static void udp_sock_getsockopt(udp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    558558{
    559         log_msg(LVL_DEBUG, "udp_sock_getsockopt()");
     559        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_getsockopt()");
    560560        async_answer_0(callid, ENOTSUP);
    561561}
     
    563563static void udp_sock_setsockopt(udp_client_t *client, ipc_callid_t callid, ipc_call_t call)
    564564{
    565         log_msg(LVL_DEBUG, "udp_sock_setsockopt()");
     565        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_setsockopt()");
    566566        async_answer_0(callid, ENOTSUP);
    567567}
     
    574574        size_t rcvd;
    575575
    576         log_msg(LVL_DEBUG, "udp_sock_recv_fibril()");
     576        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_recv_fibril()");
    577577
    578578        while (true) {
    579                 log_msg(LVL_DEBUG, "[] wait for rcv buffer empty()");
     579                log_msg(LOG_DEFAULT, LVL_DEBUG, "[] wait for rcv buffer empty()");
    580580                fibril_mutex_lock(&sock->recv_buffer_lock);
    581581                while (sock->recv_buffer_used != 0) {
     
    584584                }
    585585
    586                 log_msg(LVL_DEBUG, "[] call udp_uc_receive()");
     586                log_msg(LOG_DEFAULT, LVL_DEBUG, "[] call udp_uc_receive()");
    587587                urc = udp_uc_receive(sock->assoc, sock->recv_buffer,
    588588                    UDP_FRAGMENT_SIZE, &rcvd, &xflags, &sock->recv_fsock);
     
    597597                }
    598598
    599                 log_msg(LVL_DEBUG, "[] got data - broadcast recv_buffer_cv");
     599                log_msg(LOG_DEFAULT, LVL_DEBUG, "[] got data - broadcast recv_buffer_cv");
    600600
    601601                sock->recv_buffer_used = rcvd;
     
    622622
    623623        while (true) {
    624                 log_msg(LVL_DEBUG, "udp_sock_connection: wait");
     624                log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_connection: wait");
    625625                callid = async_get_call(&call);
    626626                if (!IPC_GET_IMETHOD(call))
    627627                        break;
    628628
    629                 log_msg(LVL_DEBUG, "udp_sock_connection: METHOD=%d",
     629                log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_connection: METHOD=%d",
    630630                    (int)IPC_GET_IMETHOD(call));
    631631
     
    670670
    671671        /* Clean up */
    672         log_msg(LVL_DEBUG, "udp_sock_connection: Clean up");
     672        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_connection: Clean up");
    673673        async_hangup(client.sess);
    674674        socket_cores_release(NULL, &client.sockets, &gsock, udp_free_sock_data);
  • uspace/srv/net/udp/ucall.c

    r920d0fc ra1a101d  
    4747        udp_assoc_t *nassoc;
    4848
    49         log_msg(LVL_DEBUG, "udp_uc_create()");
     49        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_create()");
    5050        nassoc = udp_assoc_new(NULL, NULL);
    5151        if (nassoc == NULL)
     
    5959udp_error_t udp_uc_set_foreign(udp_assoc_t *assoc, udp_sock_t *fsock)
    6060{
    61         log_msg(LVL_DEBUG, "udp_uc_set_foreign(%p, %p)", assoc, fsock);
     61        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_foreign(%p, %p)", assoc, fsock);
    6262
    6363        udp_assoc_set_foreign(assoc, fsock);
     
    6767udp_error_t udp_uc_set_local(udp_assoc_t *assoc, udp_sock_t *lsock)
    6868{
    69         log_msg(LVL_DEBUG, "udp_uc_set_local(%p, %p)", assoc, lsock);
     69        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_local(%p, %p)", assoc, lsock);
    7070
    7171        udp_assoc_set_local(assoc, lsock);
     
    7979        udp_msg_t msg;
    8080
    81         log_msg(LVL_DEBUG, "%s: udp_uc_send()", assoc->name);
     81        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_uc_send()", assoc->name);
    8282
    8383        msg.data = data;
     
    103103        int rc;
    104104
    105         log_msg(LVL_DEBUG, "%s: udp_uc_receive()", assoc->name);
     105        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_uc_receive()", assoc->name);
    106106        rc = udp_assoc_recv(assoc, &msg, fsock);
    107107        switch (rc) {
     
    118118void udp_uc_status(udp_assoc_t *assoc, udp_assoc_status_t *astatus)
    119119{
    120         log_msg(LVL_DEBUG, "udp_uc_status()");
     120        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_status()");
    121121//      cstatus->cstate = conn->cstate;
    122122}
     
    124124void udp_uc_destroy(udp_assoc_t *assoc)
    125125{
    126         log_msg(LVL_DEBUG, "udp_uc_destroy()");
     126        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_destroy()");
    127127        udp_assoc_remove(assoc);
    128128        udp_assoc_delete(assoc);
  • uspace/srv/net/udp/udp.c

    r920d0fc ra1a101d  
    5050        int rc;
    5151
    52         log_msg(LVL_DEBUG, "udp_init()");
     52        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_init()");
    5353
    5454        rc = udp_inet_init();
    5555        if (rc != EOK) {
    56                 log_msg(LVL_ERROR, "Failed connecting to internet service.");
     56                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting to internet service.");
    5757                return ENOENT;
    5858        }
     
    6060        rc = udp_sock_init();
    6161        if (rc != EOK) {
    62                 log_msg(LVL_ERROR, "Failed initializing socket service.");
     62                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed initializing socket service.");
    6363                return ENOENT;
    6464        }
  • uspace/srv/net/udp/udp_inet.c

    r920d0fc ra1a101d  
    6161        udp_pdu_t *pdu;
    6262
    63         log_msg(LVL_DEBUG, "udp_inet_ev_recv()");
     63        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_inet_ev_recv()");
    6464
    6565        pdu = udp_pdu_new();
     
    6969        pdu->src.ipv4 = dgram->src.ipv4;
    7070        pdu->dest.ipv4 = dgram->dest.ipv4;
    71         log_msg(LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
    7272            pdu->src.ipv4, pdu->dest.ipv4);
    7373
     
    8484        inet_dgram_t dgram;
    8585
    86         log_msg(LVL_DEBUG, "udp_transmit_pdu()");
     86        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_transmit_pdu()");
    8787
    8888        dgram.src.ipv4 = pdu->src.ipv4;
     
    9494        rc = inet_send(&dgram, INET_TTL_MAX, 0);
    9595        if (rc != EOK)
    96                 log_msg(LVL_ERROR, "Failed to transmit PDU.");
     96                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to transmit PDU.");
    9797
    9898        return rc;
     
    105105        udp_sockpair_t rident;
    106106
    107         log_msg(LVL_DEBUG, "udp_received_pdu()");
     107        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_received_pdu()");
    108108
    109109        if (udp_pdu_decode(pdu, &rident, &dmsg) != EOK) {
    110                 log_msg(LVL_WARN, "Not enough memory. PDU dropped.");
     110                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. PDU dropped.");
    111111                return;
    112112        }
     
    124124        int rc;
    125125
    126         log_msg(LVL_DEBUG, "udp_inet_init()");
     126        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_inet_init()");
    127127
    128128        rc = inet_init(IP_PROTO_UDP, &udp_inet_ev_ops);
    129129        if (rc != EOK) {
    130                 log_msg(LVL_ERROR, "Failed connecting to internet service.");
     130                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting to internet service.");
    131131                return ENOENT;
    132132        }
Note: See TracChangeset for help on using the changeset viewer.