parse_address.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_ADDRESS_UTILS_PARSE_ADDRESS_H
20 #define GRPC_CORE_LIB_ADDRESS_UTILS_PARSE_ADDRESS_H
21 
23 
24 #include <stdint.h>
25 
26 #include "absl/strings/string_view.h"
27 
31 
34 bool grpc_parse_unix(const grpc_core::URI& uri,
35  grpc_resolved_address* resolved_addr);
36 
40  grpc_resolved_address* resolved_addr);
41 
44 bool grpc_parse_ipv4(const grpc_core::URI& uri,
45  grpc_resolved_address* resolved_addr);
46 
49 bool grpc_parse_ipv6(const grpc_core::URI& uri,
50  grpc_resolved_address* resolved_addr);
51 
53 bool grpc_parse_uri(const grpc_core::URI& uri,
54  grpc_resolved_address* resolved_addr);
55 
58  grpc_resolved_address* addr, bool log_errors);
60  grpc_resolved_address* addr, bool log_errors);
61 
62 /* Converts named or numeric port to a uint16 suitable for use in a sockaddr. */
63 uint16_t grpc_strhtons(const char* port);
64 
65 // Newer form of grpc_string_to_sockaddr which returns an error instead of
66 // crashing if \a addr is not IPv6/IPv6
68  const char* addr, int port);
69 
70 namespace grpc_core {
71 
74  grpc_resolved_address* resolved_addr);
75 
80 
81 } // namespace grpc_core
82 
83 #endif /* GRPC_CORE_LIB_ADDRESS_UTILS_PARSE_ADDRESS_H */
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
uint16_t
unsigned short uint16_t
Definition: stdint-msvc2008.h:79
grpc_core
Definition: call_metric_recorder.h:31
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
grpc_core::URI
Definition: uri_parser.h:31
grpc_parse_ipv4
bool grpc_parse_ipv4(const grpc_core::URI &uri, grpc_resolved_address *resolved_addr)
Definition: parse_address.cc:187
grpc_resolved_address
Definition: resolved_address.h:34
check_documentation.path
path
Definition: check_documentation.py:57
grpc_parse_ipv6
bool grpc_parse_ipv6(const grpc_core::URI &uri, grpc_resolved_address *resolved_addr)
Definition: parse_address.cc:282
resolved_address.h
grpc_parse_unix
bool grpc_parse_unix(const grpc_core::URI &uri, grpc_resolved_address *resolved_addr)
Definition: parse_address.cc:121
grpc_core::UnixAbstractSockaddrPopulate
grpc_error_handle UnixAbstractSockaddrPopulate(absl::string_view, grpc_resolved_address *)
Definition: parse_address.cc:138
grpc_core::UnixSockaddrPopulate
grpc_error_handle UnixSockaddrPopulate(absl::string_view, grpc_resolved_address *)
Definition: parse_address.cc:133
error.h
grpc_parse_ipv6_hostport
bool grpc_parse_ipv6_hostport(absl::string_view hostport, grpc_resolved_address *addr, bool log_errors)
Definition: parse_address.cc:198
stdint.h
tests.unit._exit_scenarios.port
port
Definition: _exit_scenarios.py:179
grpc_string_to_sockaddr
grpc_error_handle grpc_string_to_sockaddr(grpc_resolved_address *out, const char *addr, int port)
Definition: parse_address.cc:320
grpc_parse_ipv4_hostport
bool grpc_parse_ipv4_hostport(absl::string_view hostport, grpc_resolved_address *addr, bool log_errors)
Definition: parse_address.cc:146
grpc_strhtons
uint16_t grpc_strhtons(const char *port)
Definition: parse_address.cc:311
uri_parser.h
grpc_error
Definition: error_internal.h:42
grpc_parse_unix_abstract
bool grpc_parse_unix_abstract(const grpc_core::URI &uri, grpc_resolved_address *resolved_addr)
Definition: parse_address.cc:126
addr
struct sockaddr_in addr
Definition: libuv/docs/code/tcp-echo-server/main.c:10
grpc_parse_uri
bool grpc_parse_uri(const grpc_core::URI &uri, grpc_resolved_address *resolved_addr)
Definition: parse_address.cc:293
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:39