| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_STATELESS_REJECTOR_H_ | 5 #ifndef NET_QUIC_STATELESS_REJECTOR_H_ |
| 6 #define NET_QUIC_STATELESS_REJECTOR_H_ | 6 #define NET_QUIC_STATELESS_REJECTOR_H_ |
| 7 | 7 |
| 8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 9 #include "net/quic/core/crypto/crypto_framer.h" | 9 #include "net/quic/core/crypto/crypto_framer.h" |
| 10 #include "net/quic/core/crypto/quic_crypto_server_config.h" | 10 #include "net/quic/core/crypto/quic_crypto_server_config.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ACCEPTED, // The CHLO was accepted | 22 ACCEPTED, // The CHLO was accepted |
| 23 REJECTED, // The CHLO was rejected. | 23 REJECTED, // The CHLO was rejected. |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 StatelessRejector(QuicVersion version, | 26 StatelessRejector(QuicVersion version, |
| 27 const QuicVersionVector& versions, | 27 const QuicVersionVector& versions, |
| 28 const QuicCryptoServerConfig* crypto_config, | 28 const QuicCryptoServerConfig* crypto_config, |
| 29 QuicCompressedCertsCache* compressed_certs_cache, | 29 QuicCompressedCertsCache* compressed_certs_cache, |
| 30 const QuicClock* clock, | 30 const QuicClock* clock, |
| 31 QuicRandom* random, | 31 QuicRandom* random, |
| 32 QuicByteCount chlo_packet_size, |
| 32 const IPEndPoint& client_address, | 33 const IPEndPoint& client_address, |
| 33 const IPEndPoint& server_address); | 34 const IPEndPoint& server_address); |
| 34 | 35 |
| 35 ~StatelessRejector(); | 36 ~StatelessRejector(); |
| 36 | 37 |
| 37 // Called when |chlo| is received for |connection_id| to determine | 38 // Called when |chlo| is received for |connection_id| to determine |
| 38 // if it should be statelessly rejected. | 39 // if it should be statelessly rejected. |
| 39 void OnChlo(QuicVersion version, | 40 void OnChlo(QuicVersion version, |
| 40 QuicConnectionId connection_id, | 41 QuicConnectionId connection_id, |
| 41 QuicConnectionId server_designated_connection_id, | 42 QuicConnectionId server_designated_connection_id, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 63 const CryptoHandshakeMessage& client_hello, | 64 const CryptoHandshakeMessage& client_hello, |
| 64 const ValidateClientHelloResultCallback::Result& result); | 65 const ValidateClientHelloResultCallback::Result& result); |
| 65 | 66 |
| 66 State state_; | 67 State state_; |
| 67 QuicErrorCode error_; | 68 QuicErrorCode error_; |
| 68 std::string error_details_; | 69 std::string error_details_; |
| 69 QuicVersion version_; | 70 QuicVersion version_; |
| 70 QuicVersionVector versions_; | 71 QuicVersionVector versions_; |
| 71 QuicConnectionId connection_id_; | 72 QuicConnectionId connection_id_; |
| 72 QuicConnectionId server_designated_connection_id_; | 73 QuicConnectionId server_designated_connection_id_; |
| 74 QuicByteCount chlo_packet_size_; |
| 73 IPEndPoint client_address_; | 75 IPEndPoint client_address_; |
| 74 IPEndPoint server_address_; | 76 IPEndPoint server_address_; |
| 75 const QuicClock* clock_; | 77 const QuicClock* clock_; |
| 76 QuicRandom* random_; | 78 QuicRandom* random_; |
| 77 const QuicCryptoServerConfig* crypto_config_; | 79 const QuicCryptoServerConfig* crypto_config_; |
| 78 QuicCompressedCertsCache* compressed_certs_cache_; | 80 QuicCompressedCertsCache* compressed_certs_cache_; |
| 79 const CryptoHandshakeMessage* chlo_; | 81 const CryptoHandshakeMessage* chlo_; |
| 80 CryptoHandshakeMessage reply_; | 82 CryptoHandshakeMessage reply_; |
| 81 CryptoFramer crypto_framer_; | 83 CryptoFramer crypto_framer_; |
| 82 QuicCryptoProof proof_; | 84 QuicCryptoProof proof_; |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(StatelessRejector); | 86 DISALLOW_COPY_AND_ASSIGN(StatelessRejector); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace net | 89 } // namespace net |
| 88 | 90 |
| 89 #endif // NET_QUIC_STATELESS_REJECTOR_H_ | 91 #endif // NET_QUIC_STATELESS_REJECTOR_H_ |
| OLD | NEW |