Skip to main content

MLD

PyPI - Python Version PyPI PyPI - License

This repository stores the implementation of MLDv1 router-side state machines. This can be used to detect multicast interest of directly connected hosts.

The goal of this repository/module is to facilitate maintainability of this MLD implementation since its code is used by other Python projects/modules:

Requirements

  • Linux machine
  • Python3 (we have written all code to be compatible with at least Python v3.3)
  • pip (to install all dependencies)

Installation

pip3 install py-mld

How to use it?

# import module
from mld import InterfaceMLD

intf = InterfaceMLD(interface_name="eth0")
intf.enable()  # start receiving MLD packets

# get information from a given multicast group
multicast_group_obj = intf.interface_state.get_group_state(group_ip="ff05::10:11:12")

interest = multicast_group_obj.has_members()  # boolean that informs if there is
                                              # multicast interest in this group
group_state = multicast_group_obj.state.print_state()  # get string identifying
                                                       # the state in which this
                                                       # group is at

# get notified of interest changes on this group
class MulticastGroupNotifier:
    def notify_membership(self, has_members):
        print(has_members)

notifier = MulticastGroupNotifier()
multicast_group_obj.add_multicast_routing_entry(notifier)

# when there is a change of multicast interest (for example group ff05::10:11:12
# gets interested receivers), the object associated to this object is notified
# through "notify_membership" method with has_members=True

# if you no longer want to monitor the interest of ff05::10:11:12, remove the
# notifier from the group
multicast_group_obj.remove_multicast_routing_entry(notifier)

intf.remove()  # stop receiving MLD packets

Metadata

Release files for py-mld 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-mld 1.0.3
File Size Uploaded Provenance
py-mld-1.0.3.tar.gz 15.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for py-mld 1.0.3
File Interpreter ABI Platform
py_mld-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / py-mld-1.0.3.tar.gz

Download URL py-mld-1.0.3.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92028b2c45243d44aee30417395d9916fba01d6259b960c68bad42b9dd224956
BLAKE2b-256 checksum
How to use checksums
4ce901e8889f2055ef7017da47bf5c46615c4c38db2d818a2679de074c2c2169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / py_mld-1.0.3-py3-none-any.whl

Download URL py_mld-1.0.3-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e0254323b38b383598d4361166f0b33f8b3657684d63de25928fc3e0d9772b2
BLAKE2b-256 checksum
How to use checksums
fb56628376ddd5b89bb464c1f98d17480b2d0b16776c128dc56a51f701479187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Security for py-mld 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page