OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
exabgp
/
bgp
/
message
/
update
/
attribute
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
__init__.py
2.11 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
aggregator.py
2.29 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
aigp.py
2.96 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
aspath.py
7.64 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
atomicaggregate.py
1.24 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
attribute.py
9.04 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
attributes.py
17.79 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
bgpls
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
clusterlist.py
1.65 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
community
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
generic.py
1.67 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
localpref.py
1.21 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
med.py
1.18 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
mprnlri.py
7.88 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
mpurnlri.py
3.58 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
nexthop.py
1.84 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
origin.py
1.78 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
originatorid.py
890 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📄
pmsi.py
4.97 KB
03/13/2021 04:30:48 PM
rw-r--r--
📁
sr
-
03/16/2023 12:55:54 PM
rwxr-xr-x
Editing: clusterlist.py
Close
# encoding: utf-8 """ clusterlist.py Created by Thomas Mangin on 2012-07-07. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.util import concat_bytes_i from exabgp.protocol.ip import IPv4 from exabgp.bgp.message.update.attribute.attribute import Attribute # =================================================================== # class ClusterID(IPv4): def __init__(self, ip): IPv4.__init__(self, ip) @Attribute.register() class ClusterList(Attribute): ID = Attribute.CODE.CLUSTER_LIST FLAG = Attribute.Flag.OPTIONAL CACHING = True __slots__ = ['clusters', 'packed', '_len'] def __init__(self, clusters, packed=None): self.clusters = clusters self._packed = self._attribute(packed if packed else concat_bytes_i(_.pack() for _ in clusters)) self._len = len(clusters) * 4 def __eq__(self, other): return self.ID == other.ID and self.FLAG == other.FLAG and self.clusters == other.clusters def __ne__(self, other): return not self.__eq__(other) def pack(self, negotiated=None): return self._packed def __len__(self): return self._len def __repr__(self): if self._len != 1: return '[ %s ]' % ' '.join([str(_) for _ in self.clusters]) return '%s' % self.clusters[0] def json(self): return '[ %s ]' % ', '.join(['"%s"' % str(_) for _ in self.clusters]) @classmethod def unpack(cls, data, negotiated): clusters = [] while data: clusters.append(IPv4.unpack(data[:4])) data = data[4:] return cls(clusters)