Stéphane Glondu pushed to branch upstream at Debian OCaml Maintainers / ocaml-ipaddr
Commits:
-
47bf1cd7
by Stephane Glondu at 2025-08-15T07:52:30+02:00
9 changed files:
- CHANGES.md
- ipaddr-cstruct.opam
- ipaddr-sexp.opam
- ipaddr.opam
- lib/ipaddr.ml
- lib/ipaddr.mli
- macaddr-cstruct.opam
- macaddr-sexp.opam
- macaddr.opam
Changes:
1 | +## v5.6.1 (2025-08-01)
|
|
2 | + |
|
3 | +* Add Ipaddr.Prefix.bits (#125 @psafont)
|
|
4 | + |
|
1 | 5 | ## v5.6.0 (2024-05-22)
|
2 | 6 | |
3 | 7 | * Add host and subnet Seq.t iterators for Ipaddr.V4.prefix, Ipaddr.V6.Prefix
|
... | ... | @@ -22,3 +22,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" |
22 | 22 | description: """
|
23 | 23 | Cstruct convertions for macaddr
|
24 | 24 | """
|
25 | +x-maintenance-intent: [ "(latest)" ] |
... | ... | @@ -26,3 +26,4 @@ build: [ |
26 | 26 | ["dune" "runtest" "-p" name "-j" jobs] {with-test}
|
27 | 27 | ]
|
28 | 28 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git"
|
29 | +x-maintenance-intent: [ "(latest)" ] |
... | ... | @@ -40,3 +40,4 @@ build: [ |
40 | 40 | ["dune" "runtest" "-p" name "-j" jobs] {with-test}
|
41 | 41 | ]
|
42 | 42 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git"
|
43 | +x-maintenance-intent: [ "(latest)" ] |
... | ... | @@ -1357,6 +1357,7 @@ module Prefix = struct |
1357 | 1357 | | V4 p -> V4 (V4.Prefix.address p)
|
1358 | 1358 | | V6 p -> V6 (V6.Prefix.address p)
|
1359 | 1359 | |
1360 | + let bits = function V4 p -> V4.Prefix.bits p | V6 p -> V6.Prefix.bits p
|
|
1360 | 1361 | let pp ppf i = Format.fprintf ppf "%s" (to_string i)
|
1361 | 1362 | |
1362 | 1363 | let first = function
|
... | ... | @@ -784,6 +784,9 @@ module Prefix : sig |
784 | 784 | val address : t -> addr
|
785 | 785 | (** [address cidr] is the address for [cidr]. *)
|
786 | 786 | |
787 | + val bits : t -> int
|
|
788 | + (** [bits cidr] is the bit size of the [cidr] prefix. *)
|
|
789 | + |
|
787 | 790 | val first : t -> addr
|
788 | 791 | (** [first subnet] is first valid unicast address in this [subnet]. *)
|
789 | 792 |
... | ... | @@ -22,3 +22,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" |
22 | 22 | description: """
|
23 | 23 | Cstruct convertions for macaddr
|
24 | 24 | """
|
25 | +x-maintenance-intent: [ "(latest)" ] |
... | ... | @@ -26,3 +26,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" |
26 | 26 | description: """
|
27 | 27 | Sexp convertions for macaddr
|
28 | 28 | """
|
29 | +x-maintenance-intent: [ "(latest)" ] |
... | ... | @@ -30,3 +30,4 @@ Features: |
30 | 30 | * `Macaddr` is a `Map.OrderedType`
|
31 | 31 | * All types have sexplib serializers/deserializers optionally via the `Macaddr_sexp` library.
|
32 | 32 | """
|
33 | +x-maintenance-intent: [ "(latest)" ] |