Subversion Repositories Kolibri OS

Rev

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

Rev 3725 Rev 3908
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved.    ;;
4
;; Distributed under terms of the GNU General Public License       ;;
4
;; Distributed under terms of the GNU General Public License       ;;
5
;;                                                                 ;;
5
;;                                                                 ;;
6
;;  IPv4.INC                                                       ;;
6
;;  IPv4.INC                                                       ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  Part of the TCP/IP network stack for KolibriOS                 ;;
8
;;  Part of the TCP/IP network stack for KolibriOS                 ;;
Line 303... Line 303...
303
        DEBUGF  DEBUG_NETWORK_VERBOSE, "IPv4_input: unknown protocol %u\n", al
303
        DEBUGF  DEBUG_NETWORK_VERBOSE, "IPv4_input: unknown protocol %u\n", al
Line 304... Line 304...
304
 
304
 
305
  .dump:
305
  .dump:
306
        DEBUGF  DEBUG_NETWORK_VERBOSE, "IPv4_input: dumping\n"
306
        DEBUGF  DEBUG_NETWORK_VERBOSE, "IPv4_input: dumping\n"
307
        inc     [IP_packets_dumped]                             ; FIXME: use correct interface
307
        inc     [IP_packets_dumped]                             ; FIXME: use correct interface
308
        call    kernel_free
308
        call    NET_packet_free
309
        add     esp, 4                                          ; pop (balance stack)
309
        add     esp, 4                                          ; pop (balance stack)
Line 310... Line 310...
310
        ret
310
        ret
Line 483... Line 483...
483
 
483
 
484
        push    eax
484
        push    eax
485
        push    edx                                                                     ; Push pointer to fragment onto stack
485
        push    edx                                                                     ; Push pointer to fragment onto stack
486
        mov     ebx, [edx + FRAGMENT_entry.Owner]                                       ; we need to remeber the owner, in case this is the last packet
486
        mov     ebx, [edx + FRAGMENT_entry.Owner]                                       ; we need to remeber the owner, in case this is the last packet
487
        mov     edx, [edx + FRAGMENT_entry.NextPtr]                                     ; Set edx to the next pointer
487
        mov     edx, [edx + FRAGMENT_entry.NextPtr]                                     ; Set edx to the next pointer
488
        call    kernel_free                                                             ; free the previous fragment buffer (this uses the value from stack)
488
        call    NET_packet_free                                                         ; free the previous fragment buffer (this uses the value from stack)
489
        pop     eax
489
        pop     eax
490
        cmp     edx, -1                                                                 ; Check if it is last fragment in chain
490
        cmp     edx, -1                                                                 ; Check if it is last fragment in chain
Line 491... Line 491...
491
        jne     .rebuild_packet_loop
491
        jne     .rebuild_packet_loop
Line 843... Line 843...
843
        DEBUGF  DEBUG_NETWORK_ERROR, "Ipv4_fragment: failed\n"
843
        DEBUGF  DEBUG_NETWORK_ERROR, "Ipv4_fragment: failed\n"
844
      .done:
844
      .done:
845
        add     esp, 12 + 4 + 6
845
        add     esp, 12 + 4 + 6
846
      .err2:
846
      .err2:
847
        DEBUGF  DEBUG_NETWORK_VERBOSE, "Ipv4_fragment: dumping\n"
847
        DEBUGF  DEBUG_NETWORK_VERBOSE, "Ipv4_fragment: dumping\n"
848
        call    kernel_free
848
        call    NET_packet_free
849
        add     esp, 4
849
        add     esp, 4
Line 850... Line 850...
850
 
850