示例#1
0
文件: traffic.py 项目: itbj/exabgp
 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))
示例#2
0
	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
			)
		)