GRPC Core  18.0.0
sockaddr.h
Go to the documentation of this file.
1 // Copyright 2021 The gRPC Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 #ifndef GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H
15 #define GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H
16 
18 
19 #ifdef GRPC_USE_EVENT_ENGINE
20 #include <grpc/event_engine/port.h>
21 
23 
24 typedef struct sockaddr grpc_sockaddr;
25 typedef struct sockaddr_in grpc_sockaddr_in;
26 typedef struct sockaddr_in6 grpc_sockaddr_in6;
27 typedef struct in_addr grpc_in_addr;
28 typedef struct in6_addr grpc_in6_addr;
29 
30 #define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
31 #define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
32 
33 #define GRPC_SOCK_STREAM SOCK_STREAM
34 #define GRPC_SOCK_DGRAM SOCK_DGRAM
35 
36 #define GRPC_AF_UNSPEC AF_UNSPEC
37 #define GRPC_AF_UNIX AF_UNIX
38 #define GRPC_AF_INET AF_INET
39 #define GRPC_AF_INET6 AF_INET6
40 
41 #define GRPC_AI_PASSIVE AI_PASSIVE
42 
43 #endif
44 #endif // GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H