Changeset c3f7d37 in mainline
- Timestamp:
- 2015-06-07T12:36:44Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 048cd69
- Parents:
- 5a5b087
- Location:
- uspace
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/tcp.c
r5a5b087 rc3f7d37 41 41 #include <stdlib.h> 42 42 43 #include <stdio.h>44 45 43 static void tcp_cb_conn(ipc_callid_t, ipc_call_t *, void *); 46 44 static int tcp_conn_fibril(void *); … … 56 54 async_exch_t *exch = async_exchange_begin(tcp->sess); 57 55 58 printf("tcp_callback_create()\n");59 60 56 aid_t req = async_send_0(exch, TCP_CALLBACK_CREATE, NULL); 61 57 int rc = async_connect_to_me(exch, 0, 0, 0, tcp_cb_conn, tcp); … … 76 72 service_id_t tcp_svcid; 77 73 int rc; 78 79 printf("tcp_create()\n");80 74 81 75 tcp = calloc(1, sizeof(tcp_t)); … … 129 123 tcp_conn_t *conn; 130 124 131 printf("tcp_conn_new()\n");132 133 125 conn = calloc(1, sizeof(tcp_conn_t)); 134 126 if (conn == NULL) … … 157 149 sysarg_t conn_id; 158 150 159 printf("tcp_conn_create()\n");160 161 151 exch = async_exchange_begin(tcp->sess); 162 152 aid_t req = async_send_0(exch, TCP_CONN_CREATE, &answer); … … 192 182 async_exch_t *exch; 193 183 194 printf("tcp_conn_destroy()\n");195 196 184 if (conn == NULL) 197 185 return; … … 230 218 tcp_listener_t *lst; 231 219 ipc_call_t answer; 232 233 printf("tcp_listener_create()\n");234 220 235 221 lst = calloc(1, sizeof(tcp_listener_t)); … … 274 260 { 275 261 async_exch_t *exch; 276 277 printf("tcp_listener_destroy()\n");278 262 279 263 if (lst == NULL) … … 328 312 sysarg_t rc; 329 313 330 printf("tcp_conn_send()\n");331 332 314 exch = async_exchange_begin(conn->tcp->sess); 333 315 aid_t req = async_send_1(exch, TCP_CONN_SEND, conn->id, NULL); … … 355 337 async_exch_t *exch; 356 338 357 printf("tcp_conn_send_fin()\n");358 359 339 exch = async_exchange_begin(conn->tcp->sess); 360 340 sysarg_t rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id); … … 368 348 async_exch_t *exch; 369 349 370 printf("tcp_conn_push()\n");371 372 350 exch = async_exchange_begin(conn->tcp->sess); 373 351 sysarg_t rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id); … … 381 359 async_exch_t *exch; 382 360 383 printf("tcp_conn_reset()\n");384 385 361 exch = async_exchange_begin(conn->tcp->sess); 386 362 sysarg_t rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id); … … 395 371 ipc_call_t answer; 396 372 397 printf("tcp_conn_recv() bsize=%zu\n", bsize);398 399 373 fibril_mutex_lock(&conn->lock); 400 374 if (!conn->data_avail) { 401 printf("returning EAGAIN\n");402 375 fibril_mutex_unlock(&conn->lock); 403 376 return EAGAIN; … … 410 383 411 384 if (rc != EOK) { 412 printf("got rc = %d\n", rc);413 385 async_forget(req); 414 386 fibril_mutex_unlock(&conn->lock); … … 419 391 async_wait_for(req, &retval); 420 392 if (retval != EOK) { 421 printf("got rc = %d\n", rc);422 393 fibril_mutex_unlock(&conn->lock); 423 394 return retval; … … 434 405 ipc_call_t answer; 435 406 436 printf("tcp_conn_recv_wait() bsize=%zu\n", bsize);437 407 again: 438 408 fibril_mutex_lock(&conn->lock); 439 409 while (!conn->data_avail) { 440 printf("wait for data to be avail\n");441 410 fibril_condvar_wait(&conn->cv, &conn->lock); 442 411 } 443 412 444 printf("tcp_conn_recv_wait - get data\n");445 413 exch = async_exchange_begin(conn->tcp->sess); 446 414 aid_t req = async_send_1(exch, TCP_CONN_RECV_WAIT, conn->id, &answer); 447 415 int rc = async_data_read_start(exch, buf, bsize); 448 printf("tcp_conn_recv_wait - rc = %d\n", rc); 449 async_exchange_end(exch); 450 451 if (rc != EOK) { 452 printf("got rc=%d\n", rc); 416 async_exchange_end(exch); 417 418 if (rc != EOK) { 453 419 async_forget(req); 454 420 if (rc == EAGAIN) { … … 464 430 async_wait_for(req, &retval); 465 431 if (retval != EOK) { 466 printf("got retval != EOK\n");467 432 if (rc == EAGAIN) { 468 printf("rc == EAGAIN\n");469 433 conn->data_avail = false; 470 434 } … … 475 439 *nrecv = IPC_GET_ARG1(answer); 476 440 fibril_mutex_unlock(&conn->lock); 477 printf("tcp_conn_recv_wait: nrecv=%zu\n", *nrecv);478 printf("received: '");479 size_t i;480 for (i = 0; i < *nrecv; i++) {481 putchar((char)((char *)buf)[i]);482 }483 printf("'\n");484 441 return EOK; 485 442 } … … 491 448 int rc; 492 449 493 printf("tcp_ev_connected()\n");494 450 conn_id = IPC_GET_ARG1(*icall); 495 451 496 452 rc = tcp_conn_get(tcp, conn_id, &conn); 497 453 if (rc != EOK) { 498 printf("conn ID %zu not found\n",499 conn_id);500 454 async_answer_0(iid, ENOENT); 501 455 return; … … 516 470 int rc; 517 471 518 printf("tcp_ev_conn_failed()\n");519 472 conn_id = IPC_GET_ARG1(*icall); 520 473 521 474 rc = tcp_conn_get(tcp, conn_id, &conn); 522 475 if (rc != EOK) { 523 printf("conn ID %zu not found\n",524 conn_id);525 476 async_answer_0(iid, ENOENT); 526 477 return; … … 541 492 int rc; 542 493 543 printf("tcp_ev_conn_reset()\n");544 494 conn_id = IPC_GET_ARG1(*icall); 545 495 546 496 rc = tcp_conn_get(tcp, conn_id, &conn); 547 497 if (rc != EOK) { 548 printf("conn ID %zu not found\n",549 conn_id);550 498 async_answer_0(iid, ENOENT); 551 499 return; … … 566 514 int rc; 567 515 568 printf("tcp_ev_data()\n");569 516 conn_id = IPC_GET_ARG1(*icall); 570 517 571 518 rc = tcp_conn_get(tcp, conn_id, &conn); 572 519 if (rc != EOK) { 573 printf("conn ID %zu not found\n",574 conn_id);575 520 async_answer_0(iid, ENOENT); 576 521 return; … … 585 530 static void tcp_ev_urg_data(tcp_t *tcp, ipc_callid_t iid, ipc_call_t *icall) 586 531 { 587 printf("tcp_ev_urg_data()\n");588 532 async_answer_0(iid, ENOTSUP); 589 533 } … … 599 543 int rc; 600 544 601 printf("tcp_ev_new_conn()\n");602 545 lst_id = IPC_GET_ARG1(*icall); 603 546 conn_id = IPC_GET_ARG2(*icall); 604 547 605 printf("new conn: lst_id=%zu conn_id=%zu\n", lst_id, conn_id);606 607 548 rc = tcp_listener_get(tcp, lst_id, &lst); 608 549 if (rc != EOK) { 609 printf("listener ID %zu not found\n",610 lst_id);611 550 async_answer_0(iid, ENOENT); 612 551 return; … … 615 554 rc = tcp_conn_new(tcp, conn_id, lst->cb, lst->cb_arg, &conn); 616 555 if (rc != EOK) { 617 printf("Failed creating new incoming connection.\n");618 556 async_answer_0(iid, ENOMEM); 619 557 return; … … 621 559 622 560 if (lst->lcb != NULL && lst->lcb->new_conn != NULL) { 623 printf("Creating connection fibril\n");624 561 cinfo = calloc(1, sizeof(tcp_in_conn_t)); 625 562 if (cinfo == NULL) { 626 printf("Failed creating new incoming connection info.\n");627 563 async_answer_0(iid, ENOMEM); 628 564 return; … … 634 570 fid = fibril_create(tcp_conn_fibril, cinfo); 635 571 if (fid == 0) { 636 printf("Error creating connection fibril.\n");637 572 async_answer_0(iid, ENOMEM); 638 573 } … … 649 584 650 585 async_answer_0(iid, EOK); 651 652 printf("tcp_cb_conn()\n");653 586 654 587 while (true) { … … 656 589 ipc_callid_t callid = async_get_call(&call); 657 590 658 printf("tcp_cb_conn() - msg %d\n",659 (int)IPC_GET_IMETHOD(call));660 591 if (!IPC_GET_IMETHOD(call)) { 661 592 /* TODO: Handle hangup */ … … 694 625 tcp_in_conn_t *cinfo = (tcp_in_conn_t *)arg; 695 626 696 printf("tcp_conn_fibril: begin\n");697 627 cinfo->lst->lcb->new_conn(cinfo->lst, cinfo->conn); 698 printf("tcp_conn_fibril: end\n");699 628 tcp_conn_destroy(cinfo->conn); 700 629 -
uspace/lib/c/generic/inet/udp.c
r5a5b087 rc3f7d37 36 36 #include <inet/endpoint.h> 37 37 #include <inet/udp.h> 38 #include <io/log.h>39 38 #include <ipc/services.h> 40 39 #include <ipc/udp.h> … … 48 47 async_exch_t *exch = async_exchange_begin(udp->sess); 49 48 50 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_callback_create()");51 52 49 aid_t req = async_send_0(exch, UDP_CALLBACK_CREATE, NULL); 53 50 int rc = async_connect_to_me(exch, 0, 0, 0, udp_cb_conn, udp); … … 68 65 service_id_t udp_svcid; 69 66 int rc; 70 71 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_create()");72 67 73 68 udp = calloc(1, sizeof(udp_t)); … … 122 117 ipc_call_t answer; 123 118 124 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_assoc_create()");125 126 119 assoc = calloc(1, sizeof(udp_assoc_t)); 127 120 if (assoc == NULL) … … 164 157 async_exch_t *exch; 165 158 166 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_assoc_destroy()");167 168 159 if (assoc == NULL) 169 160 return; … … 184 175 async_exch_t *exch; 185 176 186 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_assoc_send_msg()");187 188 177 exch = async_exchange_begin(assoc->udp->sess); 189 178 aid_t req = async_send_1(exch, UDP_ASSOC_SEND_MSG, assoc->id, NULL); … … 228 217 async_exch_t *exch; 229 218 ipc_call_t answer; 230 231 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_read()");232 219 233 220 exch = async_exchange_begin(rmsg->udp->sess); … … 237 224 238 225 if (rc != EOK) { 239 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_read() - rc != EOK"); 240 async_forget(req); 241 return rc; 242 } 243 244 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_read() - wait for req"); 226 async_forget(req); 227 return rc; 228 } 229 245 230 sysarg_t retval; 246 231 async_wait_for(req, &retval); 247 232 if (retval != EOK) { 248 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_read() - retval != EOK");249 233 return retval; 250 234 } 251 235 252 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_read() - OK");253 236 return EOK; 254 237 } … … 274 257 inet_ep_t ep; 275 258 ipc_call_t answer; 276 277 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_info()");278 259 279 260 exch = async_exchange_begin(udp->sess); … … 303 284 async_exch_t *exch; 304 285 305 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_rmsg_discard()");306 307 286 exch = async_exchange_begin(udp->sess); 308 287 sysarg_t rc = async_req_0_0(exch, UDP_RMSG_DISCARD); … … 330 309 int rc; 331 310 332 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_ev_data()");333 334 311 while (true) { 335 312 rc = udp_rmsg_info(udp, &rmsg); 336 313 if (rc != EOK) { 337 log_msg(LOG_DEFAULT, LVL_NOTE, "Error getting message info");338 314 break; 339 315 } … … 341 317 rc = udp_assoc_get(udp, rmsg.assoc_id, &assoc); 342 318 if (rc != EOK) { 343 log_msg(LOG_DEFAULT, LVL_NOTE, "assoc ID %zu not found",344 rmsg.assoc_id);345 319 continue; 346 320 } … … 351 325 rc = udp_rmsg_discard(udp); 352 326 if (rc != EOK) { 353 log_msg(LOG_DEFAULT, LVL_NOTE, "Error discarding message");354 327 break; 355 328 } … … 364 337 365 338 async_answer_0(iid, EOK); 366 367 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_cb_conn()");368 339 369 340 while (true) { … … 371 342 ipc_callid_t callid = async_get_call(&call); 372 343 373 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_cb_conn() - msg %d",374 (int)IPC_GET_IMETHOD(call));375 344 if (!IPC_GET_IMETHOD(call)) { 376 345 /* TODO: Handle hangup */ -
uspace/lib/nettl/src/amap.c
r5a5b087 rc3f7d37 52 52 int rc; 53 53 54 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_create()");54 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_create()"); 55 55 56 56 map = calloc(1, sizeof(amap_t)); … … 75 75 void amap_destroy(amap_t *map) 76 76 { 77 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_destroy()");77 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_destroy()"); 78 78 free(map); 79 79 } … … 88 88 (void) inet_addr_format(la, &sladdr); 89 89 90 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_repla_find(): rep=(%s,%" PRIu1690 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_repla_find(): rep=(%s,%" PRIu16 91 91 ") la=%s", sraddr, rep->port, sladdr); 92 92 free(sraddr); … … 96 96 (void) inet_addr_format(&repla->rep.addr, &sraddr); 97 97 (void) inet_addr_format(&repla->laddr, &sladdr); 98 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_repla_find(): "98 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_repla_find(): " 99 99 "compare to rep=(%s, %" PRIu16 ") la=%s", 100 100 sraddr, repla->rep.port, sladdr); … … 247 247 int rc; 248 248 249 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert_repla()");249 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert_repla()"); 250 250 251 251 rc = amap_repla_find(map, &epp->remote, &epp->local.addr, &repla); … … 279 279 int rc; 280 280 281 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert_laddr()");281 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert_laddr()"); 282 282 283 283 rc = amap_laddr_find(map, &epp->local.addr, &laddr); … … 310 310 int rc; 311 311 312 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert_llink()");312 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert_llink()"); 313 313 314 314 rc = amap_llink_find(map, epp->local_link, &llink); … … 340 340 int rc; 341 341 342 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert_unspec()");342 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert_unspec()"); 343 343 mepp = *epp; 344 344 … … 374 374 int rc; 375 375 376 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert()");376 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert()"); 377 377 378 378 mepp = *epp; … … 381 381 if (!inet_addr_is_any(&epp->remote.addr) && 382 382 inet_addr_is_any(&epp->local.addr)) { 383 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert: "383 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert: " 384 384 "determine local address"); 385 385 rc = inet_get_srcaddr(&epp->remote.addr, 0, &mepp.local.addr); 386 386 if (rc != EOK) { 387 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert: "387 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert: " 388 388 "cannot determine local address"); 389 389 return rc; 390 390 } 391 391 } else { 392 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert: "392 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert: " 393 393 "local address specified or remote address not specified"); 394 394 } … … 408 408 return amap_insert_unspec(map, &mepp, arg, flags, aepp); 409 409 } else { 410 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_insert: invalid "410 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_insert: invalid " 411 411 "combination of raddr=%d rport=%d laddr=%d llink=%d", 412 412 raddr, rport, laddr, llink); … … 424 424 rc = amap_repla_find(map, &epp->remote, &epp->local.addr, &repla); 425 425 if (rc != EOK) { 426 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_remove_repla: not found");426 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_remove_repla: not found"); 427 427 return; 428 428 } … … 441 441 rc = amap_laddr_find(map, &epp->local.addr, &laddr); 442 442 if (rc != EOK) { 443 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_remove_laddr: not found");443 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_remove_laddr: not found"); 444 444 return; 445 445 } … … 458 458 rc = amap_llink_find(map, epp->local_link, &llink); 459 459 if (rc != EOK) { 460 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_remove_llink: not found");460 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_remove_llink: not found"); 461 461 return; 462 462 } … … 477 477 bool raddr, rport, laddr, llink; 478 478 479 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_remove()");479 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_remove()"); 480 480 481 481 raddr = !inet_addr_is_any(&epp->remote.addr); … … 493 493 amap_remove_unspec(map, epp); 494 494 } else { 495 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_remove: invalid "495 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_remove: invalid " 496 496 "combination of raddr=%d rport=%d laddr=%d llink=%d", 497 497 raddr, rport, laddr, llink); … … 517 517 amap_llink_t *llink; 518 518 519 log_msg(LOG_DEFAULT, LVL_ NOTE, "amap_find_match(llink=%zu)",519 log_msg(LOG_DEFAULT, LVL_DEBUG2, "amap_find_match(llink=%zu)", 520 520 epp->local_link); 521 521 … … 526 526 rarg); 527 527 if (rc == EOK) { 528 log_msg(LOG_DEFAULT, LVL_ NOTE, "Matched repla / "528 log_msg(LOG_DEFAULT, LVL_DEBUG2, "Matched repla / " 529 529 "port %" PRIu16, epp->local.port); 530 530 return EOK; … … 538 538 rarg); 539 539 if (rc == EOK) { 540 log_msg(LOG_DEFAULT, LVL_ NOTE, "Matched laddr / "540 log_msg(LOG_DEFAULT, LVL_DEBUG2, "Matched laddr / " 541 541 "port %" PRIu16, epp->local.port); 542 542 return EOK; … … 550 550 rarg); 551 551 if (rc == EOK) { 552 log_msg(LOG_DEFAULT, LVL_ NOTE, "Matched llink / "552 log_msg(LOG_DEFAULT, LVL_DEBUG2, "Matched llink / " 553 553 "port %" PRIu16, epp->local.port); 554 554 return EOK; … … 559 559 rc = portrng_find_port(map->unspec, epp->local.port, rarg); 560 560 if (rc == EOK) { 561 log_msg(LOG_DEFAULT, LVL_ NOTE, "Matched unspec / port %" PRIu16,561 log_msg(LOG_DEFAULT, LVL_DEBUG2, "Matched unspec / port %" PRIu16, 562 562 epp->local.port); 563 563 return EOK; 564 564 } 565 565 566 log_msg(LOG_DEFAULT, LVL_ NOTE, "No match.");566 log_msg(LOG_DEFAULT, LVL_DEBUG2, "No match."); 567 567 return ENOENT; 568 568 } -
uspace/lib/nettl/src/portrng.c
r5a5b087 rc3f7d37 50 50 portrng_t *pr; 51 51 52 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_create() - begin");52 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_create() - begin"); 53 53 54 54 pr = calloc(1, sizeof(portrng_t)); … … 58 58 list_initialize(&pr->used); 59 59 *rpr = pr; 60 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_create() - end");60 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_create() - end"); 61 61 return EOK; 62 62 } … … 64 64 void portrng_destroy(portrng_t *pr) 65 65 { 66 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_destroy()");66 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_destroy()"); 67 67 assert(list_empty(&pr->used)); 68 68 free(pr); … … 76 76 bool found; 77 77 78 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_alloc() - begin");78 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_alloc() - begin"); 79 79 80 80 if (pnum == inet_port_any) { 81 81 82 82 for (i = inet_port_dyn_lo; i <= inet_port_dyn_hi; i++) { 83 log_msg(LOG_DEFAULT, LVL_ NOTE, "trying %" PRIu32, i);83 log_msg(LOG_DEFAULT, LVL_DEBUG2, "trying %" PRIu32, i); 84 84 found = false; 85 85 list_foreach(pr->used, lprng, portrng_port_t, port) { … … 100 100 return ENOENT; 101 101 } 102 log_msg(LOG_DEFAULT, LVL_ NOTE, "selected %" PRIu16, pnum);102 log_msg(LOG_DEFAULT, LVL_DEBUG2, "selected %" PRIu16, pnum); 103 103 } else { 104 log_msg(LOG_DEFAULT, LVL_ NOTE, "user asked for %" PRIu16, pnum);104 log_msg(LOG_DEFAULT, LVL_DEBUG2, "user asked for %" PRIu16, pnum); 105 105 106 106 if ((flags & pf_allow_system) == 0 && 107 107 pnum < inet_port_user_lo) { 108 log_msg(LOG_DEFAULT, LVL_ NOTE, "system port not allowed");108 log_msg(LOG_DEFAULT, LVL_DEBUG2, "system port not allowed"); 109 109 return EINVAL; 110 110 } … … 112 112 list_foreach(pr->used, lprng, portrng_port_t, port) { 113 113 if (port->pn == pnum) { 114 log_msg(LOG_DEFAULT, LVL_ NOTE, "port already used");114 log_msg(LOG_DEFAULT, LVL_DEBUG2, "port already used"); 115 115 return EEXISTS; 116 116 } … … 126 126 list_append(&p->lprng, &pr->used); 127 127 *apnum = pnum; 128 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_alloc() - end OK pn=%" PRIu16,128 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_alloc() - end OK pn=%" PRIu16, 129 129 pnum); 130 130 return EOK; … … 145 145 void portrng_free_port(portrng_t *pr, uint16_t pnum) 146 146 { 147 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_free_port() - begin");147 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port() - begin"); 148 148 list_foreach(pr->used, lprng, portrng_port_t, port) { 149 149 if (port->pn == pnum) { … … 155 155 156 156 assert(false); 157 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_free_port() - end");157 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port() - end"); 158 158 } 159 159 160 160 bool portrng_empty(portrng_t *pr) 161 161 { 162 log_msg(LOG_DEFAULT, LVL_ NOTE, "portrng_empty()");162 log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_empty()"); 163 163 return list_empty(&pr->used); 164 164 } -
uspace/srv/net/tcp/conn.c
r5a5b087 rc3f7d37 273 273 fibril_mutex_lock(&conn_list_lock); 274 274 275 log_msg(LOG_DEFAULT, LVL_ NOTE, "tcp_conn_add: conn=%p", conn);275 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_add: conn=%p", conn); 276 276 277 277 rc = amap_insert(amap, &conn->ident, conn, af_allow_system, &aepp); … … 401 401 402 402 fibril_mutex_unlock(&conn_list_lock); 403 log_msg(LOG_DEFAULT, LVL_ NOTE, "tcp_conn_find_ref: got conn=%p",403 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_find_ref: got conn=%p", 404 404 conn); 405 405 return conn; … … 1187 1187 int rc; 1188 1188 1189 log_msg(LOG_DEFAULT, LVL_NOTE, "conn=%p", conn); 1190 log_msg(LOG_DEFAULT, LVL_NOTE, "conn->name=%p", conn->name); 1191 log_msg(LOG_DEFAULT, LVL_NOTE, "%s: tcp_conn_segment_arrived(%p)", 1189 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_segment_arrived(%p)", 1192 1190 conn->name, seg); 1193 1191 … … 1205 1203 inet_addr_is_any(&conn->ident.local.addr)) { 1206 1204 1207 log_msg(LOG_DEFAULT, LVL_ NOTE, "tcp_conn_segment_arrived: "1205 log_msg(LOG_DEFAULT, LVL_DEBUG2, "tcp_conn_segment_arrived: " 1208 1206 "Changing connection ID, updating amap."); 1209 1207 oldepp = conn->ident; -
uspace/srv/net/udp/assoc.c
r5a5b087 rc3f7d37 247 247 int rc; 248 248 249 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send(%p, %p, %p)",249 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send(%p, %p, %p)", 250 250 assoc, remote, msg); 251 251 … … 255 255 epp.remote = *remote; 256 256 257 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send - check addr any");257 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - check addr any"); 258 258 259 259 if ((inet_addr_is_any(&epp.remote.addr)) || … … 261 261 return EINVAL; 262 262 263 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send - check version");263 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - check version"); 264 264 265 265 if (epp.remote.addr.version != epp.local.addr.version) 266 266 return EINVAL; 267 267 268 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send - encode pdu");268 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - encode pdu"); 269 269 270 270 rc = udp_pdu_encode(&epp, msg, &pdu); … … 272 272 return ENOMEM; 273 273 274 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send - transmit");274 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - transmit"); 275 275 276 276 rc = udp_transmit_pdu(pdu); … … 280 280 return EIO; 281 281 282 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_send - success");282 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - success"); 283 283 return EOK; 284 284 } … … 293 293 udp_rcv_queue_entry_t *rqe; 294 294 295 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_recv()");295 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv()"); 296 296 297 297 fibril_mutex_lock(&assoc->lock); … … 307 307 } 308 308 309 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_recv() - got a message");309 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv() - got a message"); 310 310 link = list_first(&assoc->rcv_queue); 311 311 rqe = list_get_instance(link, udp_rcv_queue_entry_t, link); … … 329 329 int rc; 330 330 331 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_received(%p, %p)", repp, msg);331 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_received(%p, %p)", repp, msg); 332 332 333 333 assoc = udp_assoc_find_ref(repp); 334 334 if (assoc == NULL) { 335 log_msg(LOG_DEFAULT, LVL_ NOTE, "No association found. Message dropped.");335 log_msg(LOG_DEFAULT, LVL_DEBUG, "No association found. Message dropped."); 336 336 /* XXX Generate ICMP error. */ 337 337 /* XXX Might propagate error directly by error return. */ … … 348 348 } 349 349 350 log_msg(LOG_DEFAULT, LVL_ NOTE, "call assoc->cb->recv_msg");350 log_msg(LOG_DEFAULT, LVL_DEBUG, "call assoc->cb->recv_msg"); 351 351 assoc->cb->recv_msg(assoc->cb_arg, repp, msg); 352 352 udp_assoc_delref(assoc); … … 406 406 udp_assoc_t *assoc; 407 407 408 log_msg(LOG_DEFAULT, LVL_ NOTE, "udp_assoc_find_ref(%p)", epp);408 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_find_ref(%p)", epp); 409 409 fibril_mutex_lock(&assoc_list_lock); 410 410 -
uspace/srv/net/udp/udp_inet.c
r5a5b087 rc3f7d37 62 62 63 63 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_inet_ev_recv()"); 64 65 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_inet_ev_recv: link=%zu",66 dgram->iplink);67 64 68 65 pdu = udp_pdu_new();
Note:
See TracChangeset
for help on using the changeset viewer.