Subversion Repositories Kolibri OS

Rev

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

Rev 3861 Rev 4030
Line 908... Line 908...
908
        xor     ax, ax  ;;; TODO: replace this with real code
908
        xor     ax, ax  ;;; TODO: replace this with real code
Line 909... Line 909...
909
 
909
 
Line -... Line 910...
-
 
910
        ret
-
 
911
 
-
 
912
 
-
 
913
;-----------------------------------------------------------------
-
 
914
;
-
 
915
; IPv4_connect
-
 
916
;
-
 
917
;   IN: eax = socket pointer
-
 
918
;  OUT: eax = 0 ok / -1 error
-
 
919
;       ebx = error code
-
 
920
;
-
 
921
;-------------------------
-
 
922
align 4
-
 
923
IPv4_connect:
-
 
924
 
-
 
925
        pusha
-
 
926
        lea     ecx, [eax + SOCKET.mutex]
-
 
927
        call    mutex_lock
-
 
928
        popa
-
 
929
 
-
 
930
; Fill in local IP
-
 
931
        cmp     [eax + IP_SOCKET.LocalIP], 0
-
 
932
        jne     @f
-
 
933
        push    [IP_LIST + 4]                                   ; FIXME: use correct local IP
-
 
934
        pop     [eax + IP_SOCKET.LocalIP]
-
 
935
 
-
 
936
; Fill in remote IP
-
 
937
        pushd   [edx + 4]
-
 
938
        pop     [eax + IP_SOCKET.RemoteIP]
-
 
939
 
-
 
940
        push    eax
-
 
941
        init_queue (eax + SOCKET_QUEUE_LOCATION)                ; Set up data receiving queue
-
 
942
        pop     eax
-
 
943
 
-
 
944
        lea     ecx, [eax + SOCKET.mutex]
-
 
945
        call    mutex_unlock
-
 
946
 
-
 
947
        xor     eax, eax
910
        ret
948
        ret
911
 
949
 
912
 
950
 
913
;---------------------------------------------------------------------------
951
;---------------------------------------------------------------------------
914
;
952
;