def in6_getLocalUniquePrefix():
 tod = time.time()
 i = int(tod)
 j = int(((tod - i) * (2 ** 32)))
 tod = struct.pack('!II', i, j)
 rawmac = get_if_raw_hwaddr(conf.iface6)[1]
 mac = ':'.join(map((lambda x: ('%.02x' % ord(x))), list(rawmac)))
 eui64 = inet_pton(socket.AF_INET6, ('::' + in6_mactoifaceid(mac)))[8:]
 import sha
 globalid = sha.new((tod + eui64)).digest()[:5]
 return inet_ntop(socket.AF_INET6, (('\xfd' + globalid) + ('\x00' * 10)))

def in6_getLocalUniquePrefix ( ) : tod = time . time ( ) i = int ( tod ) j = int ( ( ( tod - i ) * ( 2 ** 32 ) ) ) tod = struct . pack ( '!II' , i , j ) rawmac = get_if_raw_hwaddr ( conf . iface6 ) [ 1 ] mac = ':' . join ( map ( ( lambda x : ( '%.02x' % ord ( x ) ) ) , list ( rawmac ) ) ) eui64 = inet_pton ( socket . AF_INET6 , ( '::' + in6_mactoifaceid ( mac ) ) ) [ 8 : ] import sha globalid = sha . new ( ( tod + eui64 ) ) . digest ( ) [ : 5 ] return inet_ntop ( socket . AF_INET6 , ( ( '\xfd' + globalid ) + ( '\x00' * 10 ) ) )
returns a pseudo-randomly generated local unique prefix .