From 8c5520d67a885acaff48203692b88f0707c88ff4 Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Fri, 4 May 2007 12:04:34 +0000 Subject: [PATCH] use a appropriate naming for structure fields. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21016 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/network/protocols/tcp/TCPEndpoint.cpp | 10 +++++----- src/add-ons/kernel/network/protocols/tcp/tcp.cpp | 10 +++++----- src/add-ons/kernel/network/protocols/tcp/tcp.h | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp index 4e620b604b..be04b408e2 100644 --- a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp @@ -1120,8 +1120,8 @@ TCPEndpoint::_SendQueued(bool force, uint32 sendWindow) if ((fOptions & TCP_NOOPT) == 0) { if (fFlags & FLAG_OPTION_TIMESTAMP) { segment.options |= TCP_HAS_TIMESTAMPS; - segment.TimestampReply = fReceivedTimestamp; - segment.TimestampValue = tcp_now(); + segment.timestamp_reply = fReceivedTimestamp; + segment.timestamp_value = tcp_now(); } if ((segment.flags & TCP_FLAG_SYNCHRONIZE) @@ -1579,7 +1579,7 @@ TCPEndpoint::_UpdateTimestamps(tcp_segment_header &segment, if ((fLastAcknowledgeSent >= sequence && fLastAcknowledgeSent < (sequence + segmentLength))) - fReceivedTimestamp = segment.TimestampValue; + fReceivedTimestamp = segment.timestamp_value; } } @@ -1650,7 +1650,7 @@ TCPEndpoint::_PrepareReceivePath(tcp_segment_header &segment) if (segment.options & TCP_HAS_TIMESTAMPS) { fFlags |= FLAG_OPTION_TIMESTAMP; - fReceivedTimestamp = segment.TimestampValue; + fReceivedTimestamp = segment.timestamp_value; } else fFlags &= ~FLAG_OPTION_TIMESTAMP; } @@ -1715,7 +1715,7 @@ TCPEndpoint::_Acknowledged(tcp_segment_header &segment) // this ACK acknowledged data if (segment.options & TCP_HAS_TIMESTAMPS) - _UpdateSRTT(tcp_diff_timestamp(segment.TimestampReply)); + _UpdateSRTT(tcp_diff_timestamp(segment.timestamp_reply)); else { // TODO Fallback to RFC 793 type estimation } diff --git a/src/add-ons/kernel/network/protocols/tcp/tcp.cpp b/src/add-ons/kernel/network/protocols/tcp/tcp.cpp index f6e1a590d1..f827850039 100644 --- a/src/add-ons/kernel/network/protocols/tcp/tcp.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/tcp.cpp @@ -134,9 +134,9 @@ add_options(tcp_segment_header &segment, uint8 *buffer, size_t bufferSize) bump_option(option, length); option->kind = TCP_OPTION_TIMESTAMP; option->length = 10; - option->timestamp.TimestampValue = htonl(segment.TimestampValue); + option->timestamp.timestamp_value = htonl(segment.timestamp_value); // TSecr is opaque to us, we send it as we received it. - option->timestamp.TimestampReply = segment.TimestampReply; + option->timestamp.timestamp_reply = segment.timestamp_reply; bump_option(option, length); } @@ -307,9 +307,9 @@ process_options(tcp_segment_header &segment, net_buffer *buffer, size_t size) case TCP_OPTION_TIMESTAMP: if (option->length == 10 && (size - 10) >= 0) { segment.options |= TCP_HAS_TIMESTAMPS; - segment.TimestampValue = option->timestamp.TimestampValue; - segment.TimestampReply = - ntohl(option->timestamp.TimestampReply); + segment.timestamp_value = option->timestamp.timestamp_value; + segment.timestamp_reply = + ntohl(option->timestamp.timestamp_reply); } break; case TCP_OPTION_SACK_PERMITTED: diff --git a/src/add-ons/kernel/network/protocols/tcp/tcp.h b/src/add-ons/kernel/network/protocols/tcp/tcp.h index 30ffeea84d..6ba556d4f3 100644 --- a/src/add-ons/kernel/network/protocols/tcp/tcp.h +++ b/src/add-ons/kernel/network/protocols/tcp/tcp.h @@ -118,8 +118,8 @@ struct tcp_option { uint8 window_shift; uint16 max_segment_size; struct { - uint32 TimestampValue; - uint32 TimestampReply; + uint32 timestamp_value; + uint32 timestamp_reply; } timestamp; tcp_sack sack[0]; }; @@ -161,8 +161,8 @@ struct tcp_segment_header { uint8 window_shift; uint16 max_segment_size; - uint32 TimestampValue; - uint32 TimestampReply; + uint32 timestamp_value; + uint32 timestamp_reply; tcp_sack *sacks; int sack_count;