4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
8 license-file: doc/LICENSE
13 Hath manipulates network blocks in CIDR notation.
15 Hath is a Haskell program for working with network blocks in CIDR
16 notation. When dealing with blocks of network addresses, there are a
17 few things that one usually wants to do with them:
19 * Create a regular expression matching the CIDR block(s). This is
20 because grep will throw up if you feed it CIDR.
22 * Combine small blocks into larger ones. For example, if you have two
23 consecutive \/24s, they might combine into a larger \/23.
25 * View the result of block combination in a useful way.
27 Hath has four modes to perform these functions:
30 This computes a (Perl-compatible) regular expression matching
31 the input CIDR blocks. It's the default mode of operation.
34 This combines small blocks into larger ones where possible, and
35 eliminates redundant blocks. The output should be equivalent to
39 Shows only the blocks that would be removed by reduce; that is, it
40 shows the ones that would get combined into larger blocks or are
44 Shows what would change if you used reduce. Uses diff-like
49 Combine two \/24s into a \/23:
52 $ hath reduced <<< \"10.0.0.0\/24 10.0.1.0\/24\"
56 Create a perl-compatible regex to be fed to grep:
59 $ grep -P `hath regexed -i cidrs.txt` mail.log
73 test-framework == 0.8.*,
74 test-framework-hunit == 0.3.*,
75 test-framework-quickcheck2 == 0.3.*
97 -fwarn-missing-signatures
102 -fwarn-incomplete-record-updates
103 -fwarn-monomorphism-restriction
104 -fwarn-unused-do-bind
118 type: exitcode-stdio-1.0
119 hs-source-dirs: src test
120 main-is: TestSuite.hs
123 bytestring == 0.10.*,
128 parallel-io == 0.3.*,
130 test-framework == 0.8.*,
131 test-framework-hunit == 0.3.*,
132 test-framework-quickcheck2 == 0.3.*
134 -- It's not entirely clear to me why I have to reproduce all of this.
138 -fwarn-missing-signatures
139 -fwarn-name-shadowing
143 -fwarn-incomplete-record-updates
144 -fwarn-monomorphism-restriction
145 -fwarn-unused-do-bind
152 source-repository head
154 location: http://michael.orlitzky.com/git/hath.git