summaryrefslogtreecommitdiffstats
path: root/drivers/unix/ip_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@fd4c29a189e53a1e085df5b9b9a05cac9351b3efSpartan3222024-11-191-71/+4
|\
| * [Net] Split Unix/Windows IP implementationFabio Alessandrelli2024-11-121-71/+4
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* UWP: Remove platform port, needs to be redone from scratch for 4.xRémi Verschelde2023-09-071-47/+18
| | | | | | | | | | | The UWP platform port was never ported to the Godot 4.0+ API, and it's now accumulating bitrot as it doesn't compile, and thus we no longer propagate platform changes in it. So we finally remove to acknowledge this state. There's still some interest in reviving the UWP port eventually, especially as support for Direct3D 12 will soon be merged, but when that happens it will be easiest to redo it from scratch.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* [Net] IP uses print_verbose when getaddrinfo fails.Fabio Alessandrelli2022-08-051-2/+2
| | | | | | Avoid spamming errors when network is disconnected. Returned address will be invalid, so it can be checked by the user via `ret.is_valid_ip_address`.
* Replace most uses of Map by HashMapreduz2022-05-161-6/+6
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-13/+16
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* [Net] Simplify IP resolution code, fix caching.Fabio Alessandrelli2022-01-291-1/+1
| | | | | | | | | | First, we should not insert into cache if the hostname resolution has failed (as it might be a temporary internet issue), second, the async resolver should also properly insert into cache. Took the chance to remove some duplicate code with critical section in it at the cost of little performance when calling the blocking resolve_hostname function.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Replaced NULL with nullptrM. Huri2021-10-121-1/+1
|
* Add missing WIN32_LEAN_AND_MEANBartłomiej T. Listwon2021-09-231-2/+2
|
* Remove unused code related to Travis CIHugo Locurcio2021-07-011-12/+0
|
* Support multiple address resolution in DNS requestsChuck2021-06-011-6/+16
| | | | | | | | Add two new functions to the IP class that returns all addresses/aliases associated with a given address. This is a cherry-pick merge from 010a3433df43a94fee95474360ffa6662c7441b9 which was merged in 2.1, and has been updated to build with the latest code. This merge adds two new methods IP.resolve_hostname_addresses and IP.get_resolve_item_addresses that returns a List of all addresses returned from the DNS request.
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-14/+14
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-1/+1
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-4/+8
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-10/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-1/+2
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Replace NULL with nullptrlupoDharkael2020-04-021-9/+9
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* IP: Fix build error on UWPRémi Verschelde2019-10-021-1/+1
| | | | | | | | | | Fixes this error: ``` drivers\unix\ip_unix.cpp(155): error C2593: 'operator =' is ambiguous .\core/ustring.h(177): note: could be 'void String::operator =(const CharType *)' .\core/ustring.h(176): note: or 'void String::operator =(const char *)' drivers\unix\ip_unix.cpp(155): note: while trying to match the argument list '(String, int)' ```
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-3/+1
| | | | | | | | | Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
* Fix ip_unix.cpp inclusion order for OpenBSD.Fabio Alessandrelli2019-06-281-1/+1
|
* Implement IP.get_local_interfaces.Fabio Alessandrelli2019-06-211-27/+51
| | | | | | | Allow getting interfaces names and assigned names. On UWP this is not supported, and the function will return one interface for each local address (with interface name the local address itself).
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Android: Better identify thirdparty C/C++ codeRémi Verschelde2018-12-201-3/+5
| | | | | | | | | | | | | | | | | | | - The `cpu-features.{c,h}` code was only used by chance by the webm (libvpx) code, so I moved it there. It was actually introduced before that and wasn't in use, and libvpx just happened to be able to compile thanks to it being bundled. It could potentially be compiled on the fly from the Android NDK, but since we plan to replace the webm module by a GDNative plugin in the near future, I went the bundling route. - `ifaddrs_android.h` is already provided in the Android NDK as `ifaddrs.h`, same as on other Unixes. Yet we cannot use it until we up the min API level to 24, where `getifaddrs` is first defined. I moved the files to `thirdparty/misc` and synced them with upstream WebRTC (only indentation changes and removal of `static` qualifiers). Also removes dropped thirdparty files from COPYRIGHT.txt after changes in #24105 and #24145.
* Various coverity scan fixes for networkingFabio Alessandrelli2018-04-211-1/+3
| | | | Fix FreeBSD websocket compilation error
* [DOCS] add HTTPRequest.request return valuesPoommetee Ketson2018-04-201-1/+1
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-4/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Explicitily unsed AI_NUMERICHOST flag to fix HTML5Fabio Alessandrelli2017-08-111-0/+1
|
* Fix local ip addresses (interfaces) detection.Fabio Alessandrelli2017-05-081-4/+11
| | | | Ignore non-IP addresses for both windows and unix
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fix build issue with MSVCRémi Verschelde2017-03-061-1/+2
| | | | windows.h is a mess.
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-59/+54
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Improvements to scons defined WINVER/_WIN32_WINNTFabio Alessandrelli2017-01-121-4/+0
|
* Windows: Workaround missing includes in MinGW-w64 < 4Rémi Verschelde2017-01-091-1/+13
| | | | | | | | | The MinGW-w64 version we have on our Travis build environment (Ubuntu 12.04, mingw-w64 2.0.1, gcc 4.6) is old and has some missing includes in the dependencies of the `tcpmib.h` header [0] [1] [2]. Those were not triggered before 6323779596dea0db7f58afef7d3d3d5588ef20cb probably due to conflicting WINVER definitions which prevented triggering the code specific to >= 0x0600 (Vista). We ensure it won't be triggered by defining the _WIN32_WINNT macro to Windows XP compatibility.
* Windows: Define _WIN32_WINRT to 0x0600 (Vista)Rémi Verschelde2017-01-081-9/+3
| | | | | | | | Passed as a compiler define to be sure it is always define before windows.h is loaded. This means that Godot officially requires Vista API or later, it will not work on Windows XP or earlier. Also fix a bogus check for Windows 7 API.
* Merge pull request #7271 from Faless/ipv6_cleanupRémi Verschelde2017-01-021-18/+9
|\ | | | | Fixes and improvementes for IPv6 implementation.
| * Remove old unused AI_V4MAPPED flag to getaddrinfoFabio Alessandrelli2016-12-091-8/+0
| |
| * IP_Address now handle IPv4 and IPv6 transparentlyFabio Alessandrelli2016-12-091-11/+5
| | | | | | | | | | | | | | | | | | | | IP_Address changes: - Converts to and from String transparently while handling IPv4 as IPv6 mapped (::ffff:[IP]) address internally. - Completely remove AddrType enum. - Setting/Getting of ip array is now only possible through dedicated functions (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6) - Add function to know if the address is a valid IPv4 (for IP implementation and enet)
| * Migrate int.IP_TYPE_ constants to IP.TYPE_Fabio Alessandrelli2016-12-091-3/+3
| |
| * Fix getaddrinfo failing on androidFabio Alessandrelli2016-12-091-0/+5
| |
* | Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
|/ | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!