diff --git a/src/vmm_asn.ml b/src/vmm_asn.ml index 3e28d54..9baf329 100644 --- a/src/vmm_asn.ml +++ b/src/vmm_asn.ml @@ -192,6 +192,7 @@ let log_event = | `C3 n -> `Stop n in `Unikernel_stop (to_name name, pid, status') + | `C6 () -> `Hup and g = function | `Startup -> `C1 () | `Login (name, ip, port) -> `C2 (of_name name, ip, port) @@ -204,6 +205,7 @@ let log_event = | `Stop n -> `C3 n in `C5 (of_name name, pid, status') + | `Hup -> `C6 () in let endp = Asn.S.(sequence3 @@ -212,7 +214,7 @@ let log_event = (required ~label:"port" int)) in Asn.S.map f g @@ - Asn.S.(choice5 + Asn.S.(choice6 (explicit 0 null) (explicit 1 endp) (explicit 2 endp) @@ -227,7 +229,8 @@ let log_event = (required ~label:"status" (choice3 (explicit 0 int) (explicit 1 int) - (explicit 2 int)))))) + (explicit 2 int))))) + (explicit 5 null)) let log_cmd = let f = function diff --git a/src/vmm_core.ml b/src/vmm_core.ml index 71d0000..ac86641 100644 --- a/src/vmm_core.ml +++ b/src/vmm_core.ml @@ -266,6 +266,7 @@ module Log = struct | `Startup | `Unikernel_start of Name.t * int * string list * string option | `Unikernel_stop of Name.t * int * process_exit + | `Hup ] let name = function @@ -274,9 +275,10 @@ module Log = struct | `Logout (name, _, _) -> name | `Unikernel_start (name, _, _ ,_) -> name | `Unikernel_stop (name, _, _) -> name + | `Hup -> [] let pp_log_event ppf = function - | `Startup -> Fmt.(pf ppf "startup") + | `Startup -> Fmt.string ppf "startup" | `Login (name, ip, port) -> Fmt.pf ppf "%a login %a:%d" Name.pp name Ipaddr.V4.pp_hum ip port | `Logout (name, ip, port) -> Fmt.pf ppf "%a logout %a:%d" Name.pp name Ipaddr.V4.pp_hum ip port | `Unikernel_start (name, pid, taps, block) -> @@ -285,6 +287,8 @@ module Log = struct Fmt.(option ~none:(unit "no") string) block | `Unikernel_stop (name, pid, code) -> Fmt.pf ppf "%a stopped %d with %a" Name.pp name pid pp_process_exit code + | `Hup -> Fmt.string ppf "hup" + type t = Ptime.t * log_event diff --git a/src/vmm_core.mli b/src/vmm_core.mli index e494363..7a18b9f 100644 --- a/src/vmm_core.mli +++ b/src/vmm_core.mli @@ -141,7 +141,9 @@ module Log : sig | `Logout of Name.t * Ipaddr.V4.t * int | `Startup | `Unikernel_start of Name.t * int * string list * string option - | `Unikernel_stop of Name.t * int * process_exit ] + | `Unikernel_stop of Name.t * int * process_exit + | `Hup + ] val name : log_event -> Name.t