Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91980d23 authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

Hide sockaddr_union from libnetd_resolv's public headers

This struct is private and should not have been part of the public API.

Bug: 133117690
Test: m && atest
Change-Id: I60d4734a72680f47f3e1a1c888fd43b5b51ac913
parent 63abf5b7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -32,12 +32,6 @@

#include <netinet/in.h>

typedef union sockaddr_union {
    struct sockaddr sa;
    struct sockaddr_in sin;
    struct sockaddr_in6 sin6;
} sockaddr_union;

/*
 * Passing NETID_UNSET as the netId causes system/netd/resolv/DnsProxyListener.cpp to
 * fill in the appropriate default netId for the query.
+7 −0
Original line number Diff line number Diff line
@@ -122,6 +122,13 @@ struct __res_state {

typedef struct __res_state* res_state;

// Holds either a sockaddr_in or a sockaddr_in6.
typedef union sockaddr_union {
    struct sockaddr sa;
    struct sockaddr_in sin;
    struct sockaddr_in6 sin6;
} sockaddr_union;

/* Retrieve a local copy of the stats for the given netid. The buffer must have space for
 * MAXNS __resolver_stats. Returns the revision id of the resolvers used.
 */