GUnixSocketAddress: handle abstract sockets with non-0-padded names

There are apparently two incompatible ways of naming abstract sockets:
pad the sockaddr with 0s and use the entire thing as the name, or else
don't, and just pass a shorter length value to the relevant functions.
We previously only supported the former method. Add support for the
latter.

Also correctly handle "anonymous" unix sockaddrs (eg, the client side
of a connection, or a socketpair() socket), and add unix domain socket
support to the socket-client and socket-server test programs to make
sure this all works.

https://bugzilla.gnome.org/show_bug.cgi?id=615960
This commit is contained in:
Dan Winship
2010-04-20 17:23:49 -04:00
parent 5e892de8af
commit 19d8cc3375
11 changed files with 439 additions and 110 deletions

View File

@ -1556,9 +1556,12 @@ g_inet_socket_address_get_type
<FILE>gunixsocketaddress</FILE>
<TITLE>GUnixSocketAddress</TITLE>
GUnixSocketAddress
GUnixSocketAddressType
g_unix_socket_address_new
g_unix_socket_address_new_abstract
g_unix_socket_address_new_with_type
g_unix_socket_address_get_is_abstract
g_unix_socket_address_get_address_type
g_unix_socket_address_get_path
g_unix_socket_address_get_path_len
g_unix_socket_address_abstract_names_supported