diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-12-12 01:56:59 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-12 01:56:59 +0000 |
commit | 0f875445ef31832b1c9c99430f55ba6cc569c203 (patch) | |
tree | ed1bde95db4436b2d560821b4ea44f78ff85d366 /pkg/tcpip/transport/tcp/rcv_state.go | |
parent | f2fdb552f79df8cb062fb3c8cebfed5938a35aa0 (diff) | |
parent | 6fc9f0aefd89ce42ef2c38ea7853f9ba7c4bee04 (diff) |
Merge release-20191210.0-23-g6fc9f0a (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp/rcv_state.go')
-rwxr-xr-x | pkg/tcpip/transport/tcp/rcv_state.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/rcv_state.go b/pkg/tcpip/transport/tcp/rcv_state.go new file mode 100755 index 000000000..2bf21a2e7 --- /dev/null +++ b/pkg/tcpip/transport/tcp/rcv_state.go @@ -0,0 +1,29 @@ +// Copyright 2019 The gVisor Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tcp + +import ( + "time" +) + +// saveLastRcvdAckTime is invoked by stateify. +func (r *receiver) saveLastRcvdAckTime() unixTime { + return unixTime{r.lastRcvdAckTime.Unix(), r.lastRcvdAckTime.UnixNano()} +} + +// loadLastRcvdAckTime is invoked by stateify. +func (r *receiver) loadLastRcvdAckTime(unix unixTime) { + r.lastRcvdAckTime = time.Unix(unix.second, unix.nano) +} |