4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
7 license-file: doc/LICENSE
10 Hath manipulates network blocks in CIDR notation.
12 Hath is a Haskell program for working with network blocks in CIDR
13 notation. When dealing with blocks of network addresses, there are a
14 few things that one usually wants to do with them:
16 * Create a regular expression matching the CIDR block(s). This is
17 because grep will throw up if you feed it CIDR.
19 * Combine small blocks into larger ones. For example, if you have two
20 consecutive \/24s, they might combine into a larger \/23.
22 * View the result of block combination in a useful way.
24 Hath has four modes to perform these functions:
27 This computes a (Perl-compatible) regular expression matching
28 the input CIDR blocks. It's the default mode of operation.
31 This combines small blocks into larger ones where possible, and
32 eliminates redundant blocks. The output should be equivalent to
36 Shows only the blocks that would be removed by reduce; that is, it
37 shows the ones that would get combined into larger blocks or are
41 Shows what would change if you used reduce. Uses diff-like
46 Combine two \/24s into a \/23:
49 $ hath reduced <<< \"10.0.0.0\/24 10.0.1.0\/24\"
53 Create a perl-compatible regex to be fed to grep:
56 $ grep -P `hath regexed -i cidrs.txt` mail.log
66 test-framework == 0.8.*,
67 test-framework-hunit == 0.3.*,
68 test-framework-quickcheck2 == 0.3.*
79 -fwarn-missing-signatures
84 -fwarn-incomplete-record-updates
85 -fwarn-monomorphism-restriction
100 type: exitcode-stdio-1.0
101 hs-source-dirs: src test
102 main-is: TestSuite.hs
109 test-framework == 0.8.*,
110 test-framework-hunit == 0.3.*,
111 test-framework-quickcheck2 == 0.3.*
113 -- It's not entirely clear to me why I have to reproduce all of this.
117 -fwarn-missing-signatures
118 -fwarn-name-shadowing
122 -fwarn-incomplete-record-updates
123 -fwarn-monomorphism-restriction
124 -fwarn-unused-do-bind
131 source-repository head
133 location: http://michael.orlitzky.com/git/hath.git