blob: 87558993b133a85a45bacb4a445c3225c4a64d8b [file] [log] [blame] [raw]
sed \
-e 's/192.168.126.0/c0a8:7e00::/' \
-e 's/\/32/\/128/g' \
-e 's/\/24/\/112/g' \
-e 's/\/16/\/32/g' \
-e 's/10\.2\.0\.0/10::2:0:0/g' \
-e 's/1\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/1:0:0:0:0:\1:\2:\3/g' \
-e 's/2\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/2:0:0:0:0:\1:\2:\3/g' \
-e 's/4\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/4:\1:\2:0:0:0:0:\3/g' \
-e 's/3\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/3:0:\1:0:0:0:\2:\3/g' \
-e 's/5\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/5:\1:0:0:0:0:\2:\3/g' \
-e 's/9\.\([0-9]\)\.\([0-9]\)\.\([0-9]\)/9:\1:\2:0:0:0:0:\3/g' \
-e 's/10\.1\.\([0-9]\)\.\([0-9]\)/10:1:\1:0:0:0:0:\2/g' \
-e 's/10\.10\.\([0-9]*\)\.\([0-9]\)/10:10:\1:0:0:0:0:\2/g' \
-e 's/10\.2\.\([0-9]\)\.\([0-9]\)/10:0:0:0:0:2:\1:\2/g' \
-e 's/10\.4\.3\.\([0-9]\)/10:4:3:0:0:0:0:\1/g' \
-e 's/10\.3\.4\.\([0-9]\)/10:0:0:0:0:3:4:\1/g' \
-e 's/10\.3\.\([0-9]\)\.\([0-9]\)/10:3:\1:0:0:0:0:\2/g' \
-e 's/0\.0\.0\.0/any/g' \
-e 's/ 0\/0 / any /g' \
-e 's/ip #0/ip6\/0/' \
-e 's/40(20) 6 /20 0 6 /' \
-e 's/28(20) 17 /8 0 17 /' \
-e 's/20(20) 0 /1 0 41 /' \
-e 's/48(20) 1 /88 0 58 /g' \
-e 's/20(20) 34 /1 0 34 /g' \
-e 's/20(20) 35 /1 0 35 /g' \
-e 's/20(20) 255 /1 0 255 /g' \
-e 's/ */ /g' | sed \
-e '/use/s/:0:0:0:0:/::/g' \
-e '/map/s/:0:0:0:0:/::/g' \
-e '/rdr/s/:0:0:0:0:/::/g' \
-e '/map/s/:0:0:0:/::/g' \
-e '/rdr/s/:0:0:0:/::/g' \
-e '/MAP/s/:0:0:0:0:0:/::/g' \
-e '/RDR/s/:0:0:0:0:0:/::/g' \
-e '/MAP/s/:0:0:0:0:/::/g' \
-e '/RDR/s/:0:0:0:0:/::/g' \
-e '/MAP/s/:0:0:0:/::/g' \
-e '/RDR/s/:0:0:0:/::/g' \
| sed \
-e '/MAP/s/ \([0-9][0-9][0-9][0-9]\) / \1 /g' \
-e '/MAP/s/ \([0-9][0-9][0-9]\) / \1 /g' \
-e '/MAP/s/ \([0-9][0-9]\) / \1 /g' \
-e '/RDR/s/ \([0-9][0-9][0-9][0-9]\) / \1 /g' \
-e '/RDR/s/ \([0-9][0-9][0-9]\) / \1 /g' \
-e '/RDR/s/ \([0-9][0-9]\) / \1 /g' \
-e 's/::0:0\//::\//g' \
-e 's/:0:0\//::\//g' \
-e 's/::0\([^:0-9]\)/::\1/g' \
-e 's/::0,/::,/g' \
-e 's/::0:0 \([^>]\)/:: \1/g' \
-e 's/:0:0 \([^>]\)/:: \1/g' \
-e 's/::0 \([^>]\)/:: \1/g' \
| sed \
-e 's@::\([0-9]*\)::/16@::/16@g' \
-e 's@::\([0-9]*\)::/32@::/32@g' \
-e 's@::\([0-9]*\)::@::\1:0:0@g' \
-e 's@::\([0-9]*\)::@::\1:0:0@g' \
-e 's@::[:0-9]*\([^0-9:]\)/16@::/16@g' \
-e 's@::[:0-9]*\([^0-9:]\)/32@::/32@g'