(m)
return ''.join(map(lambda x: struct.pack('!I', x), t))
Return the mask (bitstring) associated with provided length 
    value. For instance if function is called on 48, return value is
    '\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'.
Return the mask (bitstring) associated with provided length 
    value. For instance if function is called on 48, return value is
    '\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'.
Return the mask ( bitstring ) associated with provided length value . For instance if function is called on 48 return value is \ xff \ xff \ xff \ xff \ xff \ xff \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 \ x00 .
def in6_cidr2mask(m):
    """
    Return the mask (bitstring) associated with provided length 
    value. For instance if function is called on 48, return value is
    '\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'.
    
    """
    if m > 128 or m < 0:
        raise Scapy_Exception("value provided to in6_cidr2mask outside [0, 128] domain (%d)" % m)

    t = []
    for i in xrange(0, 4):
        t.append(max(0, 2**32  - 2**(32-min(32, m))))
        m -= 32

    return ''.join(map(lambda x: struct.pack('!I', x), t))
def in6_cidr2mask ( m ) : if m > 128 or m < 0 : raise Scapy_Exception ( "value provided to in6_cidr2mask outside [0, 128] domain (%d)" % m ) t = [ ] for i in xrange ( 0 , 4 ) : t . append ( max ( 0 , 2 ** 32 - 2 ** ( 32 - min ( 32 , m ) ) ) ) m -= 32 return '' . join ( map ( lambda x : struct . pack ( '!I' , x ) , t ) )