summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkinterface_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove more unused qreadwritelock.h includesMarc Mutz2022-05-171-1/+0
| | | | | | Pick-to: 6.3 6.2 Change-Id: I4962c1abcc58d36500a56ccca680f6f36c3b5d89 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QNetworkInterface/Unix: fix DNS eligibility of global addressesThiago Macieira2021-03-051-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Fixed the reporting the "DNS eligibility" factor (QNetworkAddressEntry::dnsEligibility) for global IP addresses. Previously, QNetworkInterface interface erroneously reported all global addresses as eligible, regardless of whether they had already been deprecated by the OS or were temporary in the first place. From the tst_QNetworkInterface::dump output (netmask & broadcast suppressed for readability, IPv6 prefixes changed to protect the innocent, but the local part is exactly as found on my system): address 0: 192.168.26.33/24 dns-eligible preferred:33546998ms valid:33546998ms address 1: 2001:db8::800/128 dns-eligible preferred:264817000ms valid:264817000ms address 2: fd00::800/128 dns-eligible preferred:forever valid:forever address 3: 2001:db8::2f5b:342c:fc53:b9b2/64 dns-ineligible preferred:12422000ms valid:264817000ms address 4: fd00::9351:adff:333d:5c8d/64 dns-ineligible preferred:12421999ms valid:531402999ms address 5: fd00::7297:9516:fbb4:17ac/64 dns-ineligible preferred:0ms valid:445585999ms address 6: fd00::fdc8:e620:691:3b44/64 dns-eligible preferred:forever valid:forever address 7: 2001:db8::ae82:a01:5a8a:e210/64 dns-ineligible preferred:0ms valid:264816999ms address 8: 2001:db8::c673:e0a2:8927:2118/64 dns-eligible preferred:264816999ms valid:264816999ms address 9: fe80::bd89:b998:4aeb:a5d0%bond0/64 dns-ineligible preferred:forever valid:forever Prior to this commit, only address 9 was showing as ineligible. Addresses 1 and 2 come from DHCPv6 and are thus always eligible. Addresses 3, 4, 5, and 7 are temporary addresses added on account of RFC 4941 and are therefore ineligible (they have the IFA_F_TEMPORARY flag set). Note how 5 and 7 have also stopped being preferred. Address 3 is the one I see when I go to ip6.me and address 4 is the one used to reach the router. Addresses 6, 8, and 9 are the "permanent" addresses that would normally be based on the MAC address of the interface, but are actually in "stable privacy" mode for me (RFC 8064). Address 9 is the link-local one, which makes it ineligible, leaving the other two stable addresses eligible. Addresses 1, 3, 7, and 8 are global, from a DHCPv6-PD delegation from my ISP, which is why they have finite lifetime. Addresses 2, 4, 5, and 6 are from my local Unique Local Address (ULA) prefix, which is why 2 and 6 are valid forever. Pick-to: 6.1 Change-Id: If8b43dc9678c4b4ba9c1fffd1668fdcae873c6bd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* More nullptr usage in headersKevin Funk2019-03-141-1/+1
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QNetworkInterface: add MTUThiago Macieira2017-11-071-0/+1
| | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added maxTransmissionUnit(). Change-Id: Iaf4157b7efa2416d898cfffd14d96b2970d6af87 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkInterface: Add the DNS eligibilityThiago Macieira2017-11-071-0/+15
| | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added dnsEligibility() to QNetworkAddressEntry to indicate whether the address is eligible or not for publication in DNS or similar mechanisms. Change-Id: Id3ae5f853d964358ac1ab19b525334a426e0e052 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkInterface: add support for extracting address lifetimeThiago Macieira2017-11-071-0/+5
| | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added preferredLifetime() and validityLifetime() to QNetworkAddressEntry that report the remaining lifetime of the address in the network interface. Change-Id: I292b84e2193979446e43344b0727642812cba630 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkInterface: Add type()Thiago Macieira2017-11-071-0/+2
| | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added type(). Change-Id: I7de033f80b0e4431b7f1ffff13f9a5592b5776e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Refactor QNetworkAddress not to keep a full QHostAddressThiago Macieira2017-09-251-1/+1
| | | | | | | | | | QHostAddressPrivate is one QString and 24 bytes, allocated on the heap, which is WAY too heavy for something that fits into 8 bits. So instead of storing the expanded netmask inside QNetworkAddressEntryPrivate, we store the simple prefix length and calculate the mask only if asked. Change-Id: Ie05c6480d8a44fda817ffffd14d9ad4707aa8a92 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Standardize some "We mean it" commentsFriedemann Kleint2016-08-171-3/+3
| | | | | | | Fix the occurrences where the wrong classes are mentioned. Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add qtnetworkglobal.h and qtnetworkglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Network. For now it defines the Q_NETWORK_EXPORT macro for this library. Change-Id: I9c45d425baf881c431ed71fd457c7feb2c123855 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add QNetworkInterface::interface{IndexFromName,NameFromIndex}Thiago Macieira2015-10-151-0/+3
| | | | | | | | | | These are for faster lookups between ID and name when one doesn't need the full information set about the interface. Change-Id: I7de033f80b0e4431b7f1ffff13f98d448a705c3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+123
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12