def get_mac_address_v6(ip_address):
response, unanswered = srp(Ether(dst='33:33:00:00:00:02')/IPv6(dst="FF02::2")/ICMPv6ND_RS(code = 133), \
timeout = 2, retry = 2)
for s, r in response:
return r[Ether].src
return None
logging.info('Gateway Layer 2 address is: %s' % r[Ether].src)
GATEWAY_MAC = "%s" % r[Ether].src
评论列表
文章目录