Skip to content
Browse files

Correct value for IPPROTO_RAW

  • Loading branch information...
1 parent 637acc5 commit 1a47c1dc45a2e20f6a82e8bf9a17a389fa5f354c @msantos committed
Showing with 4 additions and 4 deletions.
  1. +0 −1 src/packet.erl
  2. +4 −3 src/procket.erl
View
1 src/packet.erl
@@ -345,4 +345,3 @@ checksum(Hdr) ->
compl(N) when N =< 16#FFFF -> N;
compl(N) -> (N band 16#FFFF) + (N bsr 16).
compl(N,S) -> compl(N+S).
-
View
7 src/procket.erl
@@ -342,15 +342,16 @@ type(3) -> raw.
% Select a protocol within the family (0 means use the default
% protocol in the family)
-protocol(raw) -> 0;
+protocol(ip) -> 0;
protocol(icmp) -> 1;
protocol(tcp) -> 6;
protocol(udp) -> 17;
+protocol(raw) -> 255;
-protocol(0) -> raw;
+protocol(0) -> ip;
protocol(1) -> icmp;
protocol(6) -> tcp;
-protocol(17) -> udp.
+protocol(255) -> raw.
maybe_atom(_Type, Value) when is_integer(Value) -> Value;
maybe_atom(family, Value) -> family(Value);

0 comments on commit 1a47c1d

Please sign in to comment.
Something went wrong with that request. Please try again.