xref: /aosp_15_r20/external/cronet/net/base/sockaddr_util_posix.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_BASE_SOCKADDR_UTIL_POSIX_H_
6 #define NET_BASE_SOCKADDR_UTIL_POSIX_H_
7 
8 #include <string>
9 
10 #include "net/base/net_export.h"
11 
12 namespace net {
13 
14 struct SockaddrStorage;
15 
16 // Fills |address| with |socket_path| and its length. For Android or Linux
17 // platform, this supports abstract namespaces.
18 NET_EXPORT bool FillUnixAddress(const std::string& socket_path,
19                                 bool use_abstract_namespace,
20                                 SockaddrStorage* address);
21 
22 }  // namespace net
23 
24 #endif  // NET_BASE_SOCKADDR_UTIL_POSIX_H_
25