Subversion Repositories Kolibri OS

Rev

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

Rev 6923 Rev 7892
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2010-2017. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2010-2020. 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
;;  tracert.asm - Trace network route for KolibriOS                ;;
6
;;  tracert.asm - Trace network route for KolibriOS                ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  Written by hidnplayr@kolibrios.org                             ;;
8
;;  Written by hidnplayr@kolibrios.org                             ;;
Line 237... Line 237...
237
        cmp     eax, -1
237
        cmp     eax, -1
238
        je      .timeout
238
        je      .timeout
239
        test    eax, eax
239
        test    eax, eax
240
        jz      fail2
240
        jz      fail2
Line 241... Line 241...
241
 
241
 
Line 242... Line 242...
242
        DEBUGF  2, "Answer after %u\n", eax
242
        DEBUGF  2, "Answer of %u bytes\n", eax
243
 
243
 
244
; IP header length
244
; IP header length
245
        movzx   esi, byte[buffer_ptr]
245
        movzx   esi, byte[buffer_ptr]
Line 261... Line 261...
261
;;        movzx   eax, [esi + sizeof.ICMP_header + IPv4_header.TimeToLive]
261
;;        movzx   eax, [esi + sizeof.ICMP_header + IPv4_header.TimeToLive]
262
;;        cmp     eax, [ttl]
262
;;        cmp     eax, [ttl]
263
;;        jne     .receive
263
;;        jne     .receive
Line 264... Line 264...
264
 
264
 
-
 
265
; What kind of response is it?
265
; What kind of response is it?
266
        DEBUGF  2, "Response Type: %u Code: %u\n", [esi + ICMP_header.Type], [esi + ICMP_header.Code]
266
        cmp     [esi + ICMP_header.Type], ICMP_UNREACH_PORT
267
        cmp     [esi + ICMP_header.Type], ICMP_UNREACH_PORT
267
        je      .last
268
        je      .last
268
        cmp     [esi + ICMP_header.Type], ICMP_TIMXCEED
269
        cmp     [esi + ICMP_header.Type], ICMP_TIMXCEED
269
        jne     .invalid
270
        jne     .invalid