chromium/net/third_party/quiche/src/quiche/quic/core/quic_udp_socket.h

// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_QUIC_CORE_QUIC_UDP_SOCKET_H_
#define QUICHE_QUIC_CORE_QUIC_UDP_SOCKET_H_

#include <cstddef>
#include <cstdint>
#include <type_traits>

#include "quiche/quic/core/io/socket.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_ip_address.h"
#include "quiche/quic/platform/api/quic_socket_address.h"

#ifndef UDP_GRO
#define UDP_GRO
#endif

namespace quic {

QuicUdpSocketFd;
inline constexpr QuicUdpSocketFd kQuicInvalidSocketFd =;

inline constexpr size_t kDefaultUdpPacketControlBufferSize =;

enum class QuicUdpPacketInfoBit : uint8_t {};
QuicUdpPacketInfoBitMask;
static_assert;

// BufferSpan points to an unowned buffer, copying this structure only copies
// the pointer and length, not the buffer itself.
struct QUICHE_EXPORT BufferSpan {};

// QuicUdpPacketInfo contains per-packet information used for sending and
// receiving.
class QUICHE_EXPORT QuicUdpPacketInfo {};

// QuicUdpSocketApi provides a minimal set of apis for sending and receiving
// udp packets. The low level udp socket apis differ between kernels and kernel
// versions, the goal of QuicUdpSocketApi is to hide such differences.
// We use non-static functions because it is easier to be mocked in tests when
// needed.
class QUICHE_EXPORT QuicUdpSocketApi {};

}  // namespace quic

#endif  // QUICHE_QUIC_CORE_QUIC_UDP_SOCKET_H_