IP::addr and IPv6
Did you know that all address internal to tmm are kept in IPv6 format? If you’ve written external monitors, I’m guessing you knew this. In the external monitors, for IPv4 networks the IPv6 “header”...
Published Mar 23, 2011
Version 1.0JRahm
Admin
Joined January 20, 2005
JRahm
Admin
Joined January 20, 2005
JRahm
Jan 18, 2012Admin
% set ip "10.10.11.70"
10.10.11.70
% scan $ip {%d.%d.%d.%d} a b c d
4
% set srcsnat "2001:111:111:22:[format %02x $a][format %02x $b]:[format %02x $c][format %02x $d]::"
2001:111:111:22:0a0a:0b46::
The leading 0's are in there, which isn't exactly what you wanted, but best to leave for IP octets that don't fit nicely in a single character.