mac address host-name problem
Ray Phillips
r.phillips at jkmrc.com
Fri Mar 16 07:47:45 UTC 2007
>I am using " binary-to-ascii (16,8, "", substring (hardware, 4, 1))
>" to convert mac, 0:e0:6f:a:c:e , to ascii "0e06face".
>How can I convert the mac to ascii "00e06f0a0c0e"
I think the following, which is derived from one of Glenn's postings
to the list [1], is a solution:
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)
)
Ray
[1] http://marc.theaimsgroup.com/?l=dhcp-server&m=105689607527110&w=2
More information about the dhcp-users
mailing list