(self, pkt)
Listen for neighbor solicitations
Listen for neighbor solicitations
Listen for neighbor solicitations
def handler(self, pkt):
        """Listen for neighbor solicitations"""
        if ICMPv6ND_NS in pkt:
            v6_type = pkt[ICMPv6ND_NS].type
            if v6_type is 135:
                # respond
                npkt = IPv6(dst=pkt[IPv6].src, src=pkt[IPv6].dst)
                npkt /= ICMPv6ND_NA()
                send(npkt, count=1)
                log_msg('Responded to %s' % pkt[IPv6].src)
def handler ( self , pkt ) : if ICMPv6ND_NS in pkt : v6_type = pkt [ ICMPv6ND_NS ] . type if v6_type is 135 : # respond npkt = IPv6 ( dst = pkt [ IPv6 ] . src , src = pkt [ IPv6 ] . dst ) npkt /= ICMPv6ND_NA ( ) send ( npkt , count = 1 ) log_msg ( 'Responded to %s' % pkt [ IPv6 ] . src )