OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
exabgp
/
reactor
/
api
/
command
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
469 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
announce.py
18.82 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
command.py
809 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📄
limit.py
2.49 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
neighbor.py
6.41 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
reactor.py
3.08 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
rib.py
5.85 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
watchdog.py
1.57 KB
03/13/2021 04:30:48 PM
rw-r--r--
Editing: watchdog.py
Close
# encoding: utf-8 """ line/watchdog.py Created by Thomas Mangin on 2017-07-01. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.reactor.api.command.command import Command def register_watchdog(): pass @Command.register('text', 'announce watchdog') def announce_watchdog(self, reactor, service, line): def callback(name): # XXX: move into Action for neighbor_name in reactor.configuration.neighbors.keys(): neighbor = reactor.configuration.neighbors.get(neighbor_name, None) if not neighbor: continue neighbor.rib.outgoing.announce_watchdog(name) yield False reactor.processes.answer_done(service) try: name = line.split(' ')[2] except IndexError: name = service reactor.asynchronous.schedule(service, line, callback(name)) return True @Command.register('text', 'withdraw watchdog') def withdraw_watchdog(self, reactor, service, line): def callback(name): # XXX: move into Action for neighbor_name in reactor.configuration.neighbors.keys(): neighbor = reactor.configuration.neighbors.get(neighbor_name, None) if not neighbor: continue neighbor.rib.outgoing.withdraw_watchdog(name) yield False reactor.processes.answer_done(service) try: name = line.split(' ')[2] except IndexError: name = service reactor.asynchronous.schedule(service, line, callback(name)) return True