def __init__(self, ip, asn, community=None): self.ip = ip self.asn = asn ExtendedCommunityIPv6.__init__( self, community if community is not None else pack( "!BB16sH", 0x00, 0x02, socket.inet_aton(socket.AF_INET6, ip), asn))
def __init__ (self, ip, copy, community=None): self.ip = ip self.copy = copy ExtendedCommunityIPv6.__init__( self, community if community is not None else pack( "!2s16sH", self._subtype(), ip.pack(), 1 if copy else 0 ) )