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