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.4.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.4-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slaac_resolver-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f4765e9fd39fa87828159018b7047223635e9b4faa744e10c3f5b9b3bec301d3
MD5 a7497780af63e06498a1e54bd3c2cec3
BLAKE2b-256 217ce2b2420ccfe0e158ca35f5ff4c7234700c92b49b87797980cc9bdb67cb09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slaac_resolver-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2991fb82ddb86084780ec953f3ce0bc3118883b1b565d302279bffd3667d37
MD5 840940fb77bec96ad60c7523ac636f42
BLAKE2b-256 b398d74b954ec6c01bdb95db0243a7260f2bdb6f8a9d999d65b7f020b67af414

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