Rev 3626 | Rev 4423 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3626 | Rev 3725 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | push eax |
33 | push eax |
34 | lea ecx, [eax + SOCKET.mutex] |
34 | lea ecx, [eax + SOCKET.mutex] |
35 | call mutex_lock |
35 | call mutex_lock |
36 | pop eax |
36 | pop eax |
Line -... | Line 37... | ||
- | 37 | ||
- | 38 | DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_output: socket locked\n" |
|
37 | 39 | ||
38 | ; We'll detect the length of the data to be transmitted, and flags to be used |
40 | ; We'll detect the length of the data to be transmitted, and flags to be used |
39 | ; If there is some data, or any critical controls to send (SYN / RST), then transmit |
41 | ; If there is some data, or any critical controls to send (SYN / RST), then transmit |
Line 40... | Line 42... | ||
40 | ; Otherwise, investigate further |
42 | ; Otherwise, investigate further |
Line 214... | Line 216... | ||
214 | push ecx |
216 | push ecx |
215 | mov cl, [eax + TCP_SOCKET.RCV_SCALE] |
217 | mov cl, [eax + TCP_SOCKET.RCV_SCALE] |
216 | mov ebx, TCP_max_win |
218 | mov ebx, TCP_max_win |
217 | shl ebx, cl |
219 | shl ebx, cl |
218 | pop ecx |
220 | pop ecx |
- | 221 | ||
219 | cmp ebx, ecx |
222 | cmp ebx, ecx |
220 | jb @f |
223 | jb @f |
221 | mov ebx, ecx |
224 | mov ebx, ecx |
222 | @@: |
225 | @@: |
223 | sub ebx, [eax + TCP_SOCKET.RCV_ADV] |
226 | sub ebx, [eax + TCP_SOCKET.RCV_ADV] |
Line 547... | Line 550... | ||
547 | ; Ok, data sent! |
550 | ; Ok, data sent! |
Line 548... | Line 551... | ||
548 | 551 | ||
549 | pop ecx |
552 | pop ecx |
Line -... | Line 553... | ||
- | 553 | pop eax |
|
550 | pop eax |
554 | |
Line 551... | Line 555... | ||
551 | 555 | call NET_ptr_to_num4 |
|
552 | inc [TCP_segments_tx] ; FIXME: correct interface? |
556 | inc [TCP_segments_tx + edi] |
553 | 557 | ||
554 | ; update advertised receive window |
558 | ; update advertised receive window |
Line 568... | Line 572... | ||
568 | and [eax + TCP_SOCKET.t_flags], not (TF_ACKNOW + TF_DELACK) |
572 | and [eax + TCP_SOCKET.t_flags], not (TF_ACKNOW + TF_DELACK) |
Line 569... | Line 573... | ||
569 | 573 | ||
570 | ;-------------- |
574 | ;-------------- |
Line -... | Line 575... | ||
- | 575 | ; unlock socket |
|
- | 576 | ||
571 | ; unlock socket |
577 | DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_send: unlocking socket 0x%x\n", eax |
572 | 578 | ||
573 | push eax |
579 | push eax |
574 | lea ecx, [eax + SOCKET.mutex] |
580 | lea ecx, [eax + SOCKET.mutex] |
Line 604... | Line 610... | ||
604 | or eax, -1 |
610 | or eax, -1 |
605 | ret |
611 | ret |
Line 606... | Line 612... | ||
606 | 612 | ||
607 | 613 | ||
- | 614 | .send_error: |
|
Line 608... | Line 615... | ||
608 | .send_error: |
615 | add esp, 4 |
609 | add esp, 8 |
616 | pop eax |
Line 610... | Line 617... | ||
610 | 617 |