Skip to content

Commit

Permalink
doc: remove utility modules
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed May 14, 2023
1 parent a495b23 commit a6ef03a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/icmp6_message.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
%%% NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
%%% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

%% @private
-module(icmp6_message).
-include_lib("pkt/include/pkt.hrl").

Expand Down
11 changes: 7 additions & 4 deletions src/icmp_message.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
%%% NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
%%% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

%% @private
-module(icmp_message).
-include_lib("pkt/include/pkt.hrl").

Expand All @@ -39,15 +40,17 @@
code/1
]).

%% @doc Convert an ICMP type to an integer.
%% Convert an ICMP type to an integer.
-spec type_to_uint8(atom() | integer()) -> gen_icmp:uint8_t().
type_to_uint8(Type) when is_integer(Type) -> Type;
type_to_uint8(Type) when is_atom(Type) -> type(Type).

%% @doc Convert an ICMP code to an integer.
%% Convert an ICMP code to an integer.
-spec code_to_uint8(atom() | integer()) -> gen_icmp:uint8_t().
code_to_uint8(Code) when is_integer(Code) -> Code;
code_to_uint8(Code) when is_atom(Code) -> code(Code).

%% @doc ICMP control message: types
%% ICMP control message: types
type(?ICMP_ECHOREPLY) -> echoreply;
type(?ICMP_DEST_UNREACH) -> dest_unreach;
type(?ICMP_SOURCE_QUENCH) -> source_quench;
Expand Down Expand Up @@ -75,7 +78,7 @@ type(info_reply) -> ?ICMP_INFO_REPLY;
type(address) -> ?ICMP_ADDRESS;
type(addressreply) -> ?ICMP_ADDRESSREPLY.

%% @doc ICMP control message: codes
%% ICMP control message: codes
% destination unreachable
code(unreach_net) ->
?ICMP_UNREACH_NET;
Expand Down

0 comments on commit a6ef03a

Please sign in to comment.