OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <limits> | 10 #include <limits> |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 // to be specified so that it is retransmitted at a level which the peer can | 979 // to be specified so that it is retransmitted at a level which the peer can |
980 // understand. | 980 // understand. |
981 enum EncryptionLevel { | 981 enum EncryptionLevel { |
982 ENCRYPTION_NONE = 0, | 982 ENCRYPTION_NONE = 0, |
983 ENCRYPTION_INITIAL = 1, | 983 ENCRYPTION_INITIAL = 1, |
984 ENCRYPTION_FORWARD_SECURE = 2, | 984 ENCRYPTION_FORWARD_SECURE = 2, |
985 | 985 |
986 NUM_ENCRYPTION_LEVELS, | 986 NUM_ENCRYPTION_LEVELS, |
987 }; | 987 }; |
988 | 988 |
| 989 |
| 990 enum PeerAddressChangeType { |
| 991 NO_CHANGE, |
| 992 // Peer address changes which are considered to be cause by NATs. Currently, |
| 993 // IPv4 address change with /24 does not change is considered to be cause by |
| 994 // NATs. |
| 995 NAT_PORT_REBINDING, |
| 996 IPV4_SUBNET_REBINDING, |
| 997 // IPv6 related address changes. |
| 998 IPV4_TO_IPV6, |
| 999 IPV6_TO_IPV4, |
| 1000 IPV6_TO_IPV6, |
| 1001 // This type is used when we always allow peer address changes. |
| 1002 UNKNOWN, |
| 1003 // All other peer address change types. |
| 1004 UNSPECIFIED, |
| 1005 }; |
| 1006 |
989 struct NET_EXPORT_PRIVATE QuicFrame { | 1007 struct NET_EXPORT_PRIVATE QuicFrame { |
990 QuicFrame(); | 1008 QuicFrame(); |
991 explicit QuicFrame(QuicPaddingFrame padding_frame); | 1009 explicit QuicFrame(QuicPaddingFrame padding_frame); |
992 explicit QuicFrame(QuicMtuDiscoveryFrame frame); | 1010 explicit QuicFrame(QuicMtuDiscoveryFrame frame); |
993 explicit QuicFrame(QuicPingFrame frame); | 1011 explicit QuicFrame(QuicPingFrame frame); |
994 | 1012 |
995 explicit QuicFrame(QuicStreamFrame* stream_frame); | 1013 explicit QuicFrame(QuicStreamFrame* stream_frame); |
996 explicit QuicFrame(QuicAckFrame* frame); | 1014 explicit QuicFrame(QuicAckFrame* frame); |
997 explicit QuicFrame(QuicRstStreamFrame* frame); | 1015 explicit QuicFrame(QuicRstStreamFrame* frame); |
998 explicit QuicFrame(QuicConnectionCloseFrame* frame); | 1016 explicit QuicFrame(QuicConnectionCloseFrame* frame); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1238 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
1221 | 1239 |
1222 const struct iovec* iov; | 1240 const struct iovec* iov; |
1223 const int iov_count; | 1241 const int iov_count; |
1224 const size_t total_length; | 1242 const size_t total_length; |
1225 }; | 1243 }; |
1226 | 1244 |
1227 } // namespace net | 1245 } // namespace net |
1228 | 1246 |
1229 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1247 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |