socket_mutator.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_IOMGR_SOCKET_MUTATOR_H
20 #define GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H
21 
23 
24 #include <stdbool.h>
25 
27 #include <grpc/support/sync.h>
28 
30 typedef enum {
38 
40 typedef struct {
42  int fd;
46 
50  bool (*mutate_fd)(int fd, grpc_socket_mutator* mutator);
54  void (*destroy)(grpc_socket_mutator* mutator);
58  grpc_socket_mutator* mutator);
59 };
60 
65 };
66 
70 
73 
77 
80 
83 
84 #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_MUTATOR_H */
grpc_arg
Definition: grpc_types.h:103
vtable
static const grpc_transport_vtable vtable
Definition: binder_transport.cc:680
bool
bool
Definition: setup_once.h:312
grpc_socket_mutator_init
void grpc_socket_mutator_init(grpc_socket_mutator *mutator, const grpc_socket_mutator_vtable *vtable)
Definition: socket_mutator.cc:30
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
grpc_socket_mutator::vtable
const grpc_socket_mutator_vtable * vtable
Definition: socket_mutator.h:63
grpc_socket_mutator_vtable::mutate_fd
bool(* mutate_fd)(int fd, grpc_socket_mutator *mutator)
Definition: socket_mutator.h:50
gpr_refcount
Definition: impl/codegen/sync_generic.h:39
grpc_types.h
grpc_mutate_socket_info::fd
int fd
Definition: socket_mutator.h:42
grpc_socket_mutator_vtable::destroy
void(* destroy)(grpc_socket_mutator *mutator)
Definition: socket_mutator.h:54
xds_interop_client.int
int
Definition: xds_interop_client.py:113
grpc_socket_mutator_vtable::mutate_fd_2
bool(* mutate_fd_2)(const grpc_mutate_socket_info *info, grpc_socket_mutator *mutator)
Definition: socket_mutator.h:57
grpc_socket_mutator_vtable
Definition: socket_mutator.h:48
grpc_socket_mutator_to_arg
grpc_arg grpc_socket_mutator_to_arg(grpc_socket_mutator *mutator)
Definition: socket_mutator.cc:93
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
grpc_socket_mutator
Definition: socket_mutator.h:62
grpc_mutate_socket_info::usage
grpc_fd_usage usage
Definition: socket_mutator.h:44
grpc_socket_mutator_ref
grpc_socket_mutator * grpc_socket_mutator_ref(grpc_socket_mutator *mutator)
Definition: socket_mutator.cc:36
grpc_mutate_socket_info
Definition: socket_mutator.h:40
bloaty::usage
const char usage[]
Definition: bloaty.cc:1843
grpc_socket_mutator_mutate_fd
bool grpc_socket_mutator_mutate_fd(grpc_socket_mutator *mutator, int fd, grpc_fd_usage usage)
Definition: socket_mutator.cc:41
grpc_fd_usage
grpc_fd_usage
Definition: socket_mutator.h:30
grpc_socket_mutator_unref
void grpc_socket_mutator_unref(grpc_socket_mutator *mutator)
Definition: socket_mutator.cc:71
grpc_socket_mutator_compare
int grpc_socket_mutator_compare(grpc_socket_mutator *a, grpc_socket_mutator *b)
Definition: socket_mutator.cc:57
GRPC_FD_CLIENT_CONNECTION_USAGE
@ GRPC_FD_CLIENT_CONNECTION_USAGE
Definition: socket_mutator.h:32
GRPC_FD_SERVER_CONNECTION_USAGE
@ GRPC_FD_SERVER_CONNECTION_USAGE
Definition: socket_mutator.h:36
grpc_socket_mutator::refcount
gpr_refcount refcount
Definition: socket_mutator.h:64
compare
Definition: benchmark/tools/compare.py:1
sync.h
GRPC_FD_SERVER_LISTENER_USAGE
@ GRPC_FD_SERVER_LISTENER_USAGE
Definition: socket_mutator.h:34
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:19