Changes in uspace/srv/net/tcp/conn.c [f0a2720:f597bc4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/conn.c
rf0a2720 rf597bc4 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_DEBUG2, "%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_DEBUG2, "%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(L VL_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))", 315 315 sock->addr.ipv4, sock->port, patt->addr.ipv4, patt->port); 316 316 … … 323 323 return false; 324 324 325 log_msg(L VL_DEBUG2, " -> match");325 log_msg(LOG_DEFAULT, LVL_DEBUG2, " -> match"); 326 326 327 327 return true; … … 331 331 static bool tcp_sockpair_match(tcp_sockpair_t *sp, tcp_sockpair_t *pattern) 332 332 { 333 log_msg(L VL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern);333 log_msg(LOG_DEFAULT, LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern); 334 334 335 335 if (!tcp_socket_match(&sp->local, &pattern->local)) … … 353 353 tcp_conn_t *tcp_conn_find_ref(tcp_sockpair_t *sp) 354 354 { 355 log_msg(LVL_DEBUG, "tcp_conn_find_ref(%p)", sp); 356 355 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_find_ref(%p)", sp); 356 357 log_msg(LOG_DEFAULT, LVL_DEBUG2, "compare conn (f:(%x,%u), l:(%x,%u))", 358 sp->foreign.addr.ipv4, sp->foreign.port, 359 sp->local.addr.ipv4, sp->local.port); 360 357 361 fibril_mutex_lock(&conn_list_lock); 358 362 359 363 list_foreach(conn_list, link) { 360 364 tcp_conn_t *conn = list_get_instance(link, tcp_conn_t, link); 361 365 tcp_sockpair_t *csp = &conn->ident; 362 log_msg(LVL_DEBUG2, "compare with conn (f:(%x,%u), l:(%x,%u))", 366 367 log_msg(LOG_DEFAULT, LVL_DEBUG2, " - with (f:(%x,%u), l:(%x,%u))", 363 368 csp->foreign.addr.ipv4, csp->foreign.port, 364 369 csp->local.addr.ipv4, csp->local.port); 370 365 371 if (tcp_sockpair_match(sp, csp)) { 366 372 tcp_conn_addref(conn); … … 369 375 } 370 376 } 371 377 372 378 fibril_mutex_unlock(&conn_list_lock); 373 379 return NULL; … … 380 386 static void tcp_conn_reset(tcp_conn_t *conn) 381 387 { 382 log_msg(L VL_DEBUG, "%s: tcp_conn_reset()", conn->name);388 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_reset()", conn->name); 383 389 tcp_conn_state_set(conn, st_closed); 384 390 conn->reset = true; … … 398 404 { 399 405 /* TODO */ 400 log_msg(L VL_DEBUG, "%s: tcp_reset_signal()", conn->name);406 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_reset_signal()", conn->name); 401 407 } 402 408 … … 422 428 return true; 423 429 case st_closed: 424 log_msg(L VL_WARN, "state=%d", (int) conn->cstate);430 log_msg(LOG_DEFAULT, LVL_WARN, "state=%d", (int) conn->cstate); 425 431 assert(false); 426 432 } … … 436 442 static void tcp_conn_sa_listen(tcp_conn_t *conn, tcp_segment_t *seg) 437 443 { 438 log_msg(L VL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg);444 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg); 439 445 440 446 if ((seg->ctrl & CTL_RST) != 0) { 441 log_msg(L VL_DEBUG, "Ignoring incoming RST.");447 log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring incoming RST."); 442 448 return; 443 449 } 444 450 445 451 if ((seg->ctrl & CTL_ACK) != 0) { 446 log_msg(L VL_DEBUG, "Incoming ACK, send acceptable RST.");452 log_msg(LOG_DEFAULT, LVL_DEBUG, "Incoming ACK, send acceptable RST."); 447 453 tcp_reply_rst(&conn->ident, seg); 448 454 return; … … 450 456 451 457 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.");458 log_msg(LOG_DEFAULT, LVL_DEBUG, "SYN not present. Ignoring segment."); 459 return; 460 } 461 462 log_msg(LOG_DEFAULT, LVL_DEBUG, "Got SYN, sending SYN, ACK."); 457 463 458 464 conn->rcv_nxt = seg->seq + 1; … … 460 466 461 467 462 log_msg(L VL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt);468 log_msg(LOG_DEFAULT, LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt); 463 469 464 470 if (seg->len > 1) 465 log_msg(L VL_WARN, "SYN combined with data, ignoring data.");471 log_msg(LOG_DEFAULT, LVL_WARN, "SYN combined with data, ignoring data."); 466 472 467 473 /* XXX select ISS */ … … 493 499 static void tcp_conn_sa_syn_sent(tcp_conn_t *conn, tcp_segment_t *seg) 494 500 { 495 log_msg(L VL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg);501 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg); 496 502 497 503 if ((seg->ctrl & CTL_ACK) != 0) { 498 log_msg(L VL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u",504 log_msg(LOG_DEFAULT, LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u", 499 505 conn->snd_una, seg->ack, conn->snd_nxt); 500 506 if (!seq_no_ack_acceptable(conn, seg->ack)) { 501 507 if ((seg->ctrl & CTL_RST) == 0) { 502 log_msg(L VL_WARN, "ACK not acceptable, send RST");508 log_msg(LOG_DEFAULT, LVL_WARN, "ACK not acceptable, send RST"); 503 509 tcp_reply_rst(&conn->ident, seg); 504 510 } else { 505 log_msg(L VL_WARN, "RST,ACK not acceptable, drop");511 log_msg(LOG_DEFAULT, LVL_WARN, "RST,ACK not acceptable, drop"); 506 512 } 507 513 return; … … 512 518 /* If we get here, we have either an acceptable ACK or no ACK */ 513 519 if ((seg->ctrl & CTL_ACK) != 0) { 514 log_msg(L VL_DEBUG, "%s: Connection reset. -> Closed",520 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Connection reset. -> Closed", 515 521 conn->name); 516 522 /* Reset connection */ … … 518 524 return; 519 525 } else { 520 log_msg(L VL_DEBUG, "%s: RST without ACK, drop",526 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: RST without ACK, drop", 521 527 conn->name); 522 528 return; … … 527 533 528 534 if ((seg->ctrl & CTL_SYN) == 0) { 529 log_msg(L VL_DEBUG, "No SYN bit, ignoring segment.");535 log_msg(LOG_DEFAULT, LVL_DEBUG, "No SYN bit, ignoring segment."); 530 536 return; 531 537 } … … 544 550 } 545 551 546 log_msg(L VL_DEBUG, "Sent SYN, got SYN.");552 log_msg(LOG_DEFAULT, LVL_DEBUG, "Sent SYN, got SYN."); 547 553 548 554 /* … … 551 557 * will always be accepted as new window setting. 552 558 */ 553 log_msg(L VL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", "559 log_msg(LOG_DEFAULT, LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", " 554 560 "SND.WL2 = %" PRIu32, seg->wnd, seg->seq, seg->seq); 555 561 conn->snd_wnd = seg->wnd; … … 558 564 559 565 if (seq_no_syn_acked(conn)) { 560 log_msg(L VL_DEBUG, "%s: syn acked -> Established", conn->name);566 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn acked -> Established", conn->name); 561 567 tcp_conn_state_set(conn, st_established); 562 568 tcp_tqueue_ctrl_seg(conn, CTL_ACK /* XXX */); 563 569 } else { 564 log_msg(L VL_DEBUG, "%s: syn not acked -> Syn-Received",570 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: syn not acked -> Syn-Received", 565 571 conn->name); 566 572 tcp_conn_state_set(conn, st_syn_received); … … 582 588 tcp_segment_t *pseg; 583 589 584 log_msg(L VL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg);590 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg); 585 591 586 592 /* Discard unacceptable segments ("old duplicates") */ 587 593 if (!seq_no_segment_acceptable(conn, seg)) { 588 log_msg(L VL_DEBUG, "Replying ACK to unacceptable segment.");594 log_msg(LOG_DEFAULT, LVL_DEBUG, "Replying ACK to unacceptable segment."); 589 595 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 590 596 tcp_segment_delete(seg); … … 682 688 assert(seq_no_in_rcv_wnd(conn, seg->seq)); 683 689 684 log_msg(L VL_WARN, "SYN is in receive window, should send reset. XXX");690 log_msg(LOG_DEFAULT, LVL_WARN, "SYN is in receive window, should send reset. XXX"); 685 691 686 692 /* … … 705 711 if (!seq_no_ack_acceptable(conn, seg->ack)) { 706 712 /* ACK is not acceptable, send RST. */ 707 log_msg(L VL_WARN, "Segment ACK not acceptable, sending RST.");713 log_msg(LOG_DEFAULT, LVL_WARN, "Segment ACK not acceptable, sending RST."); 708 714 tcp_reply_rst(&conn->ident, seg); 709 715 tcp_segment_delete(seg); … … 711 717 } 712 718 713 log_msg(L VL_DEBUG, "%s: SYN ACKed -> Established", conn->name);719 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name); 714 720 715 721 tcp_conn_state_set(conn, st_established); … … 730 736 static cproc_t tcp_conn_seg_proc_ack_est(tcp_conn_t *conn, tcp_segment_t *seg) 731 737 { 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",738 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg); 739 740 log_msg(LOG_DEFAULT, LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u", 735 741 (unsigned)seg->ack, (unsigned)conn->snd_una, 736 742 (unsigned)conn->snd_nxt); 737 743 738 744 if (!seq_no_ack_acceptable(conn, seg->ack)) { 739 log_msg(L VL_DEBUG, "ACK not acceptable.");745 log_msg(LOG_DEFAULT, LVL_DEBUG, "ACK not acceptable."); 740 746 if (!seq_no_ack_duplicate(conn, seg->ack)) { 741 log_msg(L VL_WARN, "Not acceptable, not duplicate. "747 log_msg(LOG_DEFAULT, LVL_WARN, "Not acceptable, not duplicate. " 742 748 "Send ACK and drop."); 743 749 /* Not acceptable, not duplicate. Send ACK and drop. */ … … 746 752 return cp_done; 747 753 } else { 748 log_msg(L VL_DEBUG, "Ignoring duplicate ACK.");754 log_msg(LOG_DEFAULT, LVL_DEBUG, "Ignoring duplicate ACK."); 749 755 } 750 756 } else { … … 758 764 conn->snd_wl2 = seg->ack; 759 765 760 log_msg(L VL_DEBUG, "Updating send window, SND.WND=%" PRIu32766 log_msg(LOG_DEFAULT, LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32 761 767 ", SND.WL1=%" PRIu32 ", SND.WL2=%" PRIu32, 762 768 conn->snd_wnd, conn->snd_wl1, conn->snd_wl2); … … 785 791 786 792 if (conn->fin_is_acked) { 787 log_msg(L VL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name);793 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name); 788 794 tcp_conn_state_set(conn, st_fin_wait_2); 789 795 } … … 850 856 851 857 if (conn->fin_is_acked) { 852 log_msg(L VL_DEBUG, "%s: FIN acked -> Closed", conn->name);858 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Closed", conn->name); 853 859 tcp_conn_remove(conn); 854 860 tcp_conn_state_set(conn, st_closed); … … 881 887 static cproc_t tcp_conn_seg_proc_ack(tcp_conn_t *conn, tcp_segment_t *seg) 882 888 { 883 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",889 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)", 884 890 conn->name, conn, seg); 885 891 886 892 if ((seg->ctrl & CTL_ACK) == 0) { 887 log_msg(L VL_WARN, "Segment has no ACK. Dropping.");893 log_msg(LOG_DEFAULT, LVL_WARN, "Segment has no ACK. Dropping."); 888 894 tcp_segment_delete(seg); 889 895 return cp_done; … … 940 946 size_t xfer_size; 941 947 942 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",948 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)", 943 949 conn->name, conn, seg); 944 950 … … 982 988 fibril_condvar_broadcast(&conn->rcv_buf_cv); 983 989 984 log_msg(L VL_DEBUG, "Received %zu bytes of data.", xfer_size);990 log_msg(LOG_DEFAULT, LVL_DEBUG, "Received %zu bytes of data.", xfer_size); 985 991 986 992 /* Advance RCV.NXT */ … … 998 1004 tcp_conn_trim_seg_to_wnd(conn, seg); 999 1005 } else { 1000 log_msg(L VL_DEBUG, "%s: Nothing left in segment, dropping "1006 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: Nothing left in segment, dropping " 1001 1007 "(xfer_size=%zu, SEG.LEN=%" PRIu32 ", seg->ctrl=%u)", 1002 1008 conn->name, xfer_size, seg->len, (unsigned int) seg->ctrl); … … 1018 1024 static cproc_t tcp_conn_seg_proc_fin(tcp_conn_t *conn, tcp_segment_t *seg) 1019 1025 { 1020 log_msg(L VL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",1026 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)", 1021 1027 conn->name, conn, seg); 1022 log_msg(L VL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,1028 log_msg(LOG_DEFAULT, LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len, 1023 1029 (unsigned) seg->ctrl); 1024 1030 1025 1031 /* Only process FIN if no text is left in segment. */ 1026 1032 if (tcp_segment_text_size(seg) == 0 && (seg->ctrl & CTL_FIN) != 0) { 1027 log_msg(L VL_DEBUG, " - FIN found in segment.");1033 log_msg(LOG_DEFAULT, LVL_DEBUG, " - FIN found in segment."); 1028 1034 1029 1035 /* Send ACK */ … … 1042 1048 case st_syn_received: 1043 1049 case st_established: 1044 log_msg(L VL_DEBUG, "%s: FIN received -> Close-Wait",1050 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Close-Wait", 1045 1051 conn->name); 1046 1052 tcp_conn_state_set(conn, st_close_wait); 1047 1053 break; 1048 1054 case st_fin_wait_1: 1049 log_msg(L VL_DEBUG, "%s: FIN received -> Closing",1055 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Closing", 1050 1056 conn->name); 1051 1057 tcp_conn_state_set(conn, st_closing); 1052 1058 break; 1053 1059 case st_fin_wait_2: 1054 log_msg(L VL_DEBUG, "%s: FIN received -> Time-Wait",1060 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Time-Wait", 1055 1061 conn->name); 1056 1062 tcp_conn_state_set(conn, st_time_wait); … … 1091 1097 static void tcp_conn_seg_process(tcp_conn_t *conn, tcp_segment_t *seg) 1092 1098 { 1093 log_msg(L VL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg);1099 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg); 1094 1100 tcp_segment_dump(seg); 1095 1101 … … 1097 1103 /* XXX Permit valid ACKs, URGs and RSTs */ 1098 1104 /* if (!seq_no_segment_acceptable(conn, seg)) { 1099 log_msg(L VL_WARN, "Segment not acceptable, dropping.");1105 log_msg(LOG_DEFAULT, LVL_WARN, "Segment not acceptable, dropping."); 1100 1106 if ((seg->ctrl & CTL_RST) == 0) { 1101 1107 tcp_tqueue_ctrl_seg(conn, CTL_ACK); … … 1131 1137 */ 1132 1138 if (seg->len > 0) { 1133 log_msg(L VL_DEBUG, "Re-insert segment %p. seg->len=%zu",1139 log_msg(LOG_DEFAULT, LVL_DEBUG, "Re-insert segment %p. seg->len=%zu", 1134 1140 seg, (size_t) seg->len); 1135 1141 tcp_iqueue_insert_seg(&conn->incoming, seg); … … 1146 1152 void tcp_conn_segment_arrived(tcp_conn_t *conn, tcp_segment_t *seg) 1147 1153 { 1148 log_msg(L VL_DEBUG, "%s: tcp_conn_segment_arrived(%p)",1154 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_segment_arrived(%p)", 1149 1155 conn->name, seg); 1150 1156 … … 1165 1171 tcp_conn_sa_queue(conn, seg); break; 1166 1172 case st_closed: 1167 log_msg(L VL_DEBUG, "state=%d", (int) conn->cstate);1173 log_msg(LOG_DEFAULT, LVL_DEBUG, "state=%d", (int) conn->cstate); 1168 1174 assert(false); 1169 1175 } … … 1178 1184 tcp_conn_t *conn = (tcp_conn_t *) arg; 1179 1185 1180 log_msg(L VL_DEBUG, "tw_timeout_func(%p)", conn);1186 log_msg(LOG_DEFAULT, LVL_DEBUG, "tw_timeout_func(%p)", conn); 1181 1187 1182 1188 fibril_mutex_lock(&conn->lock); 1183 1189 1184 1190 if (conn->cstate == st_closed) { 1185 log_msg(L VL_DEBUG, "Connection already closed.");1191 log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed."); 1186 1192 fibril_mutex_unlock(&conn->lock); 1187 1193 tcp_conn_delref(conn); … … 1189 1195 } 1190 1196 1191 log_msg(L VL_DEBUG, "%s: TW Timeout -> Closed", conn->name);1197 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name); 1192 1198 tcp_conn_remove(conn); 1193 1199 tcp_conn_state_set(conn, st_closed); … … 1240 1246 void tcp_unexpected_segment(tcp_sockpair_t *sp, tcp_segment_t *seg) 1241 1247 { 1242 log_msg(L VL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg);1248 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg); 1243 1249 1244 1250 if ((seg->ctrl & CTL_RST) == 0) … … 1268 1274 tcp_segment_t *rseg; 1269 1275 1270 log_msg(L VL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg);1276 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg); 1271 1277 1272 1278 rseg = tcp_segment_make_rst(seg);
Note:
See TracChangeset
for help on using the changeset viewer.