why inet_addr error, It seemed very easy
Posted on 2003-11-24 09:01:51 by whrcartoon


mov sin.sin_family, AF_INET
mov sin.sin_port, 0
;invoke htonl, INADDR_ANY
;mov sin.sin_addr, eax
;should be
mov sin.sin_addr, INADDR_ANY




mov sinServer.sin_port, 50h

if you intend to connect to server on port 50 you must use htons on the port numver and get the value in ax

You don't need to bind the socket to a local address unless you are creating a listening socket (allthough it is not a problem)
Posted on 2003-11-24 13:49:18 by ENF
Either that or go for the much easier rol ax,8 which is what htons does.

Fake
Posted on 2003-11-24 16:26:38 by Fake51
Thanks, now all rigths, another error: I lost the last "0", sServerIP db "127.0.0.1", 0
This is the real reason of inet_addr error
Posted on 2003-11-27 21:03:36 by whrcartoon