Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Unified Diff: net/tools/quic/quic_socket_utils.h

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_simple_server_test.cc ('k') | net/tools/quic/quic_socket_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_socket_utils.h
diff --git a/net/tools/quic/quic_socket_utils.h b/net/tools/quic/quic_socket_utils.h
index deaa4c8f71fd7d0735b1f83d67af37a64c13a3b7..f8cc5392c5f81fc8b1aa3868294d1f087c6fc8eb 100644
--- a/net/tools/quic/quic_socket_utils.h
+++ b/net/tools/quic/quic_socket_utils.h
@@ -38,30 +38,31 @@ class QuicSocketUtils {
public:
// The first integer is for overflow. The in6_pktinfo is the larger of the
// address structures present. LinuxTimestamping is present for socket
- // timestamping.
+ // timestamping. The subsequent int is for ttl.
// The final int is a sentinel so the msg_controllen feedback
// can be used to detect larger control messages than there is space for.
static const int kSpaceForCmsg =
CMSG_SPACE(CMSG_LEN(sizeof(int)) + CMSG_LEN(sizeof(in6_pktinfo)) +
CMSG_LEN(sizeof(LinuxTimestamping)) +
+ CMSG_LEN(sizeof(int)) +
CMSG_LEN(sizeof(int)));
// Fills in |address| if |hdr| contains IP_PKTINFO or IPV6_PKTINFO. Fills in
// |timestamp| if |hdr| contains |SO_TIMESTAMPING|. |address| and |timestamp|
// must not be null.
- // TODO(rjshade): Delete the |timestamp| argument when removing
- // FLAGS_quic_socket_timestamps_walltime
static void GetAddressAndTimestampFromMsghdr(struct msghdr* hdr,
IPAddress* address,
- QuicTime* timestamp,
- QuicWallTime* walltimestamp,
- bool latched_walltimestamps);
+ QuicWallTime* walltimestamp);
// If the msghdr contains an SO_RXQ_OVFL entry, this will set dropped_packets
// to the correct value and return true. Otherwise it will return false.
static bool GetOverflowFromMsghdr(struct msghdr* hdr,
QuicPacketCount* dropped_packets);
+ // If the msghdr contains an IP_TTL entry, this will set ttl to the correct
+ // value and return true. Otherwise it will return false.
+ static bool GetTtlFromMsghdr(struct msghdr* hdr, int* ttl);
+
// Sets either IP_PKTINFO or IPV6_PKTINFO on the socket, based on
// address_family. Returns the return code from setsockopt.
static int SetGetAddressInfo(int fd, int address_family);
@@ -90,16 +91,12 @@ class QuicSocketUtils {
// received packet, assuming a packet was read and the platform supports
// packet receipt timestamping. If the platform does not support packet
// receipt timestamping, timestamp will not be changed.
- // TODO(rjshade): Delete the |timestamp| argument when removing
- // FLAGS_quic_socket_timestamps_walltime
static int ReadPacket(int fd,
char* buffer,
size_t buf_len,
QuicPacketCount* dropped_packets,
IPAddress* self_address,
- QuicTime* timestamp,
QuicWallTime* walltimestamp,
- bool latched_walltimestamps,
IPEndPoint* peer_address);
// Writes buf_len to the socket. If writing is successful, sets the result's
« no previous file with comments | « net/tools/quic/quic_simple_server_test.cc ('k') | net/tools/quic/quic_socket_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698