Add unused interface QuicConnection::SendPathChallenge().

This interface is implemented by 2 code paths:
If the PATH_CHALLENGE is sent on the default socket, add the frame as other frames to the current serialize packet in packet creator and flush at its due time. Since the destination address might be different for that packet, use a ScopedPeerAddressContext to flush it if the peer address is different from the one in used at the call site.
If the PATH_CHALLENGE is sent on an alternative socket, send it in a stand alone code path by serializing it into a individual packet and writing it to the wire directly.

PiperOrigin-RevId: 337176402
Change-Id: I90c4b88809209dd59a31a98c58d0de3ecd9c4889
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index 882b17d..0307566 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -258,6 +258,11 @@
   // Add PATH_RESPONSE to current packet, flush before or afterwards if needed.
   bool AddPathResponseFrame(const QuicPathFrameBuffer& data_buffer);
 
+  // Add PATH_CHALLENGE to current packet, flush before or afterwards if needed.
+  // This is a best effort adding. It may fail becasue of delegate state, but
+  // it's okay because of path validation retry mechanism.
+  void AddPathChallengeFrame(QuicPathFrameBuffer* payload);
+
   // Returns a dummy packet that is valid but contains no useful information.
   static SerializedPacket NoPacket();
 
@@ -596,6 +601,11 @@
   // Returns true and close connection if it attempts to send unencrypted data.
   bool AttemptingToSendUnencryptedStreamData();
 
+  // Add the given frame to the current packet with full padding. If the current
+  // packet doesn't have enough space, flush once and try again. Return false if
+  // fail to add.
+  bool AddPaddedFrameWithRetry(const QuicFrame& frame);
+
   // Does not own these delegates or the framer.
   DelegateInterface* delegate_;
   DebugDelegate* debug_delegate_;