[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dhcp-server
Subject:    Re: DDNS and binary-to-ascii question
From:       Nicolas Kreft <kreft () do ! isst ! fhg ! de>
Date:       2005-07-19 16:07:42
Message-ID: 42DD254E.3090508 () do ! isst ! fhg ! de
[Download RAW message or body]

   *** From dhcp-server -- To unsubscribe, see the end of this message. ***

Hi!

a.mamitzsch@ccgmbh.de wrote:
[...]
> Because the binary-to-ascii function evaluates 8 bits, a "00" in the MAC 
> address is shown as a single "0" only. This causes confusion and can 
> only be hardly explained to less experienced technical staff. I would 
> like to "beautify" the shown MAC address somehow, but could not find a 
> way to do it.


I use the following construct to achieve this:



ddns-hostname = pick (lcase(option fqdn.hostname), lcase(option host-name),
                         concat (
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 1, 1))),2),
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 2, 1))),2),
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 3, 1))),2),
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 4, 1))),2),
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 5, 1))),2),
                             suffix (concat ("0", binary-to-ascii (16, 
8, "", substring(hardware, 6, 1))),2)));



If you don't use the lcase/ucase patch just skip the lcase stuff.




regards,
Nicolas

-----------------------------------------------------------------------
List Archives : http://www.isc.org/ops/lists/
Unsubscribe   : http://www.isc.org/sw/dhcp/dhcp-lists.php    
-or-          : mailto:dhcp-server-request@isc.org?Subject=unsubscribe  
-----------------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic