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
70 test-framework == 0.8.*,
71 test-framework-hunit == 0.3.*,
72 test-framework-quickcheck2 == 0.3.*
93 -fwarn-missing-signatures
98 -fwarn-incomplete-record-updates
99 -fwarn-monomorphism-restriction
100 -fwarn-unused-do-bind
114 type: exitcode-stdio-1.0
115 hs-source-dirs: src test
116 main-is: TestSuite.hs
123 test-framework == 0.8.*,
124 test-framework-hunit == 0.3.*,
125 test-framework-quickcheck2 == 0.3.*
127 -- It's not entirely clear to me why I have to reproduce all of this.
131 -fwarn-missing-signatures
132 -fwarn-name-shadowing
136 -fwarn-incomplete-record-updates
137 -fwarn-monomorphism-restriction
138 -fwarn-unused-do-bind
145 source-repository head
147 location: http://michael.orlitzky.com/git/hath.git