3 * Copyright 2018 gRPC authors.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <grpc/support/port_platform.h>
20 #include "src/core/lib/iomgr/resolve_address.h"
22 #include <grpc/event_engine/event_engine.h>
23 #include <grpc/support/alloc.h>
26 const char* kDefaultSecurePort = "https";
27 } // namespace grpc_core
29 grpc_address_resolver_vtable* grpc_resolve_address_impl;
31 void grpc_set_resolver_impl(grpc_address_resolver_vtable* vtable) {
32 grpc_resolve_address_impl = vtable;
35 void grpc_resolve_address(const char* addr, const char* default_port,
36 grpc_pollset_set* interested_parties,
37 grpc_closure* on_done,
38 grpc_resolved_addresses** addresses) {
39 grpc_resolve_address_impl->resolve_address(
40 addr, default_port, interested_parties, on_done, addresses);
43 void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addresses) {
44 if (addresses != nullptr) {
45 gpr_free(addresses->addrs);
50 grpc_error_handle grpc_blocking_resolve_address(
51 const char* name, const char* default_port,
52 grpc_resolved_addresses** addresses) {
53 return grpc_resolve_address_impl->blocking_resolve_address(name, default_port,