summaryrefslogtreecommitdiff
path: root/gio/ginetaddress.c
Commit message (Collapse)AuthorAgeFilesLines
* gio: Add SPDX license headers automaticallyPhilip Withnall2022-05-181-0/+2
| | | | | | | | | | | | | | Add SPDX license (but not copyright) headers to all files which follow a certain pattern in their existing non-machine-readable header comment. This commit was entirely generated using the command: ``` git ls-files gio/*.[ch] | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs' ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1415
* ginetaddress: Handle systems without IPv6 supportWorksButNotTested2021-01-201-4/+76
|
* gio: Remove broken support for XPNirbheek Chauhan2020-07-261-7/+0
| | | | | | We now require Windows 7 or newer, and the networking code hasn't worked in a long time since we directly use symbols from iphlapi.dll now.
* ginetaddress, ginetsocketaddress: Add missing (nullable) annotationsPhil Clayton2020-03-171-2/+2
| | | | In both modules, new_from_string() may return NULL.
* win32: Remove all remaining WinXP compat codeChristoph Reiter2018-05-291-92/+0
| | | | Remove all code which is no longer built with Windows 7+
* gio/: LGPLv2+ -> LGPLv2.1+Sébastien Wilmet2017-05-291-1/+1
| | | | | | | | | | | | | | | | | Sub-directories inside gio/ already processed in a previous commit: - fam/ - gdbus-2.0/ (which contains only codegen/) - gvdb/ - inotify/ - tests/ - win32/ - xdgmime/ Other sub-directories inside gio/: - completion/: no license headers - kqueue/: not LGPL, BSD-style license https://bugzilla.gnome.org/show_bug.cgi?id=776504
* gio: Document that g_inet_address_new_* return value must be g_object_unref'edChristophe Fergeau2016-01-071-0/+4
|
* Fix a FIXME in the WinXP inet_pton() implementationDan Winship2015-06-291-28/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749912
* Fix g_inet_address_to_string() on XPWouter Paesen2015-06-291-1/+1
| | | | | | | [This patch originally also included an equivalent to the fix that was committed in 3e29dada, but that was not the complete fix for the bug.] https://bugzilla.gnome.org/show_bug.cgi?id=749911
* gio/ginetaddress.c: Fix Windows XP inet_pton() EmulationChun-wei Fan2015-06-231-2/+3
| | | | | | | | | | We need to be more careful when we try to assign values to gpointers, so that means we have to assign the value to the properly-dereference gpointer, so that the assigned value will be retained after the function returns. This code will be dropped soon, but it is done for XP compatibility's sake for 2.44. Should fix the issue reported in bug 730352 comment #24.
* Windows: Use Standard Networking Functions If PossibleChun-wei Fan2015-03-061-59/+110
| | | | | | | | | | | | | | | Currently, the Windows code use Winsock2-specific APIs to try to emulate calls such as inet_pton(), inet_ntop() and if_nametoindex(), which may not do the job all the time. On Vista and later, Winsock2 does provide a proper implementation for these functions, so we can use them if they exist on the system, by querying for them during g_networking_init(). Otherwise, we continue to use the original code path for these, in the case of XP and Server 2003. This enables many of the network-address tests to pass on Windows as a result, when the native Winsock2 implementations can be used. https://bugzilla.gnome.org/show_bug.cgi?id=730352
* ginetaddress: Add a precondition to g_inet_address_new_from_string()Philip Withnall2014-07-181-0/+2
| | | | | | | Ensure that the input string is non-NULL, as inet_pton() does not like NULL strings. https://bugzilla.gnome.org/show_bug.cgi?id=733345
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* Add includes to all gio docsMatthias Clasen2014-01-071-0/+1
|
* Rename the generated private data getter functionEmmanuele Bassi2013-06-241-1/+1
| | | | | | | As it turns out, we have examples of internal functions called type_name_get_private() in the wild (especially among older libraries), so we need to use a name for the per-instance private data getter function that hopefully won't conflict with anything.
* gio: Use the new private instance data declarationEmmanuele Bassi2013-06-241-14/+10
| | | | | | | Use the newly added macros, and remove the explicit calls to g_type_class_add_private(). https://bugzilla.gnome.org/show_bug.cgi?id=700035
* ginetaddress: fix addr/string conversions on windowsDan Winship2013-06-051-8/+21
| | | | | | | | | | | | | | When parsing an address, we need to re-set "len" between IPv4 and IPv6, since WSAStringToAddress() might set it to sizeof(struct sin_addr) when trying to parse the string as IPv4, even if it fails. Also, we need to make sure to not pass strings to WSAStringToAddress() that it will accept but that we don't want it to. When stringifying an address, we need to clear the sockaddr before filling it in, so we don't accidentally end up with an unwanted scope_id or the like. https://bugzilla.gnome.org/show_bug.cgi?id=701401
* Add gnetworking.hDan Winship2012-12-121-16/+6
| | | | | | | | | | | | | | | | Install a public "gnetworking.h" header that can be used to include the relevant OS-dependent networking headers. This does not really abstract away unix-vs-windows however; error codes, in particular, are incompatible. gnetworkingprivate.h now contains just a few internal URI-related functions Also add a g_networking_init() function to gnetworking.h, which can be used to explicitly initialize OS-level networking, rather than having that happen as a side-effect of registering GInetAddress. https://bugzilla.gnome.org/show_bug.cgi?id=623187
* Add g_type_ensure() and use it rather than playing games with volatileDan Winship2012-05-151-3/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=605976
* ginetaddress.c: fix an incorrect enum name in the docsDan Winship2012-01-161-2/+2
|
* GIO: add lots of annotations for Vala bindingsEvan Nemerson2012-01-111-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=667447
* GInetAddress: add equal() methodDavid Zeuthen2011-04-141-0/+29
| | | | | | | | This is needed in the fix for https://bugzilla.gnome.org/show_bug.cgi?id=631379 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Silence a bunch of -Wunused-but-set-variable warningsDavid Zeuthen2011-04-081-0/+1
| | | | Signed-off-by: David Zeuthen <davidz@redhat.com>
* Add GI annotations to Gio lowlevel network support classesPavel Holejsovsky2010-12-291-1/+1
|
* gio/: fully remove gioalias hacksRyan Lortie2010-07-071-4/+0
|
* Documentation and coding style fixupsMatthias Clasen2009-05-271-35/+130
| | | | Lots of pedanic changes.
* Add g_inet_address_get_native_size (#583205)Alexander Larsson2009-05-251-1/+21
| | | | This can be used to get the size of g_inet_address_to_bytes().
* Fix ginetaddress.c compile on LinuxDavid King2009-04-291-1/+1
| | | | The GType type definition belongs outside the G_OS_WIN32 typedef.
* Ensure we're actually initializing the winsock libraryAlexander Larsson2009-04-291-1/+2
| | | | | | | It turns out that just calling g_inet_address_get_type() isn't enough, since its marked G_GNUC_CONST, so the call is optimized away. If we assign the return value to a volatile location we ensure it is called.
* Fix the networking stuff on (current) OS XDan Winship2009-04-261-0/+3
| | | | | | OS X's headers split up the current and old (BIND 4) nameserver stuff slightly differently than Linux does, but explicitly including arpa/nameser_compat.h does the right thing on both. Part of #580301
* Fix ginetaddress.c compile on SolarisDan Winship2009-04-261-10/+10
| | | | | | | | | In glibc, IN6_IS_ADDR_UNSPECIFIED() et al. cast their argument to a uint32_t*, so it doesn't matter whether you pass them the in6_addr itself (which is what you're supposed to do) or one of its union members (which is what we were actually doing). Solaris's macro accesses the in6_addr fields directly though, and so only works if you pass the actual in6_addr. #580194.
* Use P_ for translatable param spec stringsChristian Persch2009-04-221-24/+24
| | | | | Translatable param spec strings should be annotated with P_() instead of plain _(). Bug #579830.
* Add GResolver, a glib-ish interface to DNSDan Winship2009-04-221-1/+6
| | | | | | GResolver provides asynchronous (and synchronous-but-cancellable) APIs for resolving hostnames, reverse-resolving IP addresses back to hostnames, and resolving SRV records. Part of #548466.
* Add network address and socket typesDan Winship2009-04-221-0/+747
Types and methods for dealing with IPv4 and IPv6 addresses (and UNIX domain socket addresses under UNIX). This does not include code for actual socket I/O. Originally from "gnio". Much of the code was written by Christian Kellner, Samuel Cormier-Iijima, and Ryan Lortie. Part of #548466.