diff options
author | hpa <hpa> | 2004-12-27 07:35:58 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-12-27 07:35:58 +0000 |
commit | 51f0f0dda182e9d2894fa8d1b5dae414ff47b828 (patch) | |
tree | bbf04cce71e09c604e58f6ae014b4ba469ad2820 /dnsresolv.inc | |
parent | b265d4af45e9f026bf00b878c74480c564420208 (diff) | |
download | syslinux-51f0f0dda182e9d2894fa8d1b5dae414ff47b828.tar.gz |
Save list of DNS servers; do DNS lookup for hostnames
Diffstat (limited to 'dnsresolv.inc')
-rw-r--r-- | dnsresolv.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dnsresolv.inc b/dnsresolv.inc index 23094d98..af48b74c 100644 --- a/dnsresolv.inc +++ b/dnsresolv.inc @@ -28,7 +28,8 @@ DNS_MAX_SERVERS equ 4 ; Max no of DNS servers ; ; Turn a string in DS:SI into a DNS "label set" in ES:DI. -; On return, DI points to the first byte after the label set. +; On return, DI points to the first byte after the label set, +; and SI to the terminating byte. ; ; Assumes DS == ES. Change references to [bx] to [es:bx] to remove ; that assumption. @@ -45,12 +46,15 @@ dns_mangle: lodsb and al,al jz .endstring + cmp al,':' + jz .endstring cmp al,'.' je .isdot inc byte [bx] stosb jmp .getbyte .endstring: + dec si cmp byte [bx],0 jz .done xor al,al @@ -117,7 +121,7 @@ dns_skiplabel: ret ; Actual resolver function -; Points to a null-terminated string in DS:SI +; Points to a null-terminated or :-terminated string in DS:SI ; and returns the name in EAX if it exists and can be found. ; If EAX = 0 on exit, the lookup failed. |