I am sniffing packets and need to know which packets are ICMPv6 Echo Request packets and which are UDP packets.
I know that I can do
P = sniff(filter='ip6 and host fe80::xx:xx:xx:xx',count=0)
IP in P #will return false (my packets are IPv6)
UDP in P #will return true (when the specific packet is indeed UDP)
but I don't know how to check for ICMPv6 packets, and even more specifically ICMPv6 Echo Request packets... It doesn't seem like I can even check for anything IP version 6:
IPv6, IP6, ipv6, ip6, icmpv6, ICMPv6, icmp6, ICMP6 all return a
NameError: name 'x' is not defined
Does anyone know of a way to do such a thing?
IPv6 in P
works fine for me. – abarnertUDP in P
is False,UDP in P[0]
is True,IPv6 in P
is False,IPv6 in P
is True,P[0][IPv6]
is an IPv6 packet, … – abarnert