def ipv6_link_mcast_from_ucast(ucast):
link_mcast_prefix = ipaddr.IPv6Network('ff02::1:ff00:0/104')
mcast_bytes = ipaddr.Bytes(
link_mcast_prefix.packed[:13] + ucast.packed[-3:])
link_mcast = ipaddr.IPv6Address(mcast_bytes)
return link_mcast
评论列表
文章目录