diff options
Diffstat (limited to 'pkg/tcpip/internal')
-rw-r--r-- | pkg/tcpip/internal/tcp/BUILD | 12 | ||||
-rw-r--r-- | pkg/tcpip/internal/tcp/tcp_state_autogen.go | 36 |
2 files changed, 36 insertions, 12 deletions
diff --git a/pkg/tcpip/internal/tcp/BUILD b/pkg/tcpip/internal/tcp/BUILD deleted file mode 100644 index 9ae258a0b..000000000 --- a/pkg/tcpip/internal/tcp/BUILD +++ /dev/null @@ -1,12 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -package(licenses = ["notice"]) - -go_library( - name = "tcp", - srcs = ["tcp.go"], - visibility = ["//pkg/tcpip:__subpackages__"], - deps = [ - "//pkg/tcpip", - ], -) diff --git a/pkg/tcpip/internal/tcp/tcp_state_autogen.go b/pkg/tcpip/internal/tcp/tcp_state_autogen.go new file mode 100644 index 000000000..e973a7bbd --- /dev/null +++ b/pkg/tcpip/internal/tcp/tcp_state_autogen.go @@ -0,0 +1,36 @@ +// automatically generated by stateify. + +package tcp + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (offset *TSOffset) StateTypeName() string { + return "pkg/tcpip/internal/tcp.TSOffset" +} + +func (offset *TSOffset) StateFields() []string { + return []string{ + "milliseconds", + } +} + +func (offset *TSOffset) beforeSave() {} + +// +checklocksignore +func (offset *TSOffset) StateSave(stateSinkObject state.Sink) { + offset.beforeSave() + stateSinkObject.Save(0, &offset.milliseconds) +} + +func (offset *TSOffset) afterLoad() {} + +// +checklocksignore +func (offset *TSOffset) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &offset.milliseconds) +} + +func init() { + state.Register((*TSOffset)(nil)) +} |