Hello,

Send_Info: DW AF_INET
DW 0 ; Port
DB 127, 0,0,1 ; IP
DB 8 DUP(0)

i wonder how i can insert a new ip to "Send_Info" do i have to write for ip and port single values and then copy them to "Send_Info" or what must i do ?

Thanks
Posted on 2002-07-01 06:06:22 by xanthos
i'm not exactly sure if this is what you mean but you could make a structure of what you have now to make it easier:

.data

send_info STRUCT
family dw ?
port dw ?
ip dd ?
data db 8 dup (?)
send_info ENDS

settings send_info<>

.code
;then you can change the info by doing:
mov settings.family, AF_INET
invoke inet_addr, addr NewIP
mov settings.ip, eax
invoke htons, NewPort
mov settings.port, ax
it makes it alot easier then doing:
invoke inet_addr, addr NewIP

mov dword ptr [Send_Info+4], eax
Posted on 2002-07-01 10:02:50 by savage