Network Module#

SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2

This module provides network helper routines.

core.network.get_addr(if_name: str) → str | None#

Get the IPv4 address for the given interface name.

core.network.get_interface_addresses(interface_names: list[str] | None) → list[str]#

Get all multicast interface addresses for a given list of interface names.

core.network.get_interface_names() → list[str]#

Get all multicast interface names.

core.network.get_loopback_interface_name() → str#
core.network.validate_interface(interface_name: str) → str#

Validate that the provided interface exists.

interface :: name of an existing network interface.

Raises ValueError if the interface does not exist.