chromium/remoting/protocol/stun_tcp_packet_processor.cc

// 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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "remoting/protocol/stun_tcp_packet_processor.h"

#include "base/containers/span.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/numerics/byte_conversions.h"
#include "net/base/io_buffer.h"
#include "third_party/webrtc/media/base/rtp_utils.h"
#include "third_party/webrtc/rtc_base/time_utils.h"

namespace remoting::protocol {

namespace {

PacketLength;
constexpr size_t kPacketHeaderSize =;
constexpr size_t kStunHeaderSize =;
constexpr size_t kTurnChannelDataHeaderSize =;
constexpr size_t kPacketLengthOffset =;

int GetExpectedStunPacketSize(const uint8_t* data_ptr,
                              size_t len,
                              size_t* pad_bytes) {}

}  // namespace

StunTcpPacketProcessor::StunTcpPacketProcessor() = default;

StunTcpPacketProcessor::~StunTcpPacketProcessor() = default;

// static
StunTcpPacketProcessor* StunTcpPacketProcessor::GetInstance() {}

scoped_refptr<net::IOBufferWithSize> StunTcpPacketProcessor::Pack(
    const uint8_t* data,
    size_t data_size) const {}

scoped_refptr<net::IOBufferWithSize> StunTcpPacketProcessor::Unpack(
    const uint8_t* data,
    size_t data_size,
    size_t* bytes_consumed) const {}

void StunTcpPacketProcessor::ApplyPacketOptions(
    uint8_t* data,
    size_t data_size,
    const rtc::PacketTimeUpdateParams& packet_time_params) const {}

}  // namespace remoting::protocol