From cc08971508f3515f9f3b6c406ff0f6a186b24f6b Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 11 Jun 2018 12:34:23 +0200 Subject: [net-nif] Added debugging Added a command function, which is currently only used to enable and disable debug, which is also added. --- erts/preloaded/ebin/net.beam | Bin 4792 -> 5000 bytes erts/preloaded/src/net.erl | 12 +++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'erts/preloaded') diff --git a/erts/preloaded/ebin/net.beam b/erts/preloaded/ebin/net.beam index a5746fb8c9..89f14a86d1 100644 Binary files a/erts/preloaded/ebin/net.beam and b/erts/preloaded/ebin/net.beam differ diff --git a/erts/preloaded/src/net.erl b/erts/preloaded/src/net.erl index f145797b97..3c010871c0 100644 --- a/erts/preloaded/src/net.erl +++ b/erts/preloaded/src/net.erl @@ -23,7 +23,8 @@ %% Administrative and "global" utility functions -export([ on_load/0, on_load/1, on_load/2, - info/0 + info/0, + command/1 ]). -export([ @@ -141,6 +142,12 @@ info() -> nif_info(). +-spec command(Cmd :: term()) -> term(). + +command(Cmd) -> + nif_command(Cmd). + + %% =========================================================================== %% @@ -292,6 +299,9 @@ nif_is_loaded() -> nif_info() -> erlang:error(badarg). +nif_command(_Cmd) -> + erlang:error(badarg). + nif_getnameinfo(_Addr, _Flags) -> erlang:error(badarg). -- cgit v1.2.3