Skip to content

gh-111442: Use first_address and last_address internally, and refer to them in IPv4 and IPv6 networks as network_address, subnet_router_anycast or broadcast_address only if appropriate to the address family. #132420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions Doc/library/ipaddress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,24 @@ dictionaries.
These attributes are true for the network as a whole if they are true
for both the network address and the broadcast address.

.. attribute:: first_address

The first address in the network, the one with all the host bits cleared.
This is the same as the network_address for IPv4 networks.

.. attribute:: network_address

The network address for the network. The network address and the
prefix length together uniquely define a network.

.. attribute:: last_address

The last address in the network, the address with all the host bits set.
This is the same as the broadcast_address for IPv4 networks.

.. attribute:: broadcast_address

The broadcast address for the network. Packets sent to the broadcast
The same as :attr:`last_address` for IPv4 networks. Packets sent to this
address should be received by every host on the network.

.. attribute:: hostmask
Expand Down Expand Up @@ -756,8 +766,21 @@ dictionaries.
.. attribute:: is_reserved
.. attribute:: is_loopback
.. attribute:: is_link_local
.. attribute:: network_address
.. attribute:: broadcast_address
.. attribute:: first_address

The first address in the network, the one with all the host bits cleared.
This is the same as the subnet_router_anycast_address for IPv6 networks.

.. attribute:: subnet_router_anycast_address

The Subnet-Router anycast address for the network, which is the first address
in the network.

.. attribute:: last_address

The last address in the network, the one with all the host bits set.
This has no special meaning for IPv6 networks.

.. attribute:: hostmask
.. attribute:: netmask
.. attribute:: with_prefixlen
Expand Down
Loading
Loading