diff --git a/beka/beka.py b/beka/beka.py
index 8985684..2907ceb 100644
--- a/beka/beka.py
+++ b/beka/beka.py
@@ -97,3 +97,6 @@ class Beka(object):
             self.stream_server.stop()
         for peering in self.peerings:
             peering.shutdown()
+
+    def listening_on(self, address, port):
+        return self.local_address == address and self.bgp_port == port

Comparing Bekas
It'd be great to be able to compare Bekas, using (for example):

        self.local_address = local_address
        self.bgp_port = bgp_port
        self.local_as = local_as
        self.router_id = router_id

That way we can decide whether we need to start a new Beka or not by comparing it to an existing one.
diff --git a/test/test_beka.py b/test/test_beka.py
index b5de955..066fd0a 100644
--- a/test/test_beka.py
+++ b/test/test_beka.py
@@ -48,3 +48,20 @@ class BekaTestCase(unittest.TestCase):
             )
         )
 
+    def test_listening_on(self):
+        beka = Beka(
+            local_address='1.2.3.4',
+            bgp_port=12345,
+            local_as=23456,
+            router_id='4.3.2.1',
+            peer_up_handler=None,
+            peer_down_handler=None,
+            route_handler=None,
+            error_handler=None
+        )
+        self.assertTrue(beka.listening_on('1.2.3.4', 12345))
+        self.assertFalse(beka.listening_on('1.2.3.4', 23456))
+        self.assertFalse(beka.listening_on('4.3.2.1', 12345))
+        self.assertFalse(beka.listening_on('4.3.2.1', 23456))
+        self.assertFalse(beka.listening_on('8.8.8.8', 53))
+

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/faucetsdn/beka.git@a9e33b75342afa0a8e96d8b3475df8b6a5611af3#egg=beka
dnspython==2.7.0
eventlet==0.39.1
exceptiongroup==1.2.2
greenlet==3.1.1
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
tomli==2.2.1

name: beka
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - dnspython==2.7.0
      - eventlet==0.39.1
      - exceptiongroup==1.2.2
      - greenlet==3.1.1
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - tomli==2.2.1
prefix: /opt/conda/envs/beka

test/test_beka.py::BekaTestCase::test_listening_on
test/test_beka.py::BekaTestCase::test_add_neighbor_cannot_add_twice test/test_beka.py::BekaTestCase::test_add_neighbor_must_be_passive test/test_beka.py::BekaTestCase::test_add_route_adds_route
beka/beka.py
beka/beka.py