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 // Some socket related helper methods for quic. | 5 // Some socket related helper methods for quic. |
6 | 6 |
7 #ifndef NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ |
8 #define NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ | 8 #define NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ |
9 | 9 |
10 #include <netinet/in.h> | 10 #include <netinet/in.h> |
11 #include <stddef.h> | 11 #include <stddef.h> |
12 #include <sys/socket.h> | 12 #include <sys/socket.h> |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "net/base/ip_address.h" | 17 #include "net/base/ip_address.h" |
18 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
19 #include "net/quic/quic_bandwidth.h" | 19 #include "net/quic/core/quic_bandwidth.h" |
20 #include "net/quic/quic_types.h" | 20 #include "net/quic/core/quic_types.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 // This is the structure that SO_TIMESTAMPING fills into the cmsg header. It is | 24 // This is the structure that SO_TIMESTAMPING fills into the cmsg header. It is |
25 // well-defined, but does not have a definition in a public header. See | 25 // well-defined, but does not have a definition in a public header. See |
26 // https://www.kernel.org/doc/Documentation/networking/timestamping.txt for more | 26 // https://www.kernel.org/doc/Documentation/networking/timestamping.txt for more |
27 // information. | 27 // information. |
28 struct LinuxTimestamping { | 28 struct LinuxTimestamping { |
29 // The converted system time of the timestamp. | 29 // The converted system time of the timestamp. |
30 struct timespec systime; | 30 struct timespec systime; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 static int CreateUDPSocket(const IPEndPoint& address, | 123 static int CreateUDPSocket(const IPEndPoint& address, |
124 bool* overflow_supported); | 124 bool* overflow_supported); |
125 | 125 |
126 private: | 126 private: |
127 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils); | 127 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace net | 130 } // namespace net |
131 | 131 |
132 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ | 132 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ |
OLD | NEW |