Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3636 → Rev 3635

/programs/network/zeroconf/zeroconf.asm
195,6 → 195,8
 
try_dhcp:
 
mov [tries], DHCP_TRIES
 
DEBUGF 1,"->Trying DHCP\n"
 
mcall 75, 0, AF_INET4, SOCK_DGRAM, 0 ; open socket (parameters: domain, type, reserved)
225,8 → 227,6
 
build_request: ; Creates a DHCP request packet.
 
mov [tries], DHCP_TRIES
 
DEBUGF 1,"->Building request\n"
 
stdcall mem.Alloc, BUFFER
275,9 → 275,9
cmp [dhcpMsgType], byte 0x01 ; Check which msg we are sending
jne request_options
 
mov [edx+240+21], byte 0xff ; end of options marker
mov [edx+240+21], byte 0xff ; "Discover" options
 
mov [dhcpMsgLen], 262 ; length
mov [dhcpMsgLen], dword 262 ; end of options marker
jmp send_dhcpmsg
 
request_options:
287,10 → 287,10
 
mov [edx+240+27], byte 0xff ; end of options marker
 
mov [dhcpMsgLen], 268 ; length
mov [dhcpMsgLen], dword 268
 
send_dhcpmsg:
DEBUGF 1,"Sending DHCP discover/request\n"
DEBUGF 1,"Sending DHCP request\n"
mcall 75, 6, [socketNum], [dhcpMsg], [dhcpMsgLen] ; write to socket ( send broadcast request )
mcall 23, TIMEOUT*100 ; wait for data
 
336,7 → 336,6
jmp link_local
 
send_request:
DEBUGF 1, "Got offer, making request\n"
mov [dhcpMsgType], 0x03 ; make it a request
jmp build_request
 
346,8 → 345,6
cmp [dhcpMsgType], 0x05 ; Was the response an ACK? It should be
jne read_data ; NO - read next packets
 
DEBUGF 1, "Got ACK, applying settings\n"
 
call dhcp_end
 
mov ebx, API_IPv4 + 3