When you use sockaddr_foo for addresses, there are usually lots of type casts obscuring the code, and it's easy to forget that a struct sockaddr isn't big enough for a Unix socket path (you need a struct sockaddr_storage for that). Consider adding a GibberAddress struct or union which contains one of each sockaddr struct, including sockaddr_storage: typedef union { struct sockaddr generic; struct sockaddr_storage storage; struct sockaddr_inet ipv4; struct sockaddr_inet6 ipv6; struct sockaddr_unix un; } GibberSockAddr; Gabble has a union similar to this one internally, although the necessity to #ifdef various bits of the union for different OSs (no Unix sockets on Windows) may mean we can't have the union appear directly in an ABI-stable header file. libnice has a NiceAddress type which could be worth investigating for this, although that one is unlikely to support Unix sockets. I believe Avahi has a similar thing too.
GIO has GSocketFamily and GSocketAddress now. Perhaps these meet your needs?
(In reply to comment #1) > GIO has GSocketFamily and GSocketAddress now. Perhaps these meet your needs? Yeah, I think we should just port to GIO over time. Resolving as INVALID.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.