Skip to content

Commit

Permalink
ip_address key
Browse files Browse the repository at this point in the history
This adapts 5010b49 to master
  • Loading branch information
hannesm committed Nov 30, 2020
1 parent 7481c93 commit ba21d58
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/mirage/mirage_key.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ module Arg = struct
let ipv6_address = of_module "ipv6_address" "V6" (module Ipaddr.V6)

let ipv6 = of_module "ipv6_prefix" "V6.Prefix" (module Ipaddr.V6.Prefix)

let ip_address = of_module "ip_address" "" (module Ipaddr)
end

(** {2 Documentation helper} *)
Expand Down
2 changes: 2 additions & 0 deletions lib/mirage/mirage_key.mli
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ module Arg : sig
val ipv6_address : Ipaddr.V6.t converter

val ipv6 : Ipaddr.V6.Prefix.t converter

val ip_address : Ipaddr.t converter
end

include Functoria.KEY with module Arg := Arg
Expand Down
2 changes: 1 addition & 1 deletion lib_runtime/mirage/mirage_runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module Arg = struct
let of_module (type t) (module M : S with type t = t) =
make M.of_string M.to_string

let ip = of_module (module Ipaddr)
let ip_address = of_module (module Ipaddr)

let ipv4_address = of_module (module Ipaddr.V4)

Expand Down
4 changes: 2 additions & 2 deletions lib_runtime/mirage/mirage_runtime.mli
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ module Arg : sig

(** {2 Mirage command-line argument converters} *)

val ip : Ipaddr.t Cmdliner.Arg.converter
val ip_address : Ipaddr.t Cmdliner.Arg.converter
(** [ip] converts IP address. *)

val ipv4_address : Ipaddr.V4.t Cmdliner.Arg.converter
(** [ipv4] converts an IPv4 address. *)
(** [ipv4_address] converts an IPv4 address. *)

val ipv4 : Ipaddr.V4.Prefix.t Cmdliner.Arg.converter
(** [ipv4] converts ipv4/netmask to Ipaddr.V4.t * Ipaddr.V4.Prefix.t . *)
Expand Down

0 comments on commit ba21d58

Please sign in to comment.