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