[][src]Module iptools::ipv4

Constants

BENCHMARK_TESTS

Inter-network communications testing RFC 2544

BROADCAST

Broadcast messages to the current network (only valid as destination address) RFC 919

CURRENT_NETWORK

Broadcast messages to the current network (only valid as source address) RFC 5735

DUAL_STACK_LITE

Dual-Stack Lite link address RFC 6333

IETF_PROTOCOL_RESERVED

IETF protocol assignments reserved block RFC 5735

IPV6_TO_IPV4_RELAY

6to4 anycast relay RFC 3068

LINK_LOCAL

Autoconfiguration when no IP address available RFC 3972

LOCALHOST

Common localhost address RFC 5735

LOOPBACK

Loopback addresses on the local host RFC 5735

MAX_IP

Last ip

MIN_IP

First ip

MULTICAST

Multicast reserved block RFC 5771

MULTICAST_INTERNETWORK

Forwardable multicast RFC 5771

MULTICAST_LOCAL

Link local multicast RFC 5771

PRIVATE_NETWORK_10

Private network RFC 1918

PRIVATE_NETWORK_172_16

Private network RFC 1918

PRIVATE_NETWORK_192_168

Private network RFC 1918

RESERVED

Former Class E address space. Reserved for future use RFC 1700

SHARED_ADDRESS_SPACE

Carrier-grade NAT private network RFC 6598

TEST_NET_1

Documentation and example network RFC 5737

TEST_NET_2

Documentation and example network RFC 5737

TEST_NET_3

Documentation and example network RFC 5737

Statics

RESERVED_RANGES

IETF and IANA reserved ip addresses

Functions

bin_i32
bin_u32
cidr2block

Converts a CIDR notation ip address into a tuple containing the network block start and end addresses

hex2ip

Converts a hex encoded integer to a dotted-quad ip address

ip2long

Converts a dotted-quad ip address to a network byte order 32 bit integer

ip2network

Converts a dotted-quad ip to base network number

ip2hex

Converts a dotted-quad ip address to a hex encoded number

long2ip

Converts a network byte order 32 bit integer to a dotted quad ip address

netmask2prefix

Converts a dotted-quad netmask into a CIDR prefix

subnet2block

Converts a dotted-quad ip address including a netmask into a tuple containing the network block start and end addresses

validate_cidr

Validates a CIDR notation

validate_ip

Validates a dotted-quad ip address

validate_netmask

Validates that a dotted-quad ip address is a valid netmask

validate_subnet

Validates a dotted-quad ip adress including a netmask