Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

modified examples/icmp6.erl to use 'ipv6-icmp' instead of icmp6 #6

Merged
merged 1 commit into from

2 participants

@jj1bdx

Fixed the ICMPv6 flag at ping/2.

@msantos msantos merged commit 76eeb83 into msantos:master
@msantos
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/icmp6.erl
View
5 examples/icmp6.erl
@@ -66,7 +66,7 @@ ping(IP, N) ->
{Family, Protocol, Addr} =
case (catch inet:getaddr(IP, inet6)) of
{ok, V6Addr} ->
- {inet6, icmp6, V6Addr};
+ {inet6, 'ipv6-icmp', V6Addr};
{error, _Else} ->
{inet, icmp, IP}
end,
@@ -150,7 +150,8 @@ compl(N) when N =< 16#FFFF -> N;
compl(N) -> (N band 16#FFFF) + (N bsr 16).
compl(N,S) -> compl(N+S).
-%% icmp(<<?ICMPV6_ECHO_REPLY:8/integer-unsigned-big, 0:8, Checksum:16, Id:16, Sequence:16, Payload/binary>>, icmp6) ->
+%% icmp(<<?ICMPV6_ECHO_REPLY:8/integer-unsigned-big, 0:8, Checksum:16,
+%% Id:16, Sequence:16, Payload/binary>>, 'ipv6-icmp') ->
%% {#icmp{
%% type = ?ICMPV6_ECHO_REPLY, code = 0, checksum = Checksum, id = Id,
%% sequence = Sequence
Something went wrong with that request. Please try again.