4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 homepage: http://michael.orlitzky.com/code/hath.xhtml
9 license-file: doc/LICENSE
15 Hath manipulates network blocks in CIDR notation.
17 Hath is a Haskell program for working with network blocks in CIDR
18 notation. When dealing with blocks of network addresses, there are a
19 few things that one usually wants to do with them:
21 * Create a regular expression matching the CIDR block(s). This is
22 because grep will throw up if you feed it CIDR.
24 * Combine small blocks into larger ones. For example, if you have two
25 consecutive \/24s, they might combine into a larger \/23.
27 * View the result of block combination in a useful way.
31 Hath has several modes to perform these functions:
34 This computes a (Perl-compatible) regular expression matching
35 the input CIDR blocks. It's the default mode of operation.
38 This combines small blocks into larger ones where possible, and
39 eliminates redundant blocks. The output should be equivalent to
43 Shows only the blocks that would be removed by reduce; that is, it
44 shows the ones that would get combined into larger blocks or are
48 Shows what would change if you used reduce. Uses diff-like
52 List the IP addresses contained within the given CIDRs.
56 Compute a (Perl-compatible) regular expression matching
57 the input CIDR blocks. It's the default mode of operation.
60 $ echo \"10.0.0.0\/29 10.0.0.8\/29\" | hath
61 ((10)\.(0)\.(0)\.(15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0))
64 Combine two \/24s into a \/23:
67 $ echo \"10.0.0.0\/24 10.0.1.0\/24\" | hath reduced
71 List the addresses in 192.168.0.240\/29:
74 $ echo 192.168.0.240\/29 | hath listed
85 The command-line syntax and complete set of options are documented in
116 tasty-quickcheck >= 0.8.1
120 type: exitcode-stdio-1.0
121 hs-source-dirs: src test
122 default-language: Haskell2010
123 main-is: TestSuite.hs
138 tasty-quickcheck >= 0.8.1
141 -- These won't work without shelltestrunner installed in your
142 -- $PATH. Maybe there is some way to tell Cabal that.
143 test-suite shelltests
144 type: exitcode-stdio-1.0
146 default-language: Haskell2010
147 main-is: ShellTests.hs
154 source-repository head
156 location: http://gitweb.michael.orlitzky.com/hath.git