Subversion Repositories Kolibri OS

Rev

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

Rev 2905 Rev 2995
Line 687... Line 687...
687
        mov     ecx, eax        ; put socketnum handle to ecx
687
        mov     ecx, eax        ; put socketnum handle to ecx
688
; 8b. Create sockaddr structure on the stack.
688
; 8b. Create sockaddr structure on the stack.
689
        push    0
689
        push    0
690
        push    0       ; sin_zero
690
        push    0       ; sin_zero
691
        push    esi     ; sin_addr
691
        push    esi     ; sin_addr
692
        push    AF_INET4 + (53 shl 16)
692
        push    AF_INET4 + (53 shl 24)
693
                        ; sin_family and sin_port in network byte order
693
                        ; sin_family and sin_port in network byte order
694
; 8c. Connect.
694
; 8c. Connect.
695
        mcall   75, 4, , esp, sizeof.sockaddr_in
695
        mcall   75, 4, , esp, sizeof.sockaddr_in
696
; 8d. Restore the stack, undo 8b.
696
; 8d. Restore the stack, undo 8b.
697
        add     esp, esi
697
        add     esp, esi
Line 1202... Line 1202...
1202
 
1202
 
1203
.set_port:
1203
.set_port:
1204
; Just copy port from input __gai_reqdata to output addrinfo.
1204
; Just copy port from input __gai_reqdata to output addrinfo.
1205
        push    edx
1205
        push    edx
1206
        mov     edx, [ebx+__gai_reqdata.service]
1206
        mov     edx, [ebx+__gai_reqdata.service]
1207
        xchg    dl, dh  ; convert to network byte order
1207
        xchg    dl, dh  ; convert to network byte order     ;;;;; CHECKME
1208
        mov     [edi+sizeof.addrinfo+sockaddr_in.sin_port], dx
1208
        mov     [edi+sizeof.addrinfo+sockaddr_in.sin_port], dx
1209
        pop     edx
1209
        pop     edx
Line 1210... Line 1210...
1210
        ret
1210
        ret