diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
commit | 9183888b520beeee8609170819a28bea89202909 (patch) | |
tree | 3cdcfa4de9ced4c539ab7c57e4cf58ffea980f6c /pkg/tcpip/header | |
parent | cab13958a54419262aba2a0cd7f1075ed02c8ee0 (diff) | |
parent | 364ac92baf83f2352f78b718090472639bd92a76 (diff) |
Merge release-20200608.0-119-g364ac92ba (automated)
Diffstat (limited to 'pkg/tcpip/header')
-rw-r--r-- | pkg/tcpip/header/header_state_autogen.go | 64 |
1 files changed, 46 insertions, 18 deletions
diff --git a/pkg/tcpip/header/header_state_autogen.go b/pkg/tcpip/header/header_state_autogen.go index 015d7e12a..7efd361fb 100644 --- a/pkg/tcpip/header/header_state_autogen.go +++ b/pkg/tcpip/header/header_state_autogen.go @@ -6,37 +6,65 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *SACKBlock) StateTypeName() string { + return "pkg/tcpip/header.SACKBlock" +} + +func (x *SACKBlock) StateFields() []string { + return []string{ + "Start", + "End", + } +} + func (x *SACKBlock) beforeSave() {} -func (x *SACKBlock) save(m state.Map) { + +func (x *SACKBlock) StateSave(m state.Sink) { x.beforeSave() - m.Save("Start", &x.Start) - m.Save("End", &x.End) + m.Save(0, &x.Start) + m.Save(1, &x.End) } func (x *SACKBlock) afterLoad() {} -func (x *SACKBlock) load(m state.Map) { - m.Load("Start", &x.Start) - m.Load("End", &x.End) + +func (x *SACKBlock) StateLoad(m state.Source) { + m.Load(0, &x.Start) + m.Load(1, &x.End) +} + +func (x *TCPOptions) StateTypeName() string { + return "pkg/tcpip/header.TCPOptions" +} + +func (x *TCPOptions) StateFields() []string { + return []string{ + "TS", + "TSVal", + "TSEcr", + "SACKBlocks", + } } func (x *TCPOptions) beforeSave() {} -func (x *TCPOptions) save(m state.Map) { + +func (x *TCPOptions) StateSave(m state.Sink) { x.beforeSave() - m.Save("TS", &x.TS) - m.Save("TSVal", &x.TSVal) - m.Save("TSEcr", &x.TSEcr) - m.Save("SACKBlocks", &x.SACKBlocks) + m.Save(0, &x.TS) + m.Save(1, &x.TSVal) + m.Save(2, &x.TSEcr) + m.Save(3, &x.SACKBlocks) } func (x *TCPOptions) afterLoad() {} -func (x *TCPOptions) load(m state.Map) { - m.Load("TS", &x.TS) - m.Load("TSVal", &x.TSVal) - m.Load("TSEcr", &x.TSEcr) - m.Load("SACKBlocks", &x.SACKBlocks) + +func (x *TCPOptions) StateLoad(m state.Source) { + m.Load(0, &x.TS) + m.Load(1, &x.TSVal) + m.Load(2, &x.TSEcr) + m.Load(3, &x.SACKBlocks) } func init() { - state.Register("pkg/tcpip/header.SACKBlock", (*SACKBlock)(nil), state.Fns{Save: (*SACKBlock).save, Load: (*SACKBlock).load}) - state.Register("pkg/tcpip/header.TCPOptions", (*TCPOptions)(nil), state.Fns{Save: (*TCPOptions).save, Load: (*TCPOptions).load}) + state.Register((*SACKBlock)(nil)) + state.Register((*TCPOptions)(nil)) } |