4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
8 Hath manipulates network blocks in CIDR notation.
10 Hath is a Haskell program for working with network blocks in CIDR
11 notation. When dealing with blocks of network addresses, there are a
12 few things that one usually wants to do with them:
14 * Create a regular expression matching the CIDR block(s). This is
15 because grep will throw up if you feed it CIDR.
17 * Combine small blocks into larger ones. For example, if you have two
18 consecutive \/24s, they might combine into a larger \/23.
20 * View the result of block combination in a useful way.
22 Hath has four modes to perform these functions:
25 This computes a (Perl-compatible) regular expression matching
26 the input CIDR blocks. It's the default mode of operation.
29 This combines small blocks into larger ones where possible, and
30 eliminates redundant blocks. The output should be equivalent to
34 Shows only the blocks that would be removed by reduce; that is, it
35 shows the ones that would get combined into larger blocks or are
39 Shows what would change if you used reduce. Uses diff-like
44 Combine two \/24s into a \/23:
47 $ hath reduced <<< \"10.0.0.0\/24 10.0.1.0\/24\"
51 Create a perl-compatible regex to be fed to grep:
54 $ grep -P `hath regexed -i cidrs.txt` mail.log
64 test-framework == 0.8.*,
65 test-framework-hunit == 0.3.*,
66 test-framework-quickcheck2 == 0.3.*
77 -fwarn-missing-signatures
82 -fwarn-incomplete-record-updates
83 -fwarn-monomorphism-restriction
98 type: exitcode-stdio-1.0
99 hs-source-dirs: src test
100 main-is: TestSuite.hs
107 test-framework == 0.8.*,
108 test-framework-hunit == 0.3.*,
109 test-framework-quickcheck2 == 0.3.*
111 -- It's not entirely clear to me why I have to reproduce all of this.
115 -fwarn-missing-signatures
116 -fwarn-name-shadowing
120 -fwarn-incomplete-record-updates
121 -fwarn-monomorphism-restriction
122 -fwarn-unused-do-bind
129 source-repository head
131 location: http://michael.orlitzky.com/git/hath.git