summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkinterface_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QNetworkInterface[unix]: fixup some memcpysMårten Nordheim2024-04-051-3/+6
| | | | | | | | | | | | | There is an untested config for enabling null-strings, so technically not supported. But if we ever want to make null mean null then we should protect against it. Also drop the explicit template argument for qMin. This means we use the hetereogeneus version which will promote to size_t. Which is the type that memcpy expects anyway. Change-Id: I91e0a3b159b065b76e9e93605ef0e502f41af74f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Network: cleanlinessMårten Nordheim2024-04-051-5/+5
| | | | | | | | | QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_BYTEARRAY QT_NO_URL_CAST_FROM_STRING Change-Id: Ic77ed8ccbdb146b7e7b26123923795f9748d3a38 Reviewed-by: Mate Barany <mate.barany@qt.io>
* QNetworkInterface: replace CMake check for ifr_index with SFINAEThiago Macieira2023-09-091-16/+14
| | | | | | | | Detecting if a member exists is very easy and saves us from running the test at CMake time. Saves about 350 ms. Change-Id: I2b24e1d3cad44897906efffd178007fdcdd18e37 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: modernize ipv6ifname and getifaddrs config checks with QT_CONFIGThiago Macieira2023-08-251-10/+6
| | | | | | | | | | | I've left the QT_NO_ macros because they were public. No one should be using them (and they are now 1 on Linux, so you had better not be using them), but just in case. Change-Id: Ifbf974a4d10745b099b1fffd177758a7a26e4244 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QNetworkInterface/Unix: replace one Q_ASSERT with static_assertsThiago Macieira2023-03-041-1/+2
| | | | | | | | | | This requires compilers with constexpr offsetof(), which Clang seems to be since at least 3.0 and GCC since 4.7, both of which are way older than anything we need to support. Pick-to: 6.5 Change-Id: I7f354474adce419ca6c2fffd1748b3dcfc616f4a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove if_types.h workaround for watchOSTor Arne Vestbø2022-08-041-3/+0
| | | | | | | | | watchOS is no longer supported, nor should the workaround be necessary anymore. Pick-to: 6.4 6.3 6.2 Change-Id: Id5898d14b10e8f4aeaf6ce42ab39dbfdff9338ef Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | 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>
* QtNetwork: replace remaining uses of QLatin1String by QLatin1StringViewSona Kurazyan2022-04-211-2/+2
| | | | | | | Task-number: QTBUG-98434 Change-Id: I0bb9d534ee42ccbf7d353e251ef58901a86923b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix compiler warnings about unused parametersPasi Petäjäjärvi2022-02-251-0/+2
| | | | | | | | | When FEATUREs getiffaddrs and ipv6ifname are not enabled variables are unused. Pick-to: 5.15 6.2 6.3 Change-Id: I0fde7ef3a4ee1e89927e2c5550ac24fba76ba155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Solaris support in cmake buildNiclas Rosenvik2021-04-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add SOLARIS cmake platform definition. Add settings for QT_DEFAULT_MKSPEC so that qplatformdefs.h can be found. Solaris has its gssapi symbols in libgss. Solaris supports @ORIGIN. Solaris ld does not support --dynamic-list needed for reduce relocations. Make solaris fail the reduce relocation test. getauxval is specific to GNU libc and some other libc implementations on Linux but sys/auxv.h is not. The bootstrap uses sys/aux.h as the only indication for getauxval. This breaks builds on Solaris, so only make sys/auxv.h an indicator for getauxval on linux or glibc based systems. Solaris uses X11 so add it to the X11_SUPPORTED list. Solaris network libraries for sockets etc are in socket and nsl. ifreq does not have a member ifr_ifindex on Solaris, it uses ifr_index. Add test to check if ifr_index is a member of ifreq. The first struct in the in_addr union on solaris is defined as four uint8_t, therefore four arguments are needed for its initializer list. Change-Id: Ieed4c1bbac8559a7ae1db9c4e1e91f609f150270 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-071-2/+2
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-4/+4
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-1/+1
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNetworkInterface (Unix): port two local tracker (QSet/QLVA) to ↵Marc Mutz2020-06-081-10/+9
| | | | | | | | | | | QDuplicateTracker Apart from a more fitting, minimal, API, QDuplicateTracker also transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or at least reduce, memory allocations. Change-Id: I025504c7d22fb7a8c943e3968e4613d45c08d0b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix reporting the network interface type on macOS 10.14.5 and laterKarsten Heimrich2019-08-281-0/+1
| | | | | | | | | | | | | * initialize the structure used as argument to ioctl SIOCGIFMEDIA The ioctl in ifType(...) returned -1 and set errno to EFAULT, thus the code to determine the interface type was not executed. Task-number: QTBUG-76408 Change-Id: Ib69c2c0cd4dda3604d568adf9746e0c9a280e9a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Work around FreeBSD 12.0 breaking source compatibility with IFM_FDDIThiago Macieira2019-01-011-0/+2
| | | | | | | | | The macro disappeared. qnetworkinterface_unix.cpp:467:14: error: use of undeclared identifier 'IFM_FDDI'; did you mean 'IFT_FDDI'? Fixes: QTBUG-72775 Change-Id: I548dbfddb69b4fd6a0a3fffd1574e1ad4e670e5b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* qnetworkinterface_unix: Use qstrncpy instead of strlcpyDmitry Shachnev2018-11-221-2/+3
| | | | | | | | | | | | strlcpy is not available on some UNIX platforms, such as GNU/kFreeBSD. qstrncpy is available everywhere and has similar semantics (in addition it fills the rest of buffer size with NULL bytes, but that does not cause extra work as our buffer sizes are small). Change-Id: I76c5905eba248fd9fbc1f63f05e88e0617f8407a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkInterface: fix warning of unused functionAlex Trotsenko2017-12-291-0/+2
| | | | | | | | | | | | | | | That causes compilation error in developer build or when '-Werror' command line argument is forced: kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function] static int getMtu(int socket, struct ifreq *req) ^ cc1plus: all warnings being treated as errors So, mark 'getMtu()' as unused in the appropriate branches. Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* A temporary fix for CI: define macros from the missing if_types.hTimur Pocheptsov2017-11-231-1/+5
| | | | | | | | | | | | One of our CI machines has WatchOS SDK 3.2 which is missing net/if_types.h. This block integrations and until SDK is updated in VM, we provide the missing macros from if_types.h. To be removed ASAP. Task-number: QTBUG-64447 Change-Id: I202d3313b9a6a6d7bd29670f0bffc182d4660f81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QNetworkInterface - fix iOS/tvOS/watchOS buildsTimur Pocheptsov2017-11-161-1/+5
| | | | | | | | | | | netinet/in_var.h, netinet6/in6_var.h, and net/if_media.h are missing in iPhoneOS.sdk(s). We only use several macros and data-structs from these headers, so to work-around the broken build we provide the missing definitionis. Task-number: QTBUG-64447 Change-Id: I1b8169c12b4f33959f949bbf29e80f639ab31ad3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QNetworkInterface: add MTUThiago Macieira2017-11-071-1/+19
| | | | | | | | [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/+11
| | | | | | | | | [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-1/+59
| | | | | | | | | [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/+64
| | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added type(). Change-Id: I7de033f80b0e4431b7f1ffff13f9a5592b5776e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkInterface: add a Linux backend directly using AF_NETLINKThiago Macieira2017-11-071-37/+1
| | | | | | | | | | | | | | | | | | This allows us a lot greater detail in getting information than relying on getifaddrs() function. It is also the only way of getting some extra information we'll need in the future, like address lifetimes. The parser will also be helpful if we want to add a network interface monitor in the future, though I currently have no clue how to do the equivalent on macOS and Windows. This commit does not remove the support for getifaddrs() on Linux, but I will no longer add features to it. Note that Android does not support getifaddrs(), so this may be an improvement if AF_NETLINK works there. Change-Id: I3868166e5efc45538544fffd14d8e6f993e1eb91 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Stop including net/if.h from qplatformdefs.hThiago Macieira2017-10-081-0/+4
| | | | | | | | | I need to include linxx/if.h from elsewhere and these two files conflict by defining the same types (struct ifreq, struct ifmap, struct ifconf, etc.) Change-Id: I0a103569c81b4711a649fffd14eb2f6dbbef83b6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QNetworkInterface: Fold the test for if_nameindex into the config testThiago Macieira2017-08-241-5/+0
| | | | | | | | No need to make workarounds for Android in the .cpp source. Just let it fail (if it still has to fail). Change-Id: Iaf4157b7efa2416d898cfffd14d94ebcb4d979be Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-291-0/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/uikit/xcodebuild.mk tests/auto/other/lancelot/tst_lancelot.cpp tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-281-0/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qfiledialog.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I34bc8a990f8f526889a95a5c7099ef557b9681ad
| | * QNetworkInterface: fix reporting of virtual interfaces on LinuxThiago Macieira2016-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We checked if we had seen the interface by looking into seenInterfaces and seenIndexes, but we never updated those variables with what we saw in this block. This fixes the reporting of PPP interfaces as well as TUN/TAP virtual interfaces. Change-Id: I33dc971f005a4848bb8ffffd1476830b8482b808 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Use QString::fromLatin1() less to avoid string allocationsAnton Kudryavtsev2016-09-151-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString::fromLatin1 always allocates memory, but there are cases where we can avoid/reduce allocations or/and reduce text size, e.g.: QStringBuilder expressions Fix: replace QString::fromLatin1 with QL1S QString::fromLatin1().arg(String) pattern Fix: replace with QStringBuilder Overloaded functions with QL1S arg Fix: replace QString::fromLatin1 with QL1S In rare cases if there is no overloaded function with QL1S and we have deal with string literal, replace QString::fromLatin1 with QStringLiteral. Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-18/+18
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * QNetworkInterface: don't add a QNetworkAddressEntry if no IP is knownThiago Macieira2016-01-211-17/+17
| | | | | | | | | | | | | | | | | | | | If SIOCGIFADDR fails, then don't bother trying to get the broadcast address or netmask, and especially don't add the empty QNetworkAddressEntry to the interface. This can happen on interfaces that have no IP address assigned (for example, inactive interfaces). Change-Id: I8de47ed6c7be4847b99bffff141c326d94ecca78 Reviewed-by: Richard J. Moore <rich@kde.org>
| * QNetworkInterface: fix handling of interfaces with no addressesThiago Macieira2016-01-211-1/+1
| | | | | | | | | | | | | | | | Certain Linux interfaces have no addresses at all (hardware or IP), like the nlmon interfaces. They weren't being reported. Change-Id: I8de47ed6c7be4847b99bffff141c2b60c2089ad3 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Updated license headersJani Heikkinen2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-7/+31
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * QNetworkInterface: fix support for address labels on Linux interfacesThiago Macieira2015-12-081-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64a1448d87727878d9789906b2f4f5b9e3d74e38 (Qt 5.2) caused QNetworkInterface to report address labels (a.k.a. interface aliases) as separate interfaces. This is caused by the fact that glibc, uClibc and MUSL copy the address label (netlink address attribute IFA_LABEL) to the ifa_name field, which made QNetworkInterfaceManager think that it was an interface it hadn't yet seen. Address labels are the old way to add more than one IP address to an interface on Linux, for example: ifconfig eth0:1 192.0.2.2 Those do not create a new interface, so the "eth0:1" label maps to the same interface index as the parent interface. This has been deprecated for 10 years, but there are still tools out there that add addresses in this manner. This commit restores behavior compatibility with Qt 4.2-5.1. The Qt 5.2-5.5 behavior is incorrect because it reports more than one interface with the same index. On systems configured like the above, the tst_QNetworkInterface::interfaceFromXXX test was failing. Change-Id: I8de47ed6c7be4847b99bffff141c2d9de8cf7329 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Haiku: Fix compilation of network libraryTobias Koenig2015-12-081-0/+4
| | | | | | | | | | | | | | | | | | Like on some BSD systems, the member of the ifreq structure is called ifr_index and not ifr_ifindex on Haiku OS. Change-Id: I273de0c703b1c89dbac537c68e52db219d2da50e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QNetworkInterface::interface{IndexFromName,NameFromIndex}Thiago Macieira2015-10-151-8/+50
|/ | | | | | | | | | 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>
* QNetworkInterface: Merge the two sections of code that do SIOCGIFxxxThiago Macieira2015-08-161-21/+21
| | | | | | | | The separation was accidental due to refactoring. It does not need to exist. Change-Id: I7de033f80b0e4431b7f1ffff13f988adc47d57d5 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkInterface: prefer SIOCGIFINDEX over if_nametoindexThiago Macieira2015-08-161-1/+6
| | | | | | | | | | On Linux (on a bad system without getifaddrs), the ioctl for SIOCGIFINDEX should be faster than if_nametoindex. The ioctl on the already open socket will require one syscall, while if_nametoindex will require at least one more (to open the socket), probably more. Change-Id: I7de033f80b0e4431b7f1ffff13f9888bf2044105 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix warning of unused variableThiago Macieira2015-08-151-2/+1
| | | | | | | | Only happens on systems without getifaddrs, which we aren't usually testing. Change-Id: I7de033f80b0e4431b7f1ffff13f9889f5cfdea5b Reviewed-by: Richard J. Moore <rich@kde.org>
* IPv6 scope IDs are unsignedThiago Macieira2015-03-141-1/+1
| | | | | | | | We need to make sure that a large scope ID saved in a QString does get converted properly back to an integer. Change-Id: Iee8cbc07c4434ce9b560ffff13c9bd0e9008bd9c Reviewed-by: Richard J. Moore <rich@kde.org>
* 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>
* Haiku: Make network module compile on HaikuTobias Koenig2015-01-141-0/+5
| | | | | | | | | Add the missing definition for IFF_RUNNING like documented on http://ports.haiku-files.org/wiki/CommonProblems Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix problem with QNetworkAddressEntry returning a invalid netmask.Christian Strømme2013-11-271-6/+6
| | | | | | | | | | | The ip address should be set before the netmask. The reason for this is that QNetworkAddressEntry::setNetmask() compares the protocol of the netmask and the ip, if they don't match the netmask won't be set. Task-number: QTBUG-33911 Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update Linux interface getting to make fewer syscallsThiago Macieira2013-08-241-29/+29
| | | | | | | | | | | Each time we call if_nametoindex, if_indextoname or somesuch, the libc needs to open a socket, make an ioctl, and close the socket. Since we've got most of the information we need anyway in the data from getifaddrs(3), let's just use it Change-Id: I572c212a27c4b9ffe57980b36f75bb04e6d5cf29 Reviewed-by: Jonas Gastal <gastal@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>