Permalink
Browse files

Macros for IPv6

  • Loading branch information...
1 parent c153830 commit 0a42cd31ac0af1f32c6d3a57d9d217b3472186ac @msantos committed Apr 13, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 include/pkt.hrl
  2. +2 −0 src/pkt.erl
View
@@ -67,6 +67,7 @@
-define(IPPROTO_ICMP, 1).
-define(IPPROTO_TCP, 6).
-define(IPPROTO_UDP, 17).
+-define(IPPROTO_IPV6, 41).
-define(IPPROTO_GRE, 47).
-define(IPPROTO_ICMPV6, 58).
-define(IPPROTO_SCTP, 132).
View
@@ -133,9 +133,11 @@ family(?PF_INET) -> ipv4;
family(?PF_INET6) -> ipv6;
family(_) -> unsupported.
+proto(?IPPROTO_IP) -> ip;
proto(?IPPROTO_ICMP) -> icmp;
proto(?IPPROTO_TCP) -> tcp;
proto(?IPPROTO_UDP) -> udp;
+proto(?IPPROTO_IPV6) -> ipv6;
proto(?IPPROTO_SCTP) -> sctp;
proto(?IPPROTO_GRE) -> gre;
proto(?IPPROTO_RAW) -> raw;

0 comments on commit 0a42cd3

Please sign in to comment.