Typedefs | Enumerations | Functions | Variables
socket_utils_posix.h File Reference
#include <grpc/support/port_platform.h>
#include <sys/socket.h>
#include <unistd.h>
#include <grpc/impl/codegen/grpc_types.h>
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/socket_factory_posix.h"
#include "src/core/lib/iomgr/socket_mutator.h"
Include dependency graph for socket_utils_posix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum grpc_dualstack_mode grpc_dualstack_mode
 

Enumerations

enum  grpc_dualstack_mode { GRPC_DSMODE_NONE, GRPC_DSMODE_IPV4, GRPC_DSMODE_IPV6, GRPC_DSMODE_DUALSTACK }
 

Functions

void config_default_tcp_user_timeout (bool enable, int timeout, bool is_client)
 
int grpc_accept4 (int sockfd, grpc_resolved_address *resolved_addr, int nonblock, int cloexec)
 
grpc_error_handle grpc_apply_socket_mutator_in_args (int fd, grpc_fd_usage usage, const grpc_channel_args *args)
 
grpc_error_handle grpc_create_dualstack_socket (const grpc_resolved_address *addr, int type, int protocol, grpc_dualstack_mode *dsmode, int *newfd)
 
grpc_error_handle grpc_create_dualstack_socket_using_factory (grpc_socket_factory *factory, const grpc_resolved_address *addr, int type, int protocol, grpc_dualstack_mode *dsmode, int *newfd)
 
int grpc_ipv6_loopback_available (void)
 
bool grpc_is_socket_reuse_port_supported ()
 
grpc_error_handle grpc_set_socket_cloexec (int fd, int close_on_exec)
 
int grpc_set_socket_dualstack (int fd)
 
grpc_error_handle grpc_set_socket_ip_pktinfo_if_possible (int fd)
 
grpc_error_handle grpc_set_socket_ipv6_recvpktinfo_if_possible (int fd)
 
grpc_error_handle grpc_set_socket_low_latency (int fd, int low_latency)
 
grpc_error_handle grpc_set_socket_no_sigpipe_if_possible (int fd)
 
grpc_error_handle grpc_set_socket_nonblocking (int fd, int non_blocking)
 
grpc_error_handle grpc_set_socket_rcvbuf (int fd, int buffer_size_bytes)
 
grpc_error_handle grpc_set_socket_reuse_addr (int fd, int reuse)
 
grpc_error_handle grpc_set_socket_reuse_port (int fd, int reuse)
 
grpc_error_handle grpc_set_socket_sndbuf (int fd, int buffer_size_bytes)
 
grpc_error_handle grpc_set_socket_tcp_user_timeout (int fd, const grpc_channel_args *channel_args, bool is_client)
 
grpc_error_handle grpc_set_socket_with_mutator (int fd, grpc_fd_usage usage, grpc_socket_mutator *mutator)
 
grpc_error_handle grpc_set_socket_zerocopy (int fd)
 

Variables

int grpc_forbid_dualstack_sockets_for_testing
 

Typedef Documentation

◆ grpc_dualstack_mode

Enumeration Type Documentation

◆ grpc_dualstack_mode

Enumerator
GRPC_DSMODE_NONE 
GRPC_DSMODE_IPV4 
GRPC_DSMODE_IPV6 
GRPC_DSMODE_DUALSTACK 

Definition at line 116 of file socket_utils_posix.h.

Function Documentation

◆ config_default_tcp_user_timeout()

void config_default_tcp_user_timeout ( bool  enable,
int  timeout,
bool  is_client 
)

◆ grpc_accept4()

int grpc_accept4 ( int  sockfd,
grpc_resolved_address resolved_addr,
int  nonblock,
int  cloexec 
)

◆ grpc_apply_socket_mutator_in_args()

grpc_error_handle grpc_apply_socket_mutator_in_args ( int  fd,
grpc_fd_usage  usage,
const grpc_channel_args args 
)

◆ grpc_create_dualstack_socket()

grpc_error_handle grpc_create_dualstack_socket ( const grpc_resolved_address addr,
int  type,
int  protocol,
grpc_dualstack_mode dsmode,
int newfd 
)

◆ grpc_create_dualstack_socket_using_factory()

grpc_error_handle grpc_create_dualstack_socket_using_factory ( grpc_socket_factory factory,
const grpc_resolved_address addr,
int  type,
int  protocol,
grpc_dualstack_mode dsmode,
int newfd 
)

◆ grpc_ipv6_loopback_available()

int grpc_ipv6_loopback_available ( void  )

◆ grpc_is_socket_reuse_port_supported()

bool grpc_is_socket_reuse_port_supported ( )

◆ grpc_set_socket_cloexec()

grpc_error_handle grpc_set_socket_cloexec ( int  fd,
int  close_on_exec 
)

◆ grpc_set_socket_dualstack()

int grpc_set_socket_dualstack ( int  fd)

◆ grpc_set_socket_ip_pktinfo_if_possible()

grpc_error_handle grpc_set_socket_ip_pktinfo_if_possible ( int  fd)

◆ grpc_set_socket_ipv6_recvpktinfo_if_possible()

grpc_error_handle grpc_set_socket_ipv6_recvpktinfo_if_possible ( int  fd)

◆ grpc_set_socket_low_latency()

grpc_error_handle grpc_set_socket_low_latency ( int  fd,
int  low_latency 
)

◆ grpc_set_socket_no_sigpipe_if_possible()

grpc_error_handle grpc_set_socket_no_sigpipe_if_possible ( int  fd)

◆ grpc_set_socket_nonblocking()

grpc_error_handle grpc_set_socket_nonblocking ( int  fd,
int  non_blocking 
)

◆ grpc_set_socket_rcvbuf()

grpc_error_handle grpc_set_socket_rcvbuf ( int  fd,
int  buffer_size_bytes 
)

◆ grpc_set_socket_reuse_addr()

grpc_error_handle grpc_set_socket_reuse_addr ( int  fd,
int  reuse 
)

◆ grpc_set_socket_reuse_port()

grpc_error_handle grpc_set_socket_reuse_port ( int  fd,
int  reuse 
)

◆ grpc_set_socket_sndbuf()

grpc_error_handle grpc_set_socket_sndbuf ( int  fd,
int  buffer_size_bytes 
)

◆ grpc_set_socket_tcp_user_timeout()

grpc_error_handle grpc_set_socket_tcp_user_timeout ( int  fd,
const grpc_channel_args channel_args,
bool  is_client 
)

◆ grpc_set_socket_with_mutator()

grpc_error_handle grpc_set_socket_with_mutator ( int  fd,
grpc_fd_usage  usage,
grpc_socket_mutator mutator 
)

◆ grpc_set_socket_zerocopy()

grpc_error_handle grpc_set_socket_zerocopy ( int  fd)

Variable Documentation

◆ grpc_forbid_dualstack_sockets_for_testing

int grpc_forbid_dualstack_sockets_for_testing


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:31