Subversion Repositories Kolibri OS

Rev

Rev 3555 | Rev 3626 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3555 Rev 3589
Line 13... Line 13...
13
;;         GNU GENERAL PUBLIC LICENSE                              ;;
13
;;         GNU GENERAL PUBLIC LICENSE                              ;;
14
;;          Version 2, June 1991                                   ;;
14
;;          Version 2, June 1991                                   ;;
15
;;                                                                 ;;
15
;;                                                                 ;;
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 17... Line 17...
17
 
17
 
Line 18... Line 18...
18
$Revision: 3555 $
18
$Revision: 3589 $
Line 19... Line 19...
19
 
19
 
Line 261... Line 261...
261
        dd      SOCKET_get_opt  ; 9
261
        dd      SOCKET_get_opt  ; 9
262
        dd      SOCKET_pair     ; 10
262
        dd      SOCKET_pair     ; 10
263
  .number = ($ - .table) / 4 - 1
263
  .number = ($ - .table) / 4 - 1
Line 264... Line 264...
264
 
264
 
265
s_error:
265
s_error:
266
        DEBUGF  2,"SOCKET: error\n"
266
        DEBUGF  DEBUG_NETWORK_ERROR, "SOCKET: error\n"
Line 267... Line 267...
267
        mov     dword [esp+32], -1
267
        mov     dword [esp+32], -1
Line 268... Line 268...
268
 
268
 
Line 279... Line 279...
279
;
279
;
280
;-----------------------------------------------------------------
280
;-----------------------------------------------------------------
281
align 4
281
align 4
282
SOCKET_open:
282
SOCKET_open:
Line 283... Line 283...
283
 
283
 
Line 284... Line 284...
284
        DEBUGF  2,"SOCKET_open: domain=%u type=%u protocol=%x ", ecx, edx, esi
284
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_open: domain=%u type=%u protocol=%x ", ecx, edx, esi
285
 
285
 
286
        push    ecx edx esi
286
        push    ecx edx esi
287
        call    SOCKET_alloc
287
        call    SOCKET_alloc
Line 288... Line 288...
288
        pop     esi edx ecx
288
        pop     esi edx ecx
289
        jz      s_error
289
        jz      s_error
Line 290... Line 290...
290
 
290
 
291
        mov     [esp+32], edi                   ; return socketnumber
291
        mov     [esp+32], edi                   ; return socketnumber
292
        DEBUGF  2,"socknum=%u\n", edi
292
        DEBUGF  DEBUG_NETWORK_VERBOSE, "socknum=%u\n", edi
293
 
293
 
Line 319... Line 319...
319
 
319
 
320
        cmp     esi, PPP_PROTO_ETHERNET
320
        cmp     esi, PPP_PROTO_ETHERNET
Line 321... Line 321...
321
        je      .pppoe
321
        je      .pppoe
322
 
322
 
323
  .no_ppp:
323
  .no_ppp:
Line 324... Line 324...
324
        DEBUGF  2,"Unknown socket family/protocol\n"
324
        DEBUGF  DEBUG_NETWORK_ERROR, "SOCKET_open: Unknown socket family/protocol\n"
325
        ret
325
        ret
326
 
326
 
Line 392... Line 392...
392
;
392
;
393
;-----------------------------------------------------------------
393
;-----------------------------------------------------------------
394
align 4
394
align 4
395
SOCKET_bind:
395
SOCKET_bind:
Line 396... Line 396...
396
 
396
 
Line 397... Line 397...
397
        DEBUGF  2,"SOCKET_bind: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
397
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_bind: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
398
 
398
 
Line 399... Line 399...
399
        call    SOCKET_num_to_ptr
399
        call    SOCKET_num_to_ptr
Line 442... Line 442...
442
 
442
 
443
        mov     bx, [edx + 2]                   ; Now fill in the local port if it's still available
443
        mov     bx, [edx + 2]                   ; Now fill in the local port if it's still available
444
        call    SOCKET_check_port
444
        call    SOCKET_check_port
Line 445... Line 445...
445
        jz      s_error                         ; ZF is set by socket_check_port, on error
445
        jz      s_error                         ; ZF is set by socket_check_port, on error
446
 
446
 
447
        DEBUGF  1,"SOCKET_bind: local ip=%u.%u.%u.%u\n",\
447
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_bind: local ip=%u.%u.%u.%u\n",\
Line 448... Line 448...
448
        [eax + IP_SOCKET.LocalIP + 0]:1,[eax + IP_SOCKET.LocalIP + 1]:1,\
448
        [eax + IP_SOCKET.LocalIP + 0]:1,[eax + IP_SOCKET.LocalIP + 1]:1,\
449
        [eax + IP_SOCKET.LocalIP + 2]:1,[eax + IP_SOCKET.LocalIP + 3]:1
449
        [eax + IP_SOCKET.LocalIP + 2]:1,[eax + IP_SOCKET.LocalIP + 3]:1
Line 465... Line 465...
465
;
465
;
466
;-----------------------------------------------------------------
466
;-----------------------------------------------------------------
467
align 4
467
align 4
468
SOCKET_connect:
468
SOCKET_connect:
Line 469... Line 469...
469
 
469
 
Line 470... Line 470...
470
        DEBUGF  2,"SOCKET_connect: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
470
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_connect: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
471
 
471
 
Line 472... Line 472...
472
        call    SOCKET_num_to_ptr
472
        call    SOCKET_num_to_ptr
Line 614... Line 614...
614
;
614
;
615
;-----------------------------------------------------------------
615
;-----------------------------------------------------------------
616
align 4
616
align 4
617
SOCKET_listen:
617
SOCKET_listen:
Line 618... Line 618...
618
 
618
 
Line 619... Line 619...
619
        DEBUGF  2,"SOCKET_listen: socknum=%u backlog=%u\n", ecx, edx
619
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_listen: socknum=%u backlog=%u\n", ecx, edx
620
 
620
 
Line 621... Line 621...
621
        call    SOCKET_num_to_ptr
621
        call    SOCKET_num_to_ptr
Line 666... Line 666...
666
;
666
;
667
;-----------------------------------------------------------------
667
;-----------------------------------------------------------------
668
align 4
668
align 4
669
SOCKET_accept:
669
SOCKET_accept:
Line 670... Line 670...
670
 
670
 
Line 671... Line 671...
671
        DEBUGF  2,"SOCKET_accept: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
671
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_accept: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
672
 
672
 
Line 673... Line 673...
673
        call    SOCKET_num_to_ptr
673
        call    SOCKET_num_to_ptr
Line 716... Line 716...
716
;
716
;
717
;-----------------------------------------------------------------
717
;-----------------------------------------------------------------
718
align 4
718
align 4
719
SOCKET_close:
719
SOCKET_close:
Line 720... Line 720...
720
 
720
 
Line 721... Line 721...
721
        DEBUGF  2,"SOCKET_close: socknum=%u\n", ecx
721
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_close: socknum=%u\n", ecx
722
 
722
 
Line 723... Line 723...
723
        call    SOCKET_num_to_ptr
723
        call    SOCKET_num_to_ptr
Line 765... Line 765...
765
;
765
;
766
;-----------------------------------------------------------------
766
;-----------------------------------------------------------------
767
align 4
767
align 4
768
SOCKET_receive:
768
SOCKET_receive:
Line 769... Line 769...
769
 
769
 
Line 770... Line 770...
770
        DEBUGF  2,"SOCKET_receive: socknum=%u bufaddr=%x buflength=%u flags=%x\n", ecx, edx, esi, edi
770
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_receive: socknum=%u bufaddr=%x buflength=%u flags=%x\n", ecx, edx, esi, edi
771
 
771
 
Line 772... Line 772...
772
        call    SOCKET_num_to_ptr
772
        call    SOCKET_num_to_ptr
-
 
773
        jz      s_error
-
 
774
 
-
 
775
        call    [eax + SOCKET.rcv_proc]
Line 773... Line 776...
773
        jz      s_error
776
 
774
 
777
        mov     [esp+32], eax
Line 775... Line 778...
775
        jmp     [eax + SOCKET.rcv_proc]
778
        ret
Line 776... Line 779...
776
 
779
 
777
 
780
 
Line 778... Line 781...
778
align 4
781
align 4
779
SOCKET_receive_dgram:
782
SOCKET_receive_dgram:
Line 780... Line 783...
780
 
783
 
781
        DEBUGF  1,"SOCKET_receive: DGRAM\n"
784
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_receive: DGRAM\n"
Line 782... Line 785...
782
 
785
 
783
        mov     ebx, esi
786
        mov     ebx, esi
Line -... Line 787...
-
 
787
        mov     edi, edx                                        ; addr to buffer
784
        mov     edi, edx                                        ; addr to buffer
788
 
785
 
789
  .loop:
786
  .loop:
790
        get_from_queue (eax + SOCKET_QUEUE_LOCATION), SOCKET_QUEUE_SIZE, sizeof.socket_queue_entry, .block      ; destroys esi and ecx
787
        get_from_queue (eax + SOCKET_QUEUE_LOCATION), SOCKET_QUEUE_SIZE, sizeof.socket_queue_entry, .block      ; destroys esi and ecx
-
 
Line 788... Line 791...
788
 
791
 
789
        mov     ecx, [esi + socket_queue_entry.data_size]
792
        mov     ecx, [esi + socket_queue_entry.data_size]
790
        DEBUGF  1,"SOCKET_receive: %u bytes data\n", ecx
793
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_receive: %u bytes data\n", ecx
791
 
794
 
Line 810... Line 813...
810
        jz      .nd
813
        jz      .nd
811
        rep     movsd
814
        rep     movsd
812
  .nd:
815
  .nd:
Line 813... Line 816...
813
 
816
 
-
 
817
        call    kernel_free                                     ; remove the packet
-
 
818
        pop     eax
814
        call    kernel_free                                     ; remove the packet
819
 
Line 815... Line 820...
815
        ret
820
        ret
Line 816... Line 821...
816
 
821
 
-
 
822
  .too_small:
817
  .too_small:
823
 
-
 
824
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_receive: Buffer too small\n"
Line 818... Line 825...
818
 
825
  .fail:
819
        DEBUGF  2,"SOCKET_receive: Buffer too small\n"
826
        mov     eax, -1
820
        jmp     s_error
827
        ret
Line 821... Line 828...
821
 
828
 
822
  .block:
829
  .block:
Line 844... Line 851...
844
        mov     [eax + SOCKET.rcv_proc], SOCKET_receive_stream
851
        mov     [eax + SOCKET.rcv_proc], SOCKET_receive_stream
Line 845... Line 852...
845
 
852
 
846
align 4
853
align 4
Line 847... Line 854...
847
SOCKET_receive_stream:
854
SOCKET_receive_stream:
Line 848... Line 855...
848
 
855
 
849
        DEBUGF  1,"SOCKET_receive: STREAM\n"
856
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_receive: STREAM\n"
850
 
857
 
851
        mov     ebx, edi
858
        mov     ebx, edi
Line 864... Line 871...
864
 
871
 
865
        add     eax, STREAM_SOCKET.rcv
872
        add     eax, STREAM_SOCKET.rcv
866
        call    SOCKET_ring_read
873
        call    SOCKET_ring_read
Line 867... Line 874...
867
        call    SOCKET_ring_free
874
        call    SOCKET_ring_free
868
 
875
 
Line 869... Line 876...
869
        mov     [esp+32], ecx                                   ; return number of bytes copied
876
        mov     eax, ecx                ; return number of bytes copied
870
        ret
877
        ret
871
 
-
 
872
  .peek:
878
 
Line 873... Line 879...
873
        mov     ecx, [eax + STREAM_SOCKET.rcv + RING_BUFFER.size]
879
  .peek:
874
        mov     [esp+32], ecx                                   ; return number of bytes available
880
        mov     eax, [eax + STREAM_SOCKET.rcv + RING_BUFFER.size]
875
        ret
881
        ret
Line 876... Line 882...
876
 
882
 
877
  .block:
883
  .block:
Line 878... Line 884...
878
        test    [eax + SOCKET.options], SO_NONBLOCK
884
        test    [eax + SOCKET.options], SO_NONBLOCK
-
 
885
        jnz     .return0
-
 
886
 
-
 
887
        call    SOCKET_block
879
        jnz     .return0
888
        jmp     .loop
-
 
889
 
-
 
890
  .return0:
-
 
891
        test    [eax + SOCKET.options], SS_CANTRCVMORE
-
 
892
        jz      .ok
880
 
893
 
881
        call    SOCKET_block
894
        xor     eax, eax
Line 882... Line 895...
882
        jmp     .loop
895
        dec     eax
883
 
896
        ret
Line 900... Line 913...
900
;
913
;
901
;-----------------------------------------------------------------
914
;-----------------------------------------------------------------
902
align 4
915
align 4
903
SOCKET_send:
916
SOCKET_send:
Line 904... Line 917...
904
 
917
 
Line 905... Line 918...
905
        DEBUGF  2,"SOCKET_send: socknum=%u data ptr=%x length=%u flags=%x\n", ecx, edx, esi, edi
918
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: socknum=%u data ptr=%x length=%u flags=%x\n", ecx, edx, esi, edi
906
 
919
 
Line 907... Line 920...
907
        call    SOCKET_num_to_ptr
920
        call    SOCKET_num_to_ptr
Line 914... Line 927...
914
 
927
 
915
 
928
 
Line 916... Line 929...
916
align 4
929
align 4
Line 917... Line 930...
917
SOCKET_send_udp:
930
SOCKET_send_udp:
918
 
931
 
919
        DEBUGF  1,"SOCKET_send: UDP\n"
932
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: UDP\n"
920
 
933
 
Line 926... Line 939...
926
 
939
 
927
 
940
 
Line 928... Line 941...
928
align 4
941
align 4
Line 929... Line 942...
929
SOCKET_send_tcp:
942
SOCKET_send_tcp:
930
 
943
 
931
        DEBUGF  1,"SOCKET_send: TCP\n"
944
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: TCP\n"
932
 
945
 
Line 942... Line 955...
942
 
955
 
943
 
956
 
Line 944... Line 957...
944
align 4
957
align 4
Line 945... Line 958...
945
SOCKET_send_ip:
958
SOCKET_send_ip:
946
 
959
 
947
        DEBUGF  1,"SOCKET_send: IPv4\n"
960
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: IPv4\n"
948
 
961
 
Line 954... Line 967...
954
 
967
 
955
 
968
 
Line 956... Line 969...
956
align 4
969
align 4
Line 957... Line 970...
957
SOCKET_send_icmp:
970
SOCKET_send_icmp:
958
 
971
 
959
        DEBUGF  1,"SOCKET_send: ICMP\n"
972
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: ICMP\n"
960
 
973
 
Line 966... Line 979...
966
 
979
 
967
 
980
 
Line 968... Line 981...
968
align 4
981
align 4
Line 969... Line 982...
969
SOCKET_send_pppoe:
982
SOCKET_send_pppoe:
970
 
983
 
Line 971... Line 984...
971
        DEBUGF  1,"SOCKET_send: PPPoE\n"
984
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: PPPoE\n"
Line 996... Line 1009...
996
        mov     [eax + SOCKET.snd_proc], SOCKET_send_local_
1009
        mov     [eax + SOCKET.snd_proc], SOCKET_send_local_
Line 997... Line 1010...
997
 
1010
 
998
align 4
1011
align 4
Line 999... Line 1012...
999
SOCKET_send_local_:
1012
SOCKET_send_local_:
Line 1000... Line 1013...
1000
 
1013
 
1001
        DEBUGF  1,"SOCKET_send: LOCAL\n"
1014
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_send: LOCAL\n"
1002
 
1015
 
1003
        ; get the other side's socket and check if it still exists
1016
        ; get the other side's socket and check if it still exists
Line 1035... Line 1048...
1035
;
1048
;
1036
;-----------------------------------------------------------------
1049
;-----------------------------------------------------------------
1037
align 4
1050
align 4
1038
SOCKET_get_opt:
1051
SOCKET_get_opt:
Line 1039... Line 1052...
1039
 
1052
 
Line 1040... Line 1053...
1040
        DEBUGF  2,"SOCKET_get_opt\n"
1053
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_get_opt\n"
1041
 
1054
 
Line 1042... Line 1055...
1042
        call    SOCKET_num_to_ptr
1055
        call    SOCKET_num_to_ptr
Line 1085... Line 1098...
1085
;
1098
;
1086
;-----------------------------------------------------------------
1099
;-----------------------------------------------------------------
1087
align 4
1100
align 4
1088
SOCKET_set_opt:
1101
SOCKET_set_opt:
Line 1089... Line 1102...
1089
 
1102
 
Line 1090... Line 1103...
1090
        DEBUGF  2,"SOCKET_set_opt\n"
1103
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_set_opt\n"
1091
 
1104
 
Line 1092... Line 1105...
1092
        call    SOCKET_num_to_ptr
1105
        call    SOCKET_num_to_ptr
Line 1114... Line 1127...
1114
        mov     edx, [NET_DRV_LIST + 4*edx]
1127
        mov     edx, [NET_DRV_LIST + 4*edx]
1115
        test    edx, edx
1128
        test    edx, edx
1116
        jz      s_error
1129
        jz      s_error
1117
        mov     [eax + SOCKET.device], edx
1130
        mov     [eax + SOCKET.device], edx
Line 1118... Line 1131...
1118
 
1131
 
Line 1119... Line 1132...
1119
        DEBUGF  1,"SOCKET_set_opt: Bound socket %x to device %x\n",eax, edx
1132
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_set_opt: Bound socket %x to device %x\n",eax, edx
1120
 
1133
 
Line 1121... Line 1134...
1121
        mov     dword [esp+32], 0       ; success!
1134
        mov     dword [esp+32], 0       ; success!
Line 1156... Line 1169...
1156
;
1169
;
1157
;-----------------------------------------------------------------
1170
;-----------------------------------------------------------------
1158
align 4
1171
align 4
1159
SOCKET_pair:
1172
SOCKET_pair:
Line 1160... Line 1173...
1160
 
1173
 
Line 1161... Line 1174...
1161
        DEBUGF  2,"SOCKET_pair\n"
1174
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_pair\n"
1162
 
1175
 
1163
        call    SOCKET_alloc
1176
        call    SOCKET_alloc
Line 1215... Line 1228...
1215
;  OUT: -1 on error
1228
;  OUT: -1 on error
1216
;-----------------------------------------------------------------
1229
;-----------------------------------------------------------------
1217
align 4
1230
align 4
1218
SOCKET_debug:
1231
SOCKET_debug:
Line 1219... Line 1232...
1219
 
1232
 
Line 1220... Line 1233...
1220
        DEBUGF  1,"SOCKET_debug\n"
1233
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_debug\n"
Line 1221... Line 1234...
1221
 
1234
 
1222
        mov     edi, edx
1235
        mov     edi, edx
Line 1264... Line 1277...
1264
;
1277
;
1265
;-----------------------------------------------------------------
1278
;-----------------------------------------------------------------
1266
align 4
1279
align 4
1267
SOCKET_find_port:
1280
SOCKET_find_port:
Line 1268... Line 1281...
1268
 
1281
 
Line 1269... Line 1282...
1269
        DEBUGF  2,"SOCKET_find_port\n"
1282
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_find_port\n"
Line 1270... Line 1283...
1270
 
1283
 
1271
        push    ebx esi ecx
1284
        push    ebx esi ecx
Line 1325... Line 1338...
1325
;
1338
;
1326
;-----------------------------------------------------------------
1339
;-----------------------------------------------------------------
1327
align 4
1340
align 4
1328
SOCKET_check_port:
1341
SOCKET_check_port:
Line 1329... Line 1342...
1329
 
1342
 
Line 1330... Line 1343...
1330
        DEBUGF  2,"SOCKET_check_port: "
1343
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_check_port: "
1331
 
1344
 
1332
        mov     ecx, [eax + SOCKET.Protocol]
1345
        mov     ecx, [eax + SOCKET.Protocol]
Line 1345... Line 1358...
1345
        jne     .next_socket
1358
        jne     .next_socket
Line 1346... Line 1359...
1346
 
1359
 
1347
        cmp     [esi + UDP_SOCKET.LocalPort], bx
1360
        cmp     [esi + UDP_SOCKET.LocalPort], bx
Line 1348... Line 1361...
1348
        jne     .next_socket
1361
        jne     .next_socket
1349
 
1362
 
Line 1350... Line 1363...
1350
        DEBUGF  2,"local port %x already in use\n", bx  ; FIXME: find a way to print big endian values with debugf
1363
        DEBUGF  DEBUG_NETWORK_VERBOSE, "local port %x already in use\n", bx  ; FIXME: find a way to print big endian values with debugf
1351
        ret
1364
        ret
1352
 
1365
 
1353
  .port_ok:
1366
  .port_ok:
1354
        DEBUGF  2,"local port %x is free\n", bx         ; FIXME: find a way to print big endian values with debugf
1367
        DEBUGF  DEBUG_NETWORK_VERBOSE, "local port %x is free\n", bx         ; FIXME: find a way to print big endian values with debugf
Line 1376... Line 1389...
1376
;
1389
;
1377
;-----------------------------------------------------------------
1390
;-----------------------------------------------------------------
1378
align 4
1391
align 4
1379
SOCKET_input:
1392
SOCKET_input:
Line 1380... Line 1393...
1380
 
1393
 
Line 1381... Line 1394...
1381
        DEBUGF  2,"SOCKET_input: socket=%x, data=%x size=%u\n", eax, esi, ecx
1394
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_input: socket=%x, data=%x size=%u\n", eax, esi, ecx
1382
 
1395
 
1383
        mov     [esp+4], ecx
1396
        mov     [esp+4], ecx
Line 1384... Line 1397...
1384
        push    esi
1397
        push    esi
Line 1385... Line 1398...
1385
        mov     esi, esp
1398
        mov     esi, esp
1386
 
1399
 
Line 1387... Line 1400...
1387
        add_to_queue (eax + SOCKET_QUEUE_LOCATION), SOCKET_QUEUE_SIZE, sizeof.socket_queue_entry, SOCKET_input.full
1400
        add_to_queue (eax + SOCKET_QUEUE_LOCATION), SOCKET_QUEUE_SIZE, sizeof.socket_queue_entry, SOCKET_input.full
1388
 
1401
 
1389
        DEBUGF  1,"SOCKET_input: success\n"
1402
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_input: success\n"
1390
        add     esp, sizeof.socket_queue_entry
1403
        add     esp, sizeof.socket_queue_entry
Line 1391... Line 1404...
1391
 
1404
 
Line 1392... Line 1405...
1392
        pusha
1405
        pusha
1393
        lea     ecx, [eax + SOCKET.mutex]
1406
        lea     ecx, [eax + SOCKET.mutex]
Line 1394... Line 1407...
1394
        call    mutex_unlock
1407
        call    mutex_unlock
1395
        popa
1408
        popa
1396
 
1409
 
1397
        jmp     SOCKET_notify
1410
        jmp     SOCKET_notify
Line 1422... Line 1435...
1422
 
1435
 
1423
        push    edx
1436
        push    edx
1424
        stdcall create_ring_buffer, SOCKET_MAXDATA, PG_SW
1437
        stdcall create_ring_buffer, SOCKET_MAXDATA, PG_SW
Line 1425... Line 1438...
1425
        pop     edx
1438
        pop     edx
Line 1426... Line 1439...
1426
 
1439
 
1427
        DEBUGF  1,"SOCKET_ring_created: %x\n", eax
1440
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_created: %x\n", eax
1428
 
1441
 
1429
        pusha
1442
        pusha
Line 1456... Line 1469...
1456
;
1469
;
1457
;-----------------------------------------------------------------
1470
;-----------------------------------------------------------------
1458
align 4
1471
align 4
1459
SOCKET_ring_write:
1472
SOCKET_ring_write:
Line 1460... Line 1473...
1460
 
1473
 
Line 1461... Line 1474...
1461
        DEBUGF  1,"SOCKET_ring_write: ringbuff=%x ptr=%x size=%u\n", eax, esi, ecx
1474
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_write: ringbuff=%x ptr=%x size=%u\n", eax, esi, ecx
1462
 
1475
 
1463
; lock mutex
1476
; lock mutex
1464
        pusha
1477
        pusha
Line 1472... Line 1485...
1472
        cmp     ecx, edi
1485
        cmp     ecx, edi
1473
        jbe     .copy
1486
        jbe     .copy
1474
        mov     ecx, edi
1487
        mov     ecx, edi
1475
  .copy:
1488
  .copy:
1476
        mov     edi, [eax + RING_BUFFER.write_ptr]
1489
        mov     edi, [eax + RING_BUFFER.write_ptr]
1477
        DEBUGF  2,"SOCKET_ring_write: %u bytes from %x to %x\n", ecx, esi, edi
1490
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_write: %u bytes from %x to %x\n", ecx, esi, edi
Line 1478... Line 1491...
1478
 
1491
 
1479
; update write ptr
1492
; update write ptr
1480
        push    edi
1493
        push    edi
1481
        add     edi, ecx
1494
        add     edi, ecx
Line 1530... Line 1543...
1530
;
1543
;
1531
;-----------------------------------------------------------------
1544
;-----------------------------------------------------------------
1532
align 4
1545
align 4
1533
SOCKET_ring_read:
1546
SOCKET_ring_read:
Line 1534... Line 1547...
1534
 
1547
 
Line 1535... Line 1548...
1535
        DEBUGF  1,"SOCKET_ring_read: ringbuff=%x ptr=%x size=%u offset=%x\n", eax, edi, ecx, edx
1548
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_read: ringbuff=%x ptr=%x size=%u offset=%x\n", eax, edi, ecx, edx
1536
 
1549
 
1537
        pusha
1550
        pusha
1538
        lea     ecx, [eax + RING_BUFFER.mutex]
1551
        lea     ecx, [eax + RING_BUFFER.mutex]
Line 1553... Line 1566...
1553
 
1566
 
1554
        cmp     ecx, edx
1567
        cmp     ecx, edx
Line 1555... Line 1568...
1555
        ja      .less_data
1568
        ja      .less_data
1556
 
1569
 
1557
  .copy:
1570
  .copy:
1558
        DEBUGF  2,"SOCKET_ring_read: %u bytes from %x to %x\n", ecx, esi, edi
1571
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_read: %u bytes from %x to %x\n", ecx, esi, edi
1559
        push    ecx
1572
        push    ecx
1560
        shr     ecx, 1
1573
        shr     ecx, 1
1561
        jnc     .nb
1574
        jnc     .nb
Line 1576... Line 1589...
1576
        pusha
1589
        pusha
1577
        lea     ecx, [eax + RING_BUFFER.mutex]
1590
        lea     ecx, [eax + RING_BUFFER.mutex]
1578
        call    mutex_unlock                                    ; TODO: check what registers this function actually destroys
1591
        call    mutex_unlock                                    ; TODO: check what registers this function actually destroys
1579
        popa
1592
        popa
Line 1580... Line 1593...
1580
 
1593
 
1581
        DEBUGF  1,"SOCKET_ring_read: no data at all!\n"
1594
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_read: no data at all!\n"
1582
        xor     ecx, ecx
1595
        xor     ecx, ecx
Line 1583... Line 1596...
1583
        ret
1596
        ret
1584
 
1597
 
Line 1600... Line 1613...
1600
;
1613
;
1601
;-----------------------------------------------------------------
1614
;-----------------------------------------------------------------
1602
align 4
1615
align 4
1603
SOCKET_ring_free:
1616
SOCKET_ring_free:
Line 1604... Line 1617...
1604
 
1617
 
Line 1605... Line 1618...
1605
        DEBUGF  1,"SOCKET_ring_free: %u bytes from ring %x\n", ecx, eax
1618
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_free: %u bytes from ring %x\n", ecx, eax
1606
 
1619
 
1607
        push    eax ecx
1620
        push    eax ecx
1608
        lea     ecx, [eax + RING_BUFFER.mutex]
1621
        lea     ecx, [eax + RING_BUFFER.mutex]
Line 1625... Line 1638...
1625
        pop     ecx eax
1638
        pop     ecx eax
Line 1626... Line 1639...
1626
 
1639
 
Line 1627... Line 1640...
1627
        ret
1640
        ret
1628
 
1641
 
1629
  .error:       ; we could free all available bytes, but that would be stupid, i guess..
1642
  .error:       ; we could free all available bytes, but that would be stupid, i guess..
Line 1630... Line 1643...
1630
        DEBUGF  1,"SOCKET_ring_free: buffer=%x error!\n", eax
1643
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ring_free: buffer=%x error!\n", eax
1631
        add     [eax + RING_BUFFER.size], ecx
1644
        add     [eax + RING_BUFFER.size], ecx
1632
 
1645
 
Line 1650... Line 1663...
1650
;
1663
;
1651
;-----------------------------------------------------------------
1664
;-----------------------------------------------------------------
1652
align 4
1665
align 4
1653
SOCKET_block:
1666
SOCKET_block:
Line 1654... Line 1667...
1654
 
1667
 
Line 1655... Line 1668...
1655
        DEBUGF  1,"SOCKET_block: %x\n", eax
1668
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_block: %x\n", eax
1656
 
1669
 
Line 1657... Line 1670...
1657
        pushf
1670
        pushf
Line 1665... Line 1678...
1665
        mov     edx, [TASK_BASE]
1678
        mov     edx, [TASK_BASE]
1666
        mov     [edx + TASKDATA.state], 1               ; Suspended
1679
        mov     [edx + TASKDATA.state], 1               ; Suspended
Line 1667... Line 1680...
1667
 
1680
 
1668
        ; Remember the thread ID so we can wake it up again
1681
        ; Remember the thread ID so we can wake it up again
1669
        mov     edx, [edx + TASKDATA.pid]
1682
        mov     edx, [edx + TASKDATA.pid]
1670
        DEBUGF  1,"SOCKET_block: suspending thread: %u\n", edx
1683
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_block: suspending thread: %u\n", edx
1671
        mov     [eax + SOCKET.TID], edx
1684
        mov     [eax + SOCKET.TID], edx
Line 1672... Line 1685...
1672
        pop     edx
1685
        pop     edx
1673
 
1686
 
Line 1674... Line 1687...
1674
        call    change_task
1687
        call    change_task
Line 1675... Line 1688...
1675
        popf
1688
        popf
Line 1676... Line 1689...
1676
 
1689
 
Line 1690... Line 1703...
1690
;
1703
;
1691
;-----------------------------------------------------------------
1704
;-----------------------------------------------------------------
1692
align 4
1705
align 4
1693
SOCKET_notify:
1706
SOCKET_notify:
Line 1694... Line 1707...
1694
 
1707
 
Line 1695... Line 1708...
1695
        DEBUGF  1,"SOCKET_notify: %x\n", eax
1708
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_notify: %x\n", eax
1696
 
1709
 
Line 1697... Line 1710...
1697
        call    SOCKET_check
1710
        call    SOCKET_check
Line 1726... Line 1739...
1726
 
1739
 
1727
  .found_pid:
1740
  .found_pid:
1728
        shl     ecx, 8
1741
        shl     ecx, 8
Line 1729... Line 1742...
1729
        or      [ecx + SLOT_BASE + APPDATA.event_mask], EVENT_NETWORK
1742
        or      [ecx + SLOT_BASE + APPDATA.event_mask], EVENT_NETWORK
Line 1730... Line 1743...
1730
 
1743
 
Line 1731... Line 1744...
1731
        DEBUGF  1,"SOCKET_notify: Raised a network event!\n"
1744
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_notify: Raised a network event!\n"
1732
 
1745
 
Line 1754... Line 1767...
1754
        jmp     .error
1767
        jmp     .error
1755
  .found:
1768
  .found:
Line 1756... Line 1769...
1756
 
1769
 
1757
        ; Run the thread
1770
        ; Run the thread
1758
        mov     [esi + TASKDATA.state], 0       ; Running
1771
        mov     [esi + TASKDATA.state], 0       ; Running
Line 1759... Line 1772...
1759
        DEBUGF  1,"SOCKET_notify: Unblocked socket!\n"
1772
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_notify: Unblocked socket!\n"
1760
 
1773
 
Line 1761... Line 1774...
1761
  .done:
1774
  .done:
Line 1783... Line 1796...
1783
SOCKET_alloc:
1796
SOCKET_alloc:
Line 1784... Line 1797...
1784
 
1797
 
Line 1785... Line 1798...
1785
        push    ebx
1798
        push    ebx
1786
 
1799
 
1787
        stdcall kernel_alloc, SOCKETBUFFSIZE
1800
        stdcall kernel_alloc, SOCKETBUFFSIZE
1788
        DEBUGF  1, "SOCKET_alloc: ptr=%x\n", eax
1801
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_alloc: ptr=%x\n", eax
Line 1789... Line 1802...
1789
        or      eax, eax
1802
        or      eax, eax
1790
        jz      .exit
1803
        jz      .exit
Line 1819... Line 1832...
1819
        jmp     .next_socket_number
1832
        jmp     .next_socket_number
Line 1820... Line 1833...
1820
 
1833
 
1821
  .last_socket:
1834
  .last_socket:
1822
        mov     [last_socket_num], edi
1835
        mov     [last_socket_num], edi
1823
        mov     [eax + SOCKET.Number], edi
1836
        mov     [eax + SOCKET.Number], edi
Line 1824... Line 1837...
1824
        DEBUGF  1, "SOCKET_alloc: number=%u\n", edi
1837
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_alloc: number=%u\n", edi
1825
 
1838
 
1826
; Fill in PID
1839
; Fill in PID
1827
        mov     ebx, [TASK_BASE]
1840
        mov     ebx, [TASK_BASE]
Line 1876... Line 1889...
1876
;
1889
;
1877
;----------------------------------------------------
1890
;----------------------------------------------------
1878
align 4
1891
align 4
1879
SOCKET_free:
1892
SOCKET_free:
Line 1880... Line 1893...
1880
 
1893
 
Line 1881... Line 1894...
1881
        DEBUGF  1, "SOCKET_free: %x\n", eax
1894
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_free: %x\n", eax
1882
 
1895
 
Line 1883... Line 1896...
1883
        call    SOCKET_check
1896
        call    SOCKET_check
Line 1904... Line 1917...
1904
 
1917
 
1905
        push    eax                             ; this will be passed to kernel_free
1918
        push    eax                             ; this will be passed to kernel_free
1906
        mov     ebx, [eax + SOCKET.NextPtr]
1919
        mov     ebx, [eax + SOCKET.NextPtr]
Line 1907... Line 1920...
1907
        mov     eax, [eax + SOCKET.PrevPtr]
1920
        mov     eax, [eax + SOCKET.PrevPtr]
Line 1908... Line 1921...
1908
 
1921
 
1909
        DEBUGF  1, "SOCKET_free: linking socket %x to socket %x\n", eax, ebx
1922
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_free: linking socket %x to socket %x\n", eax, ebx
1910
 
1923
 
1911
        test    eax, eax
1924
        test    eax, eax
Line 1919... Line 1932...
1919
       @@:
1932
       @@:
Line 1920... Line 1933...
1920
 
1933
 
1921
        call    kernel_free
1934
        call    kernel_free
Line 1922... Line 1935...
1922
        pop     ebx
1935
        pop     ebx
Line 1923... Line 1936...
1923
 
1936
 
1924
        DEBUGF  1, "SOCKET_free: success!\n"
1937
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_free: success!\n"
Line 1925... Line 1938...
1925
 
1938
 
Line 1937... Line 1950...
1937
;
1950
;
1938
;-----------------------------------
1951
;-----------------------------------
1939
align 4
1952
align 4
1940
SOCKET_fork:
1953
SOCKET_fork:
Line 1941... Line 1954...
1941
 
1954
 
Line 1942... Line 1955...
1942
        DEBUGF  1,"SOCKET_fork: %x\n", ebx
1955
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_fork: %x\n", ebx
1943
 
1956
 
1944
; Exit if backlog queue is full
1957
; Exit if backlog queue is full
1945
        mov     eax, [ebx + SOCKET_QUEUE_LOCATION + queue.size]
1958
        mov     eax, [ebx + SOCKET_QUEUE_LOCATION + queue.size]
Line 1969... Line 1982...
1969
        ret
1982
        ret
Line 1970... Line 1983...
1970
 
1983
 
1971
  .fail2:
1984
  .fail2:
1972
        add     esp, 4+4+4
1985
        add     esp, 4+4+4
1973
  .fail:
1986
  .fail:
1974
        DEBUGF  1,"SOCKET_fork: failed\n"
1987
        DEBUGF  DEBUG_NETWORK_ERROR, "SOCKET_fork: failed\n"
1975
        xor     eax, eax
1988
        xor     eax, eax
Line 1976... Line 1989...
1976
        ret
1989
        ret
Line 1988... Line 2001...
1988
;
2001
;
1989
;---------------------------------------------------
2002
;---------------------------------------------------
1990
align 4
2003
align 4
1991
SOCKET_num_to_ptr:
2004
SOCKET_num_to_ptr:
Line 1992... Line 2005...
1992
 
2005
 
Line 1993... Line 2006...
1993
        DEBUGF  1,"SOCKET_num_to_ptr: num=%u ", ecx
2006
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_num_to_ptr: num=%u ", ecx
Line 1994... Line 2007...
1994
 
2007
 
1995
        mov     eax, net_sockets
2008
        mov     eax, net_sockets
Line 2001... Line 2014...
2001
        cmp     [eax + SOCKET.Number], ecx
2014
        cmp     [eax + SOCKET.Number], ecx
2002
        jne     .next_socket
2015
        jne     .next_socket
Line 2003... Line 2016...
2003
 
2016
 
Line 2004... Line 2017...
2004
        test    eax, eax
2017
        test    eax, eax
2005
 
2018
 
Line 2006... Line 2019...
2006
        DEBUGF  1,"ptr=%x\n", eax
2019
        DEBUGF  DEBUG_NETWORK_VERBOSE, "ptr=%x\n", eax
2007
        ret
2020
        ret
2008
 
2021
 
Line 2009... Line 2022...
2009
  .error:
2022
  .error:
2010
        DEBUGF  1,"not found\n", eax
2023
        DEBUGF  DEBUG_NETWORK_ERROR, "SOCKET_nuto_ptr: not found\n", eax
Line 2023... Line 2036...
2023
;
2036
;
2024
;---------------------------------------------------
2037
;---------------------------------------------------
2025
align 4
2038
align 4
2026
SOCKET_ptr_to_num:
2039
SOCKET_ptr_to_num:
Line 2027... Line 2040...
2027
 
2040
 
Line 2028... Line 2041...
2028
        DEBUGF  1,"SOCKET_ptr_to_num: ptr=%x ", eax
2041
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_ptr_to_num: ptr=%x ", eax
2029
 
2042
 
Line 2030... Line 2043...
2030
        call    SOCKET_check
2043
        call    SOCKET_check
Line 2031... Line 2044...
2031
        jz      .error
2044
        jz      .error
2032
 
2045
 
Line 2033... Line 2046...
2033
        mov     eax, [eax + SOCKET.Number]
2046
        mov     eax, [eax + SOCKET.Number]
2034
 
2047
 
2035
        DEBUGF  1,"num=%u\n", eax
2048
        DEBUGF  DEBUG_NETWORK_VERBOSE, "num=%u\n", eax
Line 2036... Line 2049...
2036
        ret
2049
        ret
2037
 
2050
 
Line 2052... Line 2065...
2052
;
2065
;
2053
;---------------------------------------------------
2066
;---------------------------------------------------
2054
align 4
2067
align 4
2055
SOCKET_check:
2068
SOCKET_check:
Line 2056... Line 2069...
2056
 
2069
 
Line 2057... Line 2070...
2057
        DEBUGF  1,"SOCKET_check: %x\n", eax
2070
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_check: %x\n", eax
2058
 
2071
 
Line 2059... Line 2072...
2059
        push    ebx
2072
        push    ebx
Line 2086... Line 2099...
2086
;
2099
;
2087
;---------------------------------------------------
2100
;---------------------------------------------------
2088
align 4
2101
align 4
2089
SOCKET_check_owner:
2102
SOCKET_check_owner:
Line 2090... Line 2103...
2090
 
2103
 
Line 2091... Line 2104...
2091
        DEBUGF  1,"SOCKET_check_owner: %x\n", eax
2104
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_check_owner: %x\n", eax
2092
 
2105
 
2093
        push    ebx
2106
        push    ebx
2094
        mov     ebx, [TASK_BASE]
2107
        mov     ebx, [TASK_BASE]
Line 2114... Line 2127...
2114
;
2127
;
2115
;------------------------------------------------------
2128
;------------------------------------------------------
2116
align 4
2129
align 4
2117
SOCKET_process_end:
2130
SOCKET_process_end:
Line 2118... Line 2131...
2118
 
2131
 
Line 2119... Line 2132...
2119
        DEBUGF  1, "SOCKET_process_end: %x\n", edx
2132
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_process_end: %x\n", edx
2120
 
2133
 
Line 2121... Line 2134...
2121
        push    ebx
2134
        push    ebx
Line 2128... Line 2141...
2128
        jz      .done
2141
        jz      .done
Line 2129... Line 2142...
2129
 
2142
 
2130
        cmp     [ebx + SOCKET.PID], edx
2143
        cmp     [ebx + SOCKET.PID], edx
Line 2131... Line 2144...
2131
        jne     .next_socket
2144
        jne     .next_socket
Line 2132... Line 2145...
2132
 
2145
 
2133
        DEBUGF  1, "SOCKET_process_end: killing socket %x\n", ebx
2146
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_process_end: killing socket %x\n", ebx
2134
 
2147
 
2135
        mov     [ebx + SOCKET.PID], 0
2148
        mov     [ebx + SOCKET.PID], 0
Line 2158... Line 2171...
2158
;-----------------------------------------------------------------
2171
;-----------------------------------------------------------------
Line 2159... Line 2172...
2159
 
2172
 
2160
align 4
2173
align 4
Line 2161... Line 2174...
2161
SOCKET_is_connecting:
2174
SOCKET_is_connecting:
Line 2162... Line 2175...
2162
 
2175
 
2163
        DEBUGF  1,"SOCKET_is_connecting: %x\n", eax
2176
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_is_connecting: %x\n", eax
Line 2164... Line 2177...
2164
 
2177
 
Line 2179... Line 2192...
2179
;-----------------------------------------------------------------
2192
;-----------------------------------------------------------------
Line 2180... Line 2193...
2180
 
2193
 
2181
align 4
2194
align 4
Line 2182... Line 2195...
2182
SOCKET_is_connected:
2195
SOCKET_is_connected:
Line 2183... Line 2196...
2183
 
2196
 
2184
        DEBUGF  1,"SOCKET_is_connected: %x\n", eax
2197
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_is_connected: %x\n", eax
Line 2185... Line 2198...
2185
 
2198
 
Line 2201... Line 2214...
2201
;-----------------------------------------------------------------
2214
;-----------------------------------------------------------------
Line 2202... Line 2215...
2202
 
2215
 
2203
align 4
2216
align 4
Line 2204... Line 2217...
2204
SOCKET_is_disconnecting:
2217
SOCKET_is_disconnecting:
Line 2205... Line 2218...
2205
 
2218
 
2206
        DEBUGF  1,"SOCKET_is_disconnecting: %x\n", eax
2219
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_is_disconnecting: %x\n", eax
Line 2207... Line 2220...
2207
 
2220
 
Line 2222... Line 2235...
2222
;-----------------------------------------------------------------
2235
;-----------------------------------------------------------------
Line 2223... Line 2236...
2223
 
2236
 
2224
align 4
2237
align 4
Line 2225... Line 2238...
2225
SOCKET_is_disconnected:
2238
SOCKET_is_disconnected:
Line 2226... Line 2239...
2226
 
2239
 
2227
        DEBUGF  1,"SOCKET_is_disconnected: %x\n", eax
2240
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_is_disconnected: %x\n", eax
Line 2228... Line 2241...
2228
 
2241
 
Line 2255... Line 2268...
2255
;-----------------------------------------------------------------
2268
;-----------------------------------------------------------------
Line 2256... Line 2269...
2256
 
2269
 
2257
align 4
2270
align 4
Line 2258... Line 2271...
2258
SOCKET_cant_recv_more:
2271
SOCKET_cant_recv_more:
Line 2259... Line 2272...
2259
 
2272
 
Line -... Line 2273...
-
 
2273
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_cant_recv_more: %x\n", eax
-
 
2274
 
2260
        DEBUGF  1,"SOCKET_cant_recv_more: %x\n", eax
2275
        or      [eax + SOCKET.options], SS_CANTRCVMORE
Line 2261... Line 2276...
2261
 
2276
 
Line 2275... Line 2290...
2275
;-----------------------------------------------------------------
2290
;-----------------------------------------------------------------
Line 2276... Line 2291...
2276
 
2291
 
2277
align 4
2292
align 4
Line 2278... Line 2293...
2278
SOCKET_cant_send_more:
2293
SOCKET_cant_send_more:
Line 2279... Line 2294...
2279
 
2294
 
-
 
2295
        DEBUGF  DEBUG_NETWORK_VERBOSE, "SOCKET_cant_send_more: %x\n", eax
-
 
2296
 
-
 
2297
        or      [eax + SOCKET.options], SS_CANTSENDMORE
Line 2280... Line 2298...
2280
        DEBUGF  1,"SOCKET_cant_send_more: %x\n", eax
2298
        mov     [eax + SOCKET.snd_proc], s_error
2281
 
2299