Print link state in human readable format.

git-svn-id: svn://kolibrios.org@4845 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-04-17 14:53:21 +00:00
parent c2b6a6cf4b
commit 8b63c53a0b

View File

@ -271,11 +271,54 @@ draw_stats:
cmp bl, 10 cmp bl, 10
jbe @r jbe @r
pop eax
test al, al
jnz @f
mov edx, str_down
jmp .print_link
@@:
cmp al, 100b
jnz @f
mov edx, str_10m
jmp .print_link
@@:
cmp al, 110b
jnz @f
mov edx, str_10mfd
jmp .print_link
@@:
cmp al, 1000b
jnz @f
mov edx, str_100m
jmp .print_link
@@:
cmp al, 1010b
jnz @f
mov edx, str_100mfd
jmp .print_link
@@:
cmp al, 10000b
jnz @f
mov edx, str_1g
jmp .print_link
@@:
cmp al, 10010b
jnz @f
mov edx, str_1gfd
jmp .print_link
@@:
mov edx, str_unknown
.print_link:
mov ebx, 134 shl 16 + 35 + 4*18
mov ecx, 0xc0000000
mov edi, 0x00f3f3f3
mcall 4
mov ebx, 0x000a0000 mov ebx, 0x000a0000
pop ecx pop ecx
mov edx, 134 shl 16 + 35 + 4*18 mov edx, 134 shl 16 + 35 + 3*18
mov esi, 0x40000000 mov esi, 0x40000000
mov edi, 0x00F3F3F3
mcall 47 mcall 47
sub edx, 18 sub edx, 18
@ -290,10 +333,6 @@ draw_stats:
pop ecx pop ecx
mcall mcall
sub edx, 18
pop ecx
mcall
jmp mainloop jmp mainloop
@ -780,11 +819,19 @@ str_subnet db 'Subnet mask: . . .', 0
str_gateway db 'Standard gateway: . . .', 0 str_gateway db 'Standard gateway: . . .', 0
str_arp db 'ARP entrys:', 0 str_arp db 'ARP entrys:', 0
str_conflicts db 'ARP conflicts:', 0 str_conflicts db 'ARP conflicts:', 0
str_unknown db 'unknown', 0
str_missed db 'Packets missed:',0 str_missed db 'Packets missed:',0
str_dumped db 'Packets dumped:',0 str_dumped db 'Packets dumped:',0
str_link db 'Link state:',0 str_link db 'Link state:',0
str_down db 'down', 0
str_unknown db 'unknown', 0
str_10m db '10 Mbit Half duplex', 0
str_10mfd db '10 Mbit Full duplex', 0
str_100m db '100 Mbit Half duplex', 0
str_100mfd db '100 Mbit Full duplex', 0
str_1g db '1 Gbit Half duplex', 0
str_1gfd db '1 Gbit Full duplex', 0
str_ARP_legend db 'IP-address MAC-address Status TTL', 0 str_ARP_legend db 'IP-address MAC-address Status TTL', 0
str_ARP_entry db ' . . . - - - - -', 0 str_ARP_entry db ' . . . - - - - -', 0