From: Wim N. <wim...@zi...> - 2017-04-26 09:49:10
|
Hello Oliver, if Devmon patch # 36 is installed, the transformation becomes easier. In that case the following transform would do the job: ip1 : REGSUB : {cipSecEndPtRemoteAddr1} /^(..)(..)(..)(..)$/hex($1) . '.' . hex($2) . '.' . hex($3) . '.' . hex($4)/e It is assumed that the string in cipSecEndPtRemoteAddr1 always contains exactly 8 hexadecimal digits. Regards, Wim Nelis. > There should probably be a transform that can use e.g. printf or similar. > > However, you can probably get what you need with REGSUB, e.g.: > > ip1: REGSUB : {cipSecEndPtRemoteAddr11d} /^.*$/$1.{ cipSecEndPtRemoteAddr12d}.{cipSecEndPtRemoteAddr13d}.{ > cipSecEndPtRemoteAddr14d}/ > > (or similar) > > Regards, > Buchan > > On Tue, Apr 25, 2017 at 10:44 PM, <ol...@nm...> wrote: > >> hello >> >> I'm working on a template for asa vpn. I got ips in HEX format and I >> would like to get them in cidr way. >> >> I started like this : >> >> cipSecEndPtRemoteAddr11B : SUBSTR : {cipSecEndPtRemoteAddr1} 0 1 >> cipSecEndPtRemoteAddr12B : SUBSTR : {cipSecEndPtRemoteAddr1} 1 1 >> cipSecEndPtRemoteAddr13B : SUBSTR : {cipSecEndPtRemoteAddr1} 2 1 >> cipSecEndPtRemoteAddr14B : SUBSTR : {cipSecEndPtRemoteAddr1} 3 1 >> >> cipSecEndPtRemoteAddr11H : UNPACK : {cipSecEndPtRemoteAddr11B} H2 >> cipSecEndPtRemoteAddr12H : UNPACK : {cipSecEndPtRemoteAddr12B} H2 >> cipSecEndPtRemoteAddr13H : UNPACK : {cipSecEndPtRemoteAddr13B} H2 >> cipSecEndPtRemoteAddr14H : UNPACK : {cipSecEndPtRemoteAddr14B} H2 >> >> cipSecEndPtRemoteAddr11d : CONVERT : {cipSecEndPtRemoteAddr11H} hex >> cipSecEndPtRemoteAddr12d : CONVERT : {cipSecEndPtRemoteAddr12H} hex >> cipSecEndPtRemoteAddr13d : CONVERT : {cipSecEndPtRemoteAddr13H} hex >> cipSecEndPtRemoteAddr14d : CONVERT : {cipSecEndPtRemoteAddr14H} hex >> >> ip1: MATH : {cipSecEndPtRemoteAddr11d} . {cipSecEndPtRemoteAddr12d} . >> {cipSecEndPtRemoteAddr13d} . {cipSecEndPtRemoteAddr14d} >> >> where cipSecEndPtRemoteAddr1 is the ip in HEX. It's working well >> except I'm not able to just concat the 4 element in one. >> >> any clue ? >> >> many thx >> >> oau >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Devmon-support mailing list >> Dev...@li... >> https://lists.sourceforge.net/lists/listinfo/devmon-support >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ > Devmon-support mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devmon-support > > > |