Skip to content

Ipaddr.V6.to_string, to_buffer: remove optional labeled argument v4#80

Merged
avsm merged 1 commit intomirage:masterfrom
hannesm:v6-to-string
Jan 2, 2019
Merged

Ipaddr.V6.to_string, to_buffer: remove optional labeled argument v4#80
avsm merged 1 commit intomirage:masterfrom
hannesm:v6-to-string

Conversation

@hannesm
Copy link
Copy Markdown
Member

@hannesm hannesm commented Jan 1, 2019

was not used, is confusing. the RFC 5952 recommends to output v4-mapped
addresses as ::ffff:192.168.0.1, which is done nicely by the code.

I searched github, and only https://github.com/mirage/ocaml-tuntap/blob/master/test/getifaddrs_test.ml#L12 uses this, supplying false, the default. see mirage/ocaml-tuntap#29 for removing it there :)

 was not used, is confusing. the RFC 5952 recommends to output v4-mapped
 addresses as ::ffff:192.168.0.1, which is done nicely by the code.
@avsm
Copy link
Copy Markdown
Member

avsm commented Jan 2, 2019

merged with a changes entry in 8e2fc40

@avsm avsm merged commit 5d78803 into mirage:master Jan 2, 2019
avsm added a commit to avsm/opam-repository that referenced this pull request Jan 2, 2019
CHANGES:

This release features several backwards incompatible changes,
but ones that should increase the portability and robustness
of the library.

* Remove the sexp serialisers from the main interface in favour
  of `pp` functions.  Use the `Ipaddr_sexp` module if you still
  need a sexp serialiser.

  To use these with ppx-based derivers, simply replace the
  reference to the `Ipaddr` type definition with `Ipaddr_sexp`.
  That will import the sexp-conversion functions, and the actual
  type definitions are simply aliases to the corresponding type
  within `Ipaddr`.  For example, you might do:

  ```
  type t = {
    ip: Ipaddr_sexp.t;
    mac: Macaddr_sexp.t;
  } [@@deriving sexp]
  ```

  The actual types of the records will be aliases to the main
  library types, and there will be two new functions available
  as converters.  The signature after ppx has run will be:

  ```
  type t = {
    ip: Ipaddr.t;
    mac: Macaddr.t;
  }
  val sexp_of_t : t -> Sexplib0.t
  val t_of_sexp : Sexplib0.t -> t
  ```

* Break out the `Macaddr` module into a separate opam package so
  that the `Ipaddr` module can be wrapped.  Use the `macaddr`
  opam library now if you need just the MAC address functionality.

* Replace all the `of_string/bytes` functions that formerly returned
  option types with the `Rresult` result types instead. This stops
  the cause of the exception from being swallowed, and the error
  message in the new functions can be displayed usefully.

* In the `Ipaddr.V6.to_string` and `to_buffer` functions, remove the
  optional labelled argument `v4` and always output v4-mapped strings
  as recommended by RFC5952. (mirage/ocaml-ipaddr#80 by @hannesm).

* Remove `pp_hum` which was deprecated in 2.9.0.

* Sexplib0 is now used which is more lightweight tha the full
  Sexplib library. Minimum OCaml version is now 4.04.0+ as a result
  of this dependency.

* Improvements to the ocamldoc formatting strings for better
  layout and odoc compatibility.
avsm added a commit to avsm/opam-repository that referenced this pull request Jan 2, 2019
CHANGES:

This release features several backwards incompatible changes,
but ones that should increase the portability and robustness
of the library.

* Remove the sexp serialisers from the main interface in favour
  of `pp` functions.  Use the `Ipaddr_sexp` module if you still
  need a sexp serialiser.

  To use these with ppx-based derivers, simply replace the
  reference to the `Ipaddr` type definition with `Ipaddr_sexp`.
  That will import the sexp-conversion functions, and the actual
  type definitions are simply aliases to the corresponding type
  within `Ipaddr`.  For example, you might do:

  ```
  type t = {
    ip: Ipaddr_sexp.t;
    mac: Macaddr_sexp.t;
  } [@@deriving sexp]
  ```

  The actual types of the records will be aliases to the main
  library types, and there will be two new functions available
  as converters.  The signature after ppx has run will be:

  ```
  type t = {
    ip: Ipaddr.t;
    mac: Macaddr.t;
  }
  val sexp_of_t : t -> Sexplib0.t
  val t_of_sexp : Sexplib0.t -> t
  ```

* Break out the `Macaddr` module into a separate opam package so
  that the `Ipaddr` module can be wrapped.  Use the `macaddr`
  opam library now if you need just the MAC address functionality.

* Replace all the `of_string/bytes` functions that formerly returned
  option types with the `Rresult` result types instead. This stops
  the cause of the exception from being swallowed, and the error
  message in the new functions can be displayed usefully.

* In the `Ipaddr.V6.to_string` and `to_buffer` functions, remove the
  optional labelled argument `v4` and always output v4-mapped strings
  as recommended by RFC5952. (mirage/ocaml-ipaddr#80 by @hannesm).

* Remove `pp_hum` which was deprecated in 2.9.0.

* Sexplib0 is now used which is more lightweight tha the full
  Sexplib library. Minimum OCaml version is now 4.04.0+ as a result
  of this dependency.

* Improvements to the ocamldoc formatting strings for better
  layout and odoc compatibility.
avsm added a commit to avsm/opam-repository that referenced this pull request Jan 2, 2019
CHANGES:

This release features several backwards incompatible changes,
but ones that should increase the portability and robustness
of the library.

* Remove the sexp serialisers from the main interface in favour
  of `pp` functions.  Use the `Ipaddr_sexp` module if you still
  need a sexp serialiser.

  To use these with ppx-based derivers, simply replace the
  reference to the `Ipaddr` type definition with `Ipaddr_sexp`.
  That will import the sexp-conversion functions, and the actual
  type definitions are simply aliases to the corresponding type
  within `Ipaddr`.  For example, you might do:

  ```
  type t = {
    ip: Ipaddr_sexp.t;
    mac: Macaddr_sexp.t;
  } [@@deriving sexp]
  ```

  The actual types of the records will be aliases to the main
  library types, and there will be two new functions available
  as converters.  The signature after ppx has run will be:

  ```
  type t = {
    ip: Ipaddr.t;
    mac: Macaddr.t;
  }
  val sexp_of_t : t -> Sexplib0.t
  val t_of_sexp : Sexplib0.t -> t
  ```

* Break out the `Macaddr` module into a separate opam package so
  that the `Ipaddr` module can be wrapped.  Use the `macaddr`
  opam library now if you need just the MAC address functionality.

* Replace all the `of_string/bytes` functions that formerly returned
  option types with the `Rresult` result types instead. This stops
  the cause of the exception from being swallowed, and the error
  message in the new functions can be displayed usefully.

* In the `Ipaddr.V6.to_string` and `to_buffer` functions, remove the
  optional labelled argument `v4` and always output v4-mapped strings
  as recommended by RFC5952. (mirage/ocaml-ipaddr#80 by @hannesm).

* Remove `pp_hum` which was deprecated in 2.9.0.

* Sexplib0 is now used which is more lightweight tha the full
  Sexplib library. Minimum OCaml version is now 4.04.0+ as a result
  of this dependency.

* Improvements to the ocamldoc formatting strings for better
  layout and odoc compatibility.
@hannesm hannesm deleted the v6-to-string branch January 2, 2019 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants