Skip to content

Default values

diamond_miner.defaults

Constants that are used as default values for function's arguments throughout the code.

DEFAULT_FAILURE_RATE = 0.05 module-attribute

Default MDA failure rate.

DEFAULT_PREFIX_LEN_V4 = 24 module-attribute

Default prefix length for IPv4.

DEFAULT_PREFIX_LEN_V6 = 64 module-attribute

Default prefix length for IPv6.

DEFAULT_PREFIX_SIZE_V4 = 2 ** 32 - DEFAULT_PREFIX_LEN_V4 module-attribute

Default prefix size (number of addresses) for IPv4.

DEFAULT_PREFIX_SIZE_V6 = 2 ** 128 - DEFAULT_PREFIX_LEN_V6 module-attribute

Default prefix size (number of addresses) for IPv6.

DEFAULT_PROBE_DST_PORT = 33434 module-attribute

Default probe destination port. Unused for ICMP probes.

DEFAULT_PROBE_SRC_PORT = 24000 module-attribute

Default probe source port. Encoded in the ICMP checksum field for ICMP probes.

PROTOCOLS: dict[int | str, int | str] = {1: 'icmp', 17: 'udp', 58: 'icmp6', 'icmp': 1, 'udp': 17, 'icmp6': 58} module-attribute

Mapping of IP protocol numbers to caracal protocol strings.

UNIVERSE_SUBSET = IPv6Network('::/0') module-attribute

Set of all possible IP addresses.