Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111211

QHostAddress function to test if an address is in a space reserved for private use

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Network
    • None
    • f80b0aee6 (dev)

    Description

      QHostAddress has the function isGlobal, based on the IPv6 specification of 'global', but this is not correlated in any way with an address being inside a "local" or "private use" space, esp. for IPv6-mapped IPv4 addresses, which are considered "global".
      Users may be interested in testing if an address is inside a LAN (or VLAN), and will then have to test if an address is in a private use space.
      This is, for example for IPv4, the 192.168.0.0/24 space you will often see in residential use. Or the 10.0.0.0/8 space in commercial use. [0]

      For IPv6, this would be the deprecated site-local addresses (fec0::/10) and the Unique Local Addresses (fc00::/7).

      In short: add a function, isPrivateUse, which returns true if an address is inside a 'private use' space, whether IPv4, IPv6, or some mapping.

      [0] https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
      [1] https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml

      Attachments

        Issue Links

          Activity

            People

              cnn Qt Core & Network
              manordheim MÃ¥rten Nordheim
              Vladimir Minenko Vladimir Minenko
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: