#include <arpa/inet.h>
#include <fcntl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/types.h>
#include "absl/base/optimization.h"
#include "quiche/quic/core/io/socket.h"
#include "quiche/quic/core/quic_udp_socket.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_flag_utils.h"
#include "quiche/quic/platform/api/quic_udp_socket_platform_api.h"
#if defined(__APPLE__) && !defined(__APPLE_USE_RFC_3542)
#error "__APPLE_USE_RFC_3542 needs to be defined."
#endif
#if defined(__linux__)
#include <alloca.h>
#include <linux/net_tstamp.h>
#endif
#if defined(__linux__) && !defined(__ANDROID__)
#define QUIC_UDP_SOCKET_SUPPORT_TTL …
#endif
namespace quic {
namespace …
bool QuicUdpSocketApi::SetupSocket(QuicUdpSocketFd fd, int address_family,
int receive_buffer_size,
int send_buffer_size, bool ipv6_only) { … }
bool QuicUdpSocketApi::WaitUntilReadable(QuicUdpSocketFd fd,
QuicTime::Delta timeout) { … }
void QuicUdpSocketApi::ReadPacket(
QuicUdpSocketFd fd, QuicUdpPacketInfoBitMask packet_info_interested,
ReadPacketResult* result) { … }
size_t QuicUdpSocketApi::ReadMultiplePackets(
QuicUdpSocketFd fd, QuicUdpPacketInfoBitMask packet_info_interested,
ReadPacketResults* results) { … }
WriteResult QuicUdpSocketApi::WritePacket(
QuicUdpSocketFd fd, const char* packet_buffer, size_t packet_buffer_len,
const QuicUdpPacketInfo& packet_info) { … }
}