wub | f975eac | 2019-08-19 19:41:01 -0700 | [diff] [blame^] | 1 | // Copyright (c) 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_QBONE_PLATFORM_TCP_PACKET_H_ |
| 6 | #define QUICHE_QUIC_QBONE_PLATFORM_TCP_PACKET_H_ |
| 7 | |
| 8 | #include <netinet/in.h> |
| 9 | #include <netinet/tcp.h> |
| 10 | |
| 11 | #include <functional> |
| 12 | |
| 13 | #include "net/third_party/quiche/src/quic/platform/api/quic_ip_address.h" |
| 14 | #include "net/third_party/quiche/src/quic/platform/api/quic_string_piece.h" |
| 15 | |
| 16 | namespace quic { |
| 17 | |
| 18 | // Creates an TCPv6 RST packet, returning a packed string representation of the |
| 19 | // packet to |cb|. |
| 20 | void CreateTcpResetPacket(quic::QuicStringPiece original_packet, |
| 21 | const std::function<void(quic::QuicStringPiece)>& cb); |
| 22 | |
| 23 | } // namespace quic |
| 24 | |
| 25 | #endif // QUICHE_QUIC_QBONE_PLATFORM_TCP_PACKET_H_ |