forked from KolibriOS/kolibrios
kernel: added struct sockaddr
git-svn-id: svn://kolibrios.org@9739 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c99afa0b60
commit
d9a3ea763b
@ -169,6 +169,15 @@ struct STREAM_SOCKET TCP_SOCKET
|
||||
|
||||
ends
|
||||
|
||||
struct sockaddr
|
||||
|
||||
family dw ? ; Address family
|
||||
port dw ? ; 16 bit TCP/UDP port number
|
||||
ip dd ? ; 32 bit IP address
|
||||
_zero rb 8 ; Not use, for align
|
||||
|
||||
ends
|
||||
|
||||
struct socket_queue_entry
|
||||
|
||||
data_ptr dd ?
|
||||
|
@ -305,6 +305,7 @@ udp_output:
|
||||
; udp_connect ;
|
||||
; ;
|
||||
; IN: eax = socket pointer ;
|
||||
; edx = pointer to sockaddr struct ;
|
||||
; ;
|
||||
; OUT: eax = 0 on success ;
|
||||
; eax = -1 on error ;
|
||||
@ -325,10 +326,10 @@ udp_connect:
|
||||
pop edx eax
|
||||
|
||||
; Fill in remote port and IP
|
||||
pushw [edx + 2]
|
||||
pop [eax + UDP_SOCKET.RemotePort]
|
||||
pushw [edx + sockaddr.port]
|
||||
popw [eax + UDP_SOCKET.RemotePort]
|
||||
|
||||
pushd [edx + 4]
|
||||
pushd [edx + sockaddr.ip]
|
||||
pop [eax + UDP_SOCKET.RemoteIP]
|
||||
|
||||
; Find route to host
|
||||
|
Loading…
Reference in New Issue
Block a user