资源说明:A collection of small, integrated tools that perform some common IPv6 related tasks.
============================================ Valshamr v0.1 By Andrew Buntine, 2008 ============================================ 1. Introduction Valshamr is a collection of small, attachable tools (written in Ruby) that perform some common IPv6-related tasks. Specifically: - Transform IPv4 address to it's IPv6 equivalent. (val-ipng) - Contract an IPv6 address to short and/or double-colon notation. (val-compact) - Expand an IPv6 address from dc-notation to it's full form. (val-expand) - Transform an IPv6 address into it's binary equivalent. (val-to-binary) I have included a few little Ruby scripts that implement each class. They can accept STDIN, so you can pipe to them (and to each other)... 2. Installation and Usage See the tool-specific README files for instructions on in-code usage. e.g ./val-ipng/README To use the sample scripts: $ ./script/ipng.rb 203.32.120.10 > ::CB20:780A $ ./script/expand.rb ::CB20:780A > 0:0:0:0:0:0:CB20:780A $ ./script/expand.rb --long 1080:90::CDE1:FF22 > 1080:0090:0000:0000:0000:0000:CDE1:FF22 $ ./script/compact.rb 1080:0090:0000:0000:0000:0000:CDE1:FF22 > 1080:90:0:0:0:0:CDE1:FF22 $ ./script/compact.rb --tiny 1080:0090:0000:0000:0000:0000:CDE1:FF22 > 1080:90::CDE1:FF22 $ ./script/to_binary.rb 1080:90:0:0:ADD:67:1212:999A > 0001 0000 1000 0000 0000 0000 1001 0000 > 0000 0000 0000 0000 0000 0000 0000 0000 > 0000 1010 1101 1101 0000 0000 0110 0111 > 0001 0010 0001 0010 1001 1001 1001 1010 $ ./script/to_binary.rb --bits 64 1080:90:0:0:ADD:67:1212:999A > 0001 0000 1000 0000 0000 0000 1001 0000 0000 0000 0000 0000 0000 0000 0000 0000 > 0000 1010 1101 1101 0000 0000 0110 0111 0001 0010 0001 0010 1001 1001 1001 1010 $ ./script/to_binary.rb --bits 128 1080:90:0:0:ADD:67:1212:999A > 0001 0000 1000 0000 0000 0000 1001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1010 1101 1101 0000 0000 0110 0111 0001 0010 0001 0010 1001 1001 1001 1010 $ echo "You can also use the -b alias and it will work with 16 bits, but you get the picture..." All scripts can accept STDIN, so you can pipe between them. For example: $ ./script/ipng.rb 203.32.120.10 | ./script/expand.rb --long > 0000:0000:0000:0000:0000:0000:CB20:780A $ ./script/ipng.rb 202.123.102.99 | ./script/expand.rb | ./script/to_binary.rb --bits 64 > 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 > 0000 0000 0000 0000 0000 0000 0000 0000 1100 1010 0111 1011 0110 0110 0110 0011 3. Notes - This is more-so a symptom of the badass coffee I just bought rather than an attempt to write something truly useful. I am also experimenting with differing packaging/distribution concepts. - In Norse mythology, Valshamr is a cloak of falcon feathers owned by Freyja. It gives her the ability to morph into the guise of any bird and fly between worlds!
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。