Option 82 ASCII logging
Alexander Nazarenko
sasha at alensa.net
Sat Dec 23 22:41:42 UTC 2006
Dear all,
I do logging for Option 82 attributes and my log looks like:
Dec 23 22:36:47 sds1 dhcpd: Lease for 172.25.15.41 raw option-82 info is
CID: 1.3.2.193 AID: 4c.4c.2d.48.51.2d.30.30.31.2d.30.31
Is there any way to log AID with ASCII symbols, basically I want my log
to show AID: LL-HQ-001-01
My config:
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".",
leased-address), " is connected to interface ",
binary-to-ascii (10, 8, ".", substring ( option
agent.circuit-id, 0, 2)), " VLAN ",
binary-to-ascii (10, 16, "", substring( option agent.circuit-id,
2, 2)), " on switch ",
binary-to-ascii(16, 8, ".", substring( option agent.remote-id,
0, 2))));
}
More information about the dhcp-users
mailing list