Subversion Repositories Kolibri OS

Rev

Rev 3643 | Rev 3698 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3643 Rev 3647
Line 236... Line 236...
236
 
236
 
237
 
237
 
Line -... Line 238...
-
 
238
       .check_sockets:
-
 
239
        ; Look for an open ICMP socket
-
 
240
 
-
 
241
        pusha
-
 
242
        mov     ecx, socket_mutex
238
       .check_sockets:
243
        call    mutex_lock
239
        ; Look for an open ICMP socket
244
        popa
240
 
245
 
241
        mov     esi, [edi]              ; ipv4 source address
246
        mov     esi, [edi]              ; ipv4 source address
242
        mov     eax, net_sockets
247
        mov     eax, net_sockets
243
  .try_more:
248
  .try_more:
244
;        mov      , [edx + ICMP_header.Identifier]
249
;        mov      , [edx + ICMP_header.Identifier]
245
  .next_socket:
250
  .next_socket:
Line 246... Line 251...
246
        mov     eax, [eax + SOCKET.NextPtr]
251
        mov     eax, [eax + SOCKET.NextPtr]
247
        or      eax, eax
252
        or      eax, eax
Line 248... Line 253...
248
        jz      .dump
253
        jz      .dump_
Line 260... Line 265...
260
;        jne     .next_socket
265
;        jne     .next_socket
Line 261... Line 266...
261
 
266
 
262
; Update stats (and validate device ptr)
267
; Update stats (and validate device ptr)
263
        call    NET_ptr_to_num4
268
        call    NET_ptr_to_num4
264
        cmp     edi, -1
269
        cmp     edi, -1
265
        je      .dump
270
        je      .dump_
Line -... Line 271...
-
 
271
        inc     [ICMP_PACKETS_RX + edi]
-
 
272
 
-
 
273
        pusha
-
 
274
        mov     ecx, socket_mutex
-
 
275
        call    mutex_unlock
266
        inc     [ICMP_PACKETS_RX + edi]
276
        popa
Line 267... Line 277...
267
 
277
 
268
        DEBUGF  DEBUG_NETWORK_VERBOSE, "socket=%x\n", eax
278
        DEBUGF  DEBUG_NETWORK_VERBOSE, "socket=%x\n", eax
269
 
279
 
270
        pusha
280
        pusha
Line 271... Line 281...
271
        lea     ecx, [eax + SOCKET.mutex]
281
        lea     ecx, [eax + SOCKET.mutex]
272
        call    mutex_lock
282
        call    mutex_lock
Line -... Line 283...
-
 
283
        popa
-
 
284
 
-
 
285
        mov     esi, edx
-
 
286
        jmp     SOCKET_input
-
 
287
 
-
 
288
  .dump_:
-
 
289
 
-
 
290
        pusha
-
 
291
        mov     ecx, socket_mutex
-
 
292
        call    mutex_unlock
Line 273... Line 293...
273
        popa
293
        popa
274
 
294
 
Line 275... Line 295...
275
        mov     esi, edx
295
        DEBUGF  DEBUG_NETWORK_VERBOSE, "ICMP_input: no socket found\n"