chromium/net/third_party/quiche/overrides/quiche_platform_impl/quiche_udp_socket_platform_impl.h

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

#ifndef NET_THIRD_PARTY_QUICHE_OVERRIDES_QUICHE_PLATFORM_IMPL_QUICHE_UDP_SOCKET_PLATFORM_IMPL_H_
#define NET_THIRD_PARTY_QUICHE_OVERRIDES_QUICHE_PLATFORM_IMPL_QUICHE_UDP_SOCKET_PLATFORM_IMPL_H_

#include <sys/socket.h>
#include <unistd.h>

#include <cstddef>
#include <cstdint>

namespace quiche {

namespace {

inline constexpr uint8_t kEcnMask =;

}  // namespace

const size_t kCmsgSpaceForGooglePacketHeaderImpl =;

inline bool GetGooglePacketHeadersFromControlMessageImpl(
    struct ::cmsghdr* cmsg,
    char** packet_headers,
    size_t* packet_headers_len) {}

inline void SetGoogleSocketOptionsImpl(int fd) {}

// Reads the current DSCP bits on the socket and adds the ECN field requested
// in |ecn_codepoint|. Sets |type| to be the correct cmsg_type to use in sendmsg
// to set the TOS byte, and writes a correctly formulated struct representing
// the TOS byte in |value|. (Some platforms deviate from the POSIX standard of
// IP_TOS/IPV6_TCLASS and an int).
// Returns 0 on success and an error code on failure.
inline int GetEcnCmsgArgsPreserveDscpImpl(const int fd,
                                          const int address_family,
                                          uint8_t ecn_codepoint,
                                          int& type,
                                          void* value,
                                          socklen_t& value_len) {}

}  // namespace quiche

#endif  // NET_THIRD_PARTY_QUICHE_OVERRIDES_QUICHE_PLATFORM_IMPL_QUICHE_UDP_SOCKET_PLATFORM_IMPL_H_