Ipaddr.V6.to_string, to_buffer: remove optional labeled argument v4#80
Merged
avsm merged 1 commit intomirage:masterfrom Jan 2, 2019
Merged
Ipaddr.V6.to_string, to_buffer: remove optional labeled argument v4#80avsm merged 1 commit intomirage:masterfrom
v4#80avsm merged 1 commit intomirage:masterfrom
Conversation
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.
8 tasks
Member
|
merged with a changes entry in 8e2fc40 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 :)