Skip to main content

Discover SLAAC IPv6 neighbors and resolve their names via mDNS (Avahi)

Project description

SLAAC Resolver

Discover SLAAC-configured IPv6 neighbors and resolve their mDNS names using Avahi.

Overview

This tool scans a given network interface for IPv6 neighbors discovered via SLAAC, and attempts to resolve their names using avahi-resolve-address. It can be used both as a command-line utility and as a Python library.

Installation

Clone the repository and install it in editable mode:

git clone https://github.com/cjuniorfox/slaac-resolver.git
cd slaac-resolver
pip install -e .

This will make the slaac-resolver command available on your system.

Usage

Command-Line Interface

slaac-resolver <interface> [--log-level <LOG_LEVEL>]

. --log-level is optional. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL. Default is INFO.

Example:

slaac-resolver br0 --log-level DEBUG

The output is a JSON list of resolved neighbors, like:

[
  {
    "hostname": ["mydevice", "local"],
    "ipv6": ["fe80", "", "abcd", "1234", "5678", "9abc", "def0", "1234"]
  }
]

Python Library

You can also use the resolver in your Python code:

from slaac_resolver import get_ipv6_neighbors

neighbors = get_ipv6_neighbors("br0", log_level=logging.DEBUG)
print(neighbors)

Requirements

  • Python 3.7+
  • ip command (from iproute2)
  • avahi-resolve-address (part of avahi-utils)

License

GNU 3.0 License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slaac_resolver-0.0.3.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slaac_resolver-0.0.3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file slaac_resolver-0.0.3.tar.gz.

File metadata

  • Download URL: slaac_resolver-0.0.3.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for slaac_resolver-0.0.3.tar.gz
Algorithm Hash digest
SHA256 593a236495c5f1779799e5f56193c649ade99ee2627a051d1b67ce07cc8d7d58
MD5 3c676814ef749661a082d4505dbee9b4
BLAKE2b-256 5bd1d60927ced24ac42b62b759a1c5996c7000bce0a85be209d7a7bc1960fa99

See more details on using hashes here.

File details

Details for the file slaac_resolver-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: slaac_resolver-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for slaac_resolver-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a8eda8832ed08e0e323d716c819787ed61d76631e257e33fcac584d1685f2e9
MD5 e6436ccc830d48c3011a940e69cc501b
BLAKE2b-256 cab02897da9ac20ad677edcdfd6109e843bf670fd64c8a123df05511fae02df7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page