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.5.tar.gz (15.5 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.5-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slaac_resolver-0.0.5.tar.gz
  • Upload date:
  • Size: 15.5 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.5.tar.gz
Algorithm Hash digest
SHA256 22bd6bfc71083673d29ef2171ebe91165d9fbe17338aac24f0c899a597f5ba9a
MD5 69c7532fa297f9c4b16b90a8005b81bb
BLAKE2b-256 e20103efb2d50e229edceb660e90cf03fe77a5bbd7cd59b5e05c1f36d58728d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slaac_resolver-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1a9ab3d42fa1685b9c1986e451f5ec33138fdc4110936f5915975bbe003fd9a
MD5 83bddeb32b2c605c3d322783aa5ba0c4
BLAKE2b-256 1cceff9dd732c416f764082692271240ad2e02c9c29ac84229773c27a469c9c7

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