diff options
Diffstat (limited to 'pkg/tcpip/transport/tcp/segment_state.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/segment_state.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/segment_state.go b/pkg/tcpip/transport/tcp/segment_state.go index 7b98a3ec8..68b049f06 100644 --- a/pkg/tcpip/transport/tcp/segment_state.go +++ b/pkg/tcpip/transport/tcp/segment_state.go @@ -70,3 +70,13 @@ func (s *segment) saveRcvdTime() unixTime { func (s *segment) loadRcvdTime(unix unixTime) { s.rcvdTime = time.Unix(unix.second, unix.nano) } + +// saveXmitTime is invoked by stateify. +func (s *segment) saveXmitTime() unixTime { + return unixTime{s.rcvdTime.Unix(), s.rcvdTime.UnixNano()} +} + +// loadXmitTime is invoked by stateify. +func (s *segment) loadXmitTime(unix unixTime) { + s.rcvdTime = time.Unix(unix.second, unix.nano) +} |