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
New upstream version 5.6.1
- - - - -


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:

=====================================
CHANGES.md
=====================================
@@ -1,3 +1,7 @@
+## v5.6.1 (2025-08-01)
+
+* Add Ipaddr.Prefix.bits (#125 @psafont)
+
 ## v5.6.0 (2024-05-22)
 
 * Add host and subnet Seq.t iterators for Ipaddr.V4.prefix, Ipaddr.V6.Prefix


=====================================
ipaddr-cstruct.opam
=====================================
@@ -22,3 +22,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git";
 description: """
 Cstruct convertions for macaddr
 """
+x-maintenance-intent: [ "(latest)" ]


=====================================
ipaddr-sexp.opam
=====================================
@@ -26,3 +26,4 @@ build: [
   ["dune" "runtest" "-p" name "-j" jobs] {with-test}
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git";
+x-maintenance-intent: [ "(latest)" ]


=====================================
ipaddr.opam
=====================================
@@ -40,3 +40,4 @@ build: [
   ["dune" "runtest" "-p" name "-j" jobs] {with-test}
 ]
 dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git";
+x-maintenance-intent: [ "(latest)" ]


=====================================
lib/ipaddr.ml
=====================================
@@ -1357,6 +1357,7 @@ module Prefix = struct
     | V4 p -> V4 (V4.Prefix.address p)
     | V6 p -> V6 (V6.Prefix.address p)
 
+  let bits = function V4 p -> V4.Prefix.bits p | V6 p -> V6.Prefix.bits p
   let pp ppf i = Format.fprintf ppf "%s" (to_string i)
 
   let first = function


=====================================
lib/ipaddr.mli
=====================================
@@ -784,6 +784,9 @@ module Prefix : sig
   val address : t -> addr
   (** [address cidr] is the address for [cidr]. *)
 
+  val bits : t -> int
+  (** [bits cidr] is the bit size of the [cidr] prefix. *)
+
   val first : t -> addr
   (** [first subnet] is first valid unicast address in this [subnet]. *)
 


=====================================
macaddr-cstruct.opam
=====================================
@@ -22,3 +22,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git";
 description: """
 Cstruct convertions for macaddr
 """
+x-maintenance-intent: [ "(latest)" ]


=====================================
macaddr-sexp.opam
=====================================
@@ -26,3 +26,4 @@ dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git";
 description: """
 Sexp convertions for macaddr
 """
+x-maintenance-intent: [ "(latest)" ]


=====================================
macaddr.opam
=====================================
@@ -30,3 +30,4 @@ Features:
  * `Macaddr` is a `Map.OrderedType`
  * All types have sexplib serializers/deserializers optionally via the 
`Macaddr_sexp` library.
  """
+x-maintenance-intent: [ "(latest)" ]



View it on GitLab: 
https://salsa.debian.org/ocaml-team/ocaml-ipaddr/-/commit/47bf1cd7678d654c4071c94dd44308de2fd2289e

-- 
View it on GitLab: 
https://salsa.debian.org/ocaml-team/ocaml-ipaddr/-/commit/47bf1cd7678d654c4071c94dd44308de2fd2289e
You're receiving this email because of your account on salsa.debian.org.


Reply via email to