forked from KolibriOS/kolibrios
Added some stub functions to net_branch
git-svn-id: svn://kolibrios.org@1885 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a61ff47fb2
commit
d19fc735da
@ -57,9 +57,6 @@ virtual at IP_SOCKET.end
|
||||
.LocalPort dw ?
|
||||
.RemotePort dw ?
|
||||
|
||||
.OrigRemoteIP dd ? ; original remote IP address (used to reset to LISTEN state)
|
||||
.OrigRemotePort dw ? ; original remote port (used to reset to LISTEN state)
|
||||
|
||||
.t_state dd ? ; TCB state
|
||||
.t_rxtshift dd ?
|
||||
.t_rxtcur dd ?
|
||||
@ -1491,8 +1488,6 @@ SOCKET_fork:
|
||||
rep movsd
|
||||
|
||||
and [eax + SOCKET.options], not SO_ACCEPTCON
|
||||
|
||||
;;;;; call SOCKET_notify_owner
|
||||
pop edi ecx esi
|
||||
|
||||
ret
|
||||
@ -1625,7 +1620,7 @@ SOCKET_check_owner:
|
||||
|
||||
|
||||
|
||||
;---------------------------------------------------
|
||||
;------------------------------------------------------
|
||||
;
|
||||
; SOCKET_process_end
|
||||
;
|
||||
@ -1675,6 +1670,8 @@ SOCKET_process_end:
|
||||
|
||||
.tcp:
|
||||
|
||||
;;; TODO
|
||||
|
||||
jmp .next_socket
|
||||
|
||||
.done:
|
||||
@ -1685,6 +1682,43 @@ SOCKET_process_end:
|
||||
|
||||
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
;
|
||||
; SOCKET_is_connecting
|
||||
;
|
||||
; IN: eax = socket ptr
|
||||
; OUT: /
|
||||
;
|
||||
;-----------------------------------------------------------------
|
||||
|
||||
align 4
|
||||
SOCKET_is_connecting:
|
||||
|
||||
|
||||
and [eax + SOCKET.options], not (SS_ISCONNECTED + SS_ISDISCONNECTING + SS_ISCONFIRMING)
|
||||
or [eax + SOCKET.options], SS_ISCONNECTING
|
||||
|
||||
jmp SOCKET_notify_owner
|
||||
|
||||
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
;
|
||||
; SOCKET_is_connected
|
||||
;
|
||||
; IN: eax = socket ptr
|
||||
; OUT: /
|
||||
;
|
||||
;-----------------------------------------------------------------
|
||||
|
||||
align 4
|
||||
SOCKET_is_connected:
|
||||
|
||||
|
||||
and [eax + SOCKET.options], not (SS_ISCONNECTING + SS_ISDISCONNECTING + SS_ISCONFIRMING)
|
||||
or [eax + SOCKET.options], SS_ISCONNECTED
|
||||
|
||||
jmp SOCKET_notify_owner
|
||||
|
||||
|
||||
|
||||
@ -1738,13 +1772,15 @@ SOCKET_is_disconnected:
|
||||
align 4
|
||||
SOCKET_cant_recv_more:
|
||||
|
||||
or [eax + SOCKET.options], SS_CANTRCVMORE
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
;
|
||||
; SOCKET_is_connected
|
||||
; SOCKET_cant_send_more
|
||||
;
|
||||
; IN: eax = socket ptr
|
||||
; OUT: /
|
||||
@ -1752,10 +1788,8 @@ SOCKET_cant_recv_more:
|
||||
;-----------------------------------------------------------------
|
||||
|
||||
align 4
|
||||
SOCKET_is_connected:
|
||||
SOCKET_cant_send_more:
|
||||
|
||||
or [eax + SOCKET.options], SS_CANTSENDMORE
|
||||
|
||||
and [eax + SOCKET.options], not (SS_ISCONNECTING + SS_ISDISCONNECTING + SS_ISCONFIRMING)
|
||||
or [eax + SOCKET.options], SS_ISCONNECTED
|
||||
|
||||
jmp SOCKET_notify_owner
|
||||
ret
|
@ -60,7 +60,16 @@ SOCK_DGRAM equ 2
|
||||
SOCK_RAW equ 3
|
||||
|
||||
; Socket options
|
||||
SO_ACCEPTCON equ 1
|
||||
SO_ACCEPTCON equ 1 shl 0
|
||||
SO_BROADCAST equ 1 shl 1
|
||||
SO_DEBUG equ 1 shl 2
|
||||
SO_DONTROUTE equ 1 shl 3
|
||||
SO_KEEPALIVE equ 1 shl 4
|
||||
SO_OOBINLINE equ 1 shl 5
|
||||
SO_REUSEADDR equ 1 shl 6
|
||||
SO_REUSEPORT equ 1 shl 7
|
||||
SO_USELOOPBACK equ 1 shl 8
|
||||
|
||||
|
||||
; Socket States
|
||||
SS_NOFDREF equ 0x001 ; no file table ref any more
|
||||
|
@ -173,9 +173,7 @@ TCP_close:
|
||||
;;; TODO: update slow start threshold
|
||||
;;; TODO: release connection resources
|
||||
|
||||
; Now, mark the socket as being disconnected
|
||||
|
||||
mov [eax + SOCKET.state], 0 ;;; FIXME
|
||||
call SOCKET_is_disconnected
|
||||
|
||||
ret
|
||||
|
||||
|
@ -33,7 +33,7 @@ local .exit
|
||||
cmp [ebx + SOCKET.Domain], AF_INET4
|
||||
jne .loop
|
||||
|
||||
cmp [ebx + SOCKET.Protocol], IP_PROTO_TCP ;;; We should also check if family is AF_INET
|
||||
cmp [ebx + SOCKET.Protocol], IP_PROTO_TCP
|
||||
jne .loop
|
||||
|
||||
test [ebx + TCP_SOCKET.t_flags], TF_DELACK
|
||||
|
Loading…
Reference in New Issue
Block a user