Changes in uspace/srv/net/tcp/conn.c [69a93df7:a2e3ee6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/conn.c
r69a93df7 ra2e3ee6 36 36 37 37 #include <adt/list.h> 38 #include < bool.h>38 #include <stdbool.h> 39 39 #include <errno.h> 40 40 #include <io/log.h> … … 164 164 static void tcp_conn_free(tcp_conn_t *conn) 165 165 { 166 log_msg(L VL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn);166 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn); 167 167 tcp_tqueue_fini(&conn->retransmit); 168 168 … … 184 184 void tcp_conn_addref(tcp_conn_t *conn) 185 185 { 186 log_msg(L VL_DEBUG, "%s: tcp_conn_addref(%p)", conn->name, conn);186 log_msg(LOG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_addref(%p)", conn->name, conn); 187 187 atomic_inc(&conn->refcnt); 188 188 } … … 196 196 void tcp_conn_delref(tcp_conn_t *conn) 197 197 { 198 log_msg(L VL_DEBUG, "%s: tcp_conn_delref(%p)", conn->name, conn);198 log_msg(LOG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_delref(%p)", conn->name, conn); 199 199 200 200 if (atomic_predec(&conn->refcnt) == 0) … … 211 211 void tcp_conn_delete(tcp_conn_t *conn) 212 212 { 213 log_msg(L VL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn);213 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn); 214 214 215 215 assert(conn->deleted == false); … … 245 245 tcp_cstate_t old_state; 246 246 247 log_msg(L VL_DEBUG, "tcp_conn_state_set(%p)", conn);247 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set(%p)", conn); 248 248 249 249 old_state = conn->cstate; … … 253 253 /* Run user callback function */ 254 254 if (conn->cstate_cb != NULL) { 255 log_msg(L VL_DEBUG, "tcp_conn_state_set() - run user CB");255 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - run user CB"); 256 256 conn->cstate_cb(conn, conn->cstate_cb_arg); 257 257 } else { 258 log_msg(L VL_DEBUG, "tcp_conn_state_set() - no user CB");258 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - no user CB"); 259 259 } 260 260 … … 293 293 case st_syn_received: 294 294 case st_established: 295 log_msg(L VL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name);295 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name); 296 296 tcp_conn_state_set(conn, st_fin_wait_1); 297 297 break; 298 298 case st_close_wait: 299 log_msg(L VL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name);299 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name); 300 300 tcp_conn_state_set(conn, st_last_ack); 301 301 break; 302 302 default: 303 log_msg(L VL_ERROR, "%s: Connection state %d", conn->name,303 log_msg(LOG_DEFAULT, LVL_ERROR, "%s: Connection state %d", conn->name, 304 304 conn->cstate); 305 305 assert(false); … … 312 312 static bool tcp_socket_match(tcp_sock_t *sock, tcp_sock_t *patt) 313 313 { 314 log_msg(LVL_DEBUG, "tcp_socket_match(sock=(%x,%u), pat=(%x,%u))", 315 sock->addr.ipv4, sock->port, patt->addr.ipv4, patt->port); 316 317 if (patt->addr.ipv4 != TCP_IPV4_ANY && 318 patt->addr.ipv4 != sock->addr.ipv4) 314 if ((!inet_addr_is_any(&patt->addr)) && 315 (!inet_addr_compare(&patt->addr, &sock->addr))) 319 316 return false; 320 317 321 if ( patt->port != TCP_PORT_ANY&&322 patt->port != sock->port)318 if ((patt->port != TCP_PORT_ANY) && 319 (patt->port != sock->port)) 323 320 return false; 324 321 325 log_msg(L VL_DEBUG, " -> match");322 log_msg(LOG_DEFAULT, LVL_DEBUG2, " -> match"); 326 323 327 324 return true; … … 331 328 static bool tcp_sockpair_match(tcp_sockpair_t *sp, tcp_sockpair_t *pattern) 332 329 { 333 log_msg(L VL_DEBUG, "tcp_sockpair_match(%p, %p)", sp, pattern);330 log_msg(LOG_DEFAULT, LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern); 334 331 335 332 if (!tcp_socket_match(&sp->local, &pattern->local)) … … 353 350 tcp_conn_t *tcp_conn_find_ref(tcp_sockpair_t *sp) 354 351 { 355 log_msg(L VL_DEBUG, "tcp_conn_find_ref(%p)", sp);356 352 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_find_ref(%p)", sp); 353 357 354 fibril_mutex_lock(&conn_list_lock); 358 355 359 356 list_foreach(conn_list, link) { 360 357 tcp_conn_t *conn = list_get_instance(link, tcp_conn_t, link); 361 358 tcp_sockpair_t *csp = &conn->ident; 362 log_msg(LVL_DEBUG, "compare with conn (f:(%x,%u), l:(%x,%u))", 363 csp->foreign.addr.ipv4, csp->foreign.port, 364 csp->local.addr.ipv4, csp->local.port); 359 365 360 if (tcp_sockpair_match(sp, csp)) { 366 361 tcp_conn_addref(conn); … … 369 364 } 370 365 } 371 366 372 367 fibril_mutex_unlock(&conn_list_lock); 373 368 return NULL; … … 380 375 static void tcp_conn_reset(tcp_conn_t *conn) 381 376 { 382 log_msg(L VL_DEBUG, "%s: tcp_conn_reset()", conn->name);377 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_reset()", conn->name); 383 378 tcp_conn_state_set(conn, st_closed); 384 379 conn->reset = true; … … 398 393 { 399 394 /* TODO */ 400 log_msg(L VL_DEBUG, "%s: tcp_reset_signal()", conn->name);395 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_reset_signal()", conn->name); 401 396 } 402 397 … … 422 417 return true; 423 418 case st_closed: 424 log_msg(L VL_WARN, "state=%d", (int) conn->cstate);419 log_msg(LOG_DEFAULT, LVL_WARN, "state=%d", (int) conn->cstate); 425 420 assert(false); 426 421 } … … 436 431 static void tcp_conn_sa_listen(tcp_conn_t *conn, tcp_segment_t *seg) 437 432 { 438 log_msg(L VL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg);433 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg); 439 434 440 435 if ((seg->ctrl & CTL_RST) != 0) { 441 log_msg(L VL_DEBUG, "Ignoring incoming RST.");436 log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring incoming RST."); 442 437 return; 443 438 } 444 439 445 440 if ((seg->ctrl & CTL_ACK) != 0) { 446 log_msg(L VL_DEBUG, "Incoming ACK, send acceptable RST.");441 log_msg(LOG_DEFAULT, LVL_DEBUG, "Incoming ACK, send acceptable RST."); 447 442 tcp_reply_rst(&conn->ident, seg); 448 443 return; … … 450 445 451 446 if ((seg->ctrl & CTL_SYN) == 0) { 452 log_msg(L VL_DEBUG, "SYN not present. Ignoring segment.");453 return; 454 } 455 456 log_msg(L VL_DEBUG, "Got SYN, sending SYN, ACK.");447 log_msg(LOG_DEFAULT, LVL_DEBUG, "SYN not present. Ignoring segment."); 448 return; 449 } 450 451 log_msg(LOG_DEFAULT, LVL_DEBUG, "Got SYN, sending SYN, ACK."); 457 452 458 453 conn->rcv_nxt = seg->seq + 1; … … 460 455 461 456 462 log_msg(L VL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt);457 log_msg(LOG_DEFAULT, LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt); 463 458 464 459 if (seg->len > 1) 465 log_msg(L VL_WARN, "SYN combined with data, ignoring data.");460 log_msg(LOG_DEFAULT, LVL_WARN, "SYN combined with data, ignoring data."); 466 461 467 462 /* XXX select ISS */ … … 493 488 static void tcp_conn_sa_syn_sent(tcp_conn_t *conn, tcp_segment_t *seg) 494 489 { 495 log_msg(L VL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg);490 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg); 496 491 497 492 if ((seg->ctrl & CTL_ACK) != 0) { 498 log_msg(L VL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u",493 log_msg(LOG_DEFAULT, LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u", 499 494 conn->snd_una, seg->ack, conn->snd_nxt); 500 495 if (!seq_no_ack_acceptable(conn, seg->ack)) { 501 496 if ((seg->ctrl & CTL_RST) == 0) { 502 log_msg(L VL_WARN, "ACK not acceptable, send RST");497 log_msg(LOG_DEFAULT, LVL_WARN, "ACK not acceptable, send RST"); 503 498 tcp_reply_rst(&conn->ident, seg); 504 499 } else { 505 log_msg(L VL_WARN, "RST,ACK not acceptable, drop");500 log_msg(LOG_DEFAULT, LVL_WARN, "RST,ACK not acceptable, drop"); 506 501 } 507 502 return; … … 512 507 /* If we get here, we have either an acceptable ACK or no ACK */ 513 508 if ((seg->ctrl & CTL_ACK) != 0) { 514 log_msg(L VL_DEBUG, "%s: Connection reset. -> Closed",509 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Connection reset. -> Closed", 515 510 conn->name); 516 511 /* Reset connection */ … … 518 513 return; 519 514 } else { 520 log_msg(L VL_DEBUG, "%s: RST without ACK, drop",515 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: RST without ACK, drop", 521 516 conn->name); 522 517 return; … … 527 522 528 523 if ((seg->ctrl & CTL_SYN) == 0) { 529 log_msg(L VL_DEBUG, "No SYN bit, ignoring segment.");524 log_msg(LOG_DEFAULT, LVL_DEBUG, "No SYN bit, ignoring segment."); 530 525 return; 531 526 } … … 544 539 } 545 540 546 log_msg(L VL_DEBUG, "Sent SYN, got SYN.");541 log_msg(LOG_DEFAULT, LVL_DEBUG, "Sent SYN, got SYN."); 547 542 548 543 /* … … 551 546 * will always be accepted as new window setting. 552 547 */ 553 log_msg(L VL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", "548 log_msg(LOG_DEFAULT, LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", " 554 549 "SND.WL2 = %" PRIu32, seg->wnd, seg->seq, seg->seq); 555 550 conn->snd_wnd = seg->wnd; … … 558 553 559 554 if (seq_no_syn_acked(conn)) { 560 log_msg(L VL_DEBUG, "%s: syn acked -> Established", conn->name);555 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn acked -> Established", conn->name); 561 556 tcp_conn_state_set(conn, st_established); 562 557 tcp_tqueue_ctrl_seg(conn, CTL_ACK /* XXX */); 563 558 } else { 564 log_msg(L VL_DEBUG, "%s: syn not acked -> Syn-Received",559 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn not acked -> Syn-Received", 565 560 conn->name); 566 561 tcp_conn_state_set(conn, st_syn_received); … … 582 577 tcp_segment_t *pseg; 583 578 584 log_msg(L VL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg);579 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg); 585 580 586 581 /* Discard unacceptable segments ("old duplicates") */ 587 582 if (!seq_no_segment_acceptable(conn, seg)) { 588 log_msg(L VL_DEBUG, "Replying ACK to unacceptable segment.");583 log_msg(LOG_DEFAULT, LVL_DEBUG, "Replying ACK to unacceptable segment."); 589 584 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 590 585 tcp_segment_delete(seg); … … 682 677 assert(seq_no_in_rcv_wnd(conn, seg->seq)); 683 678 684 log_msg(L VL_WARN, "SYN is in receive window, should send reset. XXX");679 log_msg(LOG_DEFAULT, LVL_WARN, "SYN is in receive window, should send reset. XXX"); 685 680 686 681 /* … … 705 700 if (!seq_no_ack_acceptable(conn, seg->ack)) { 706 701 /* ACK is not acceptable, send RST. */ 707 log_msg(L VL_WARN, "Segment ACK not acceptable, sending RST.");702 log_msg(LOG_DEFAULT, LVL_WARN, "Segment ACK not acceptable, sending RST."); 708 703 tcp_reply_rst(&conn->ident, seg); 709 704 tcp_segment_delete(seg); … … 711 706 } 712 707 713 log_msg(L VL_DEBUG, "%s: SYN ACKed -> Established", conn->name);708 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name); 714 709 715 710 tcp_conn_state_set(conn, st_established); … … 730 725 static cproc_t tcp_conn_seg_proc_ack_est(tcp_conn_t *conn, tcp_segment_t *seg) 731 726 { 732 log_msg(L VL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg);733 734 log_msg(L VL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u",727 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg); 728 729 log_msg(LOG_DEFAULT, LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u", 735 730 (unsigned)seg->ack, (unsigned)conn->snd_una, 736 731 (unsigned)conn->snd_nxt); 737 732 738 733 if (!seq_no_ack_acceptable(conn, seg->ack)) { 739 log_msg(L VL_DEBUG, "ACK not acceptable.");734 log_msg(LOG_DEFAULT, LVL_DEBUG, "ACK not acceptable."); 740 735 if (!seq_no_ack_duplicate(conn, seg->ack)) { 741 log_msg(L VL_WARN, "Not acceptable, not duplicate. "736 log_msg(LOG_DEFAULT, LVL_WARN, "Not acceptable, not duplicate. " 742 737 "Send ACK and drop."); 743 738 /* Not acceptable, not duplicate. Send ACK and drop. */ … … 746 741 return cp_done; 747 742 } else { 748 log_msg(L VL_DEBUG, "Ignoring duplicate ACK.");743 log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring duplicate ACK."); 749 744 } 750 745 } else { … … 758 753 conn->snd_wl2 = seg->ack; 759 754 760 log_msg(L VL_DEBUG, "Updating send window, SND.WND=%" PRIu32755 log_msg(LOG_DEFAULT, LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32 761 756 ", SND.WL1=%" PRIu32 ", SND.WL2=%" PRIu32, 762 757 conn->snd_wnd, conn->snd_wl1, conn->snd_wl2); … … 785 780 786 781 if (conn->fin_is_acked) { 787 log_msg(L VL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name);782 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name); 788 783 tcp_conn_state_set(conn, st_fin_wait_2); 789 784 } … … 850 845 851 846 if (conn->fin_is_acked) { 852 log_msg(L VL_DEBUG, "%s: FIN acked -> Closed", conn->name);847 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Closed", conn->name); 853 848 tcp_conn_remove(conn); 854 849 tcp_conn_state_set(conn, st_closed); … … 881 876 static cproc_t tcp_conn_seg_proc_ack(tcp_conn_t *conn, tcp_segment_t *seg) 882 877 { 883 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",878 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)", 884 879 conn->name, conn, seg); 885 880 886 881 if ((seg->ctrl & CTL_ACK) == 0) { 887 log_msg(L VL_WARN, "Segment has no ACK. Dropping.");882 log_msg(LOG_DEFAULT, LVL_WARN, "Segment has no ACK. Dropping."); 888 883 tcp_segment_delete(seg); 889 884 return cp_done; … … 940 935 size_t xfer_size; 941 936 942 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",937 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)", 943 938 conn->name, conn, seg); 944 939 … … 982 977 fibril_condvar_broadcast(&conn->rcv_buf_cv); 983 978 984 log_msg(L VL_DEBUG, "Received %zu bytes of data.", xfer_size);979 log_msg(LOG_DEFAULT, LVL_DEBUG, "Received %zu bytes of data.", xfer_size); 985 980 986 981 /* Advance RCV.NXT */ … … 998 993 tcp_conn_trim_seg_to_wnd(conn, seg); 999 994 } else { 1000 log_msg(L VL_DEBUG, "%s: Nothing left in segment, dropping "1001 "(xfer_size=%zu, SEG.LEN=% zu, seg->ctrl=%u)",1002 conn->name, xfer_size, seg->len, (unsigned )seg->ctrl);995 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Nothing left in segment, dropping " 996 "(xfer_size=%zu, SEG.LEN=%" PRIu32 ", seg->ctrl=%u)", 997 conn->name, xfer_size, seg->len, (unsigned int) seg->ctrl); 1003 998 /* Nothing left in segment */ 1004 999 tcp_segment_delete(seg); … … 1018 1013 static cproc_t tcp_conn_seg_proc_fin(tcp_conn_t *conn, tcp_segment_t *seg) 1019 1014 { 1020 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",1015 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)", 1021 1016 conn->name, conn, seg); 1022 log_msg(L VL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,1017 log_msg(LOG_DEFAULT, LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len, 1023 1018 (unsigned) seg->ctrl); 1024 1019 1025 1020 /* Only process FIN if no text is left in segment. */ 1026 1021 if (tcp_segment_text_size(seg) == 0 && (seg->ctrl & CTL_FIN) != 0) { 1027 log_msg(L VL_DEBUG, " - FIN found in segment.");1022 log_msg(LOG_DEFAULT, LVL_DEBUG, " - FIN found in segment."); 1028 1023 1029 1024 /* Send ACK */ … … 1042 1037 case st_syn_received: 1043 1038 case st_established: 1044 log_msg(L VL_DEBUG, "%s: FIN received -> Close-Wait",1039 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Close-Wait", 1045 1040 conn->name); 1046 1041 tcp_conn_state_set(conn, st_close_wait); 1047 1042 break; 1048 1043 case st_fin_wait_1: 1049 log_msg(L VL_DEBUG, "%s: FIN received -> Closing",1044 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Closing", 1050 1045 conn->name); 1051 1046 tcp_conn_state_set(conn, st_closing); 1052 1047 break; 1053 1048 case st_fin_wait_2: 1054 log_msg(L VL_DEBUG, "%s: FIN received -> Time-Wait",1049 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Time-Wait", 1055 1050 conn->name); 1056 1051 tcp_conn_state_set(conn, st_time_wait); … … 1091 1086 static void tcp_conn_seg_process(tcp_conn_t *conn, tcp_segment_t *seg) 1092 1087 { 1093 log_msg(L VL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg);1088 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg); 1094 1089 tcp_segment_dump(seg); 1095 1090 … … 1097 1092 /* XXX Permit valid ACKs, URGs and RSTs */ 1098 1093 /* if (!seq_no_segment_acceptable(conn, seg)) { 1099 log_msg(L VL_WARN, "Segment not acceptable, dropping.");1094 log_msg(LOG_DEFAULT, LVL_WARN, "Segment not acceptable, dropping."); 1100 1095 if ((seg->ctrl & CTL_RST) == 0) { 1101 1096 tcp_tqueue_ctrl_seg(conn, CTL_ACK); … … 1131 1126 */ 1132 1127 if (seg->len > 0) { 1133 log_msg(L VL_DEBUG, "Re-insert segment %p. seg->len=%zu",1128 log_msg(LOG_DEFAULT, LVL_DEBUG, "Re-insert segment %p. seg->len=%zu", 1134 1129 seg, (size_t) seg->len); 1135 1130 tcp_iqueue_insert_seg(&conn->incoming, seg); … … 1146 1141 void tcp_conn_segment_arrived(tcp_conn_t *conn, tcp_segment_t *seg) 1147 1142 { 1148 log_msg(L VL_DEBUG, "%c: tcp_conn_segment_arrived(%p)",1143 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_segment_arrived(%p)", 1149 1144 conn->name, seg); 1150 1145 … … 1165 1160 tcp_conn_sa_queue(conn, seg); break; 1166 1161 case st_closed: 1167 log_msg(L VL_DEBUG, "state=%d", (int) conn->cstate);1162 log_msg(LOG_DEFAULT, LVL_DEBUG, "state=%d", (int) conn->cstate); 1168 1163 assert(false); 1169 1164 } … … 1178 1173 tcp_conn_t *conn = (tcp_conn_t *) arg; 1179 1174 1180 log_msg(L VL_DEBUG, "tw_timeout_func(%p)", conn);1175 log_msg(LOG_DEFAULT, LVL_DEBUG, "tw_timeout_func(%p)", conn); 1181 1176 1182 1177 fibril_mutex_lock(&conn->lock); 1183 1178 1184 1179 if (conn->cstate == st_closed) { 1185 log_msg(L VL_DEBUG, "Connection already closed.");1180 log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed."); 1186 1181 fibril_mutex_unlock(&conn->lock); 1187 1182 tcp_conn_delref(conn); … … 1189 1184 } 1190 1185 1191 log_msg(L VL_DEBUG, "%s: TW Timeout -> Closed", conn->name);1186 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name); 1192 1187 tcp_conn_remove(conn); 1193 1188 tcp_conn_state_set(conn, st_closed); … … 1240 1235 void tcp_unexpected_segment(tcp_sockpair_t *sp, tcp_segment_t *seg) 1241 1236 { 1242 log_msg(L VL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg);1237 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg); 1243 1238 1244 1239 if ((seg->ctrl & CTL_RST) == 0) … … 1268 1263 tcp_segment_t *rseg; 1269 1264 1270 log_msg(L VL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg);1265 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg); 1271 1266 1272 1267 rseg = tcp_segment_make_rst(seg);
Note:
See TracChangeset
for help on using the changeset viewer.