summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-08 01:32:17 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-08 01:32:17 +0000
commit8f70c8003e9d132fc766ed7d92ce805c093d518b (patch)
tree6d77a3246e3f04605790d410e7630cb910704ced /pkg/tcpip
parent8f9d99c812b7599c52ed98f80c1a33717758a5c6 (diff)
parenta55bd73d4802112a7055de8663e947b9c0f42a2e (diff)
Merge release-20200928.0-66-ga55bd73d4 (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/buffer/buffer_state_autogen.go22
-rw-r--r--pkg/tcpip/header/header_state_autogen.go52
-rw-r--r--pkg/tcpip/link/channel/channel_state_autogen.go18
-rw-r--r--pkg/tcpip/link/tun/tun_state_autogen.go46
-rw-r--r--pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go44
-rw-r--r--pkg/tcpip/ports/ports_state_autogen.go26
-rw-r--r--pkg/tcpip/stack/stack_state_autogen.go650
-rw-r--r--pkg/tcpip/tcpip_state_autogen.go150
-rw-r--r--pkg/tcpip/tcpip_unsafe_state_autogen.go14
-rw-r--r--pkg/tcpip/transport/icmp/icmp_state_autogen.go154
-rw-r--r--pkg/tcpip/transport/packet/packet_state_autogen.go164
-rw-r--r--pkg/tcpip/transport/raw/raw_state_autogen.go158
-rw-r--r--pkg/tcpip/transport/tcp/tcp_state_autogen.go1050
-rw-r--r--pkg/tcpip/transport/udp/udp_state_autogen.go266
14 files changed, 1407 insertions, 1407 deletions
diff --git a/pkg/tcpip/buffer/buffer_state_autogen.go b/pkg/tcpip/buffer/buffer_state_autogen.go
index 67db6f4d9..8ce4b4c2c 100644
--- a/pkg/tcpip/buffer/buffer_state_autogen.go
+++ b/pkg/tcpip/buffer/buffer_state_autogen.go
@@ -6,30 +6,30 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *VectorisedView) StateTypeName() string {
+func (v *VectorisedView) StateTypeName() string {
return "pkg/tcpip/buffer.VectorisedView"
}
-func (x *VectorisedView) StateFields() []string {
+func (v *VectorisedView) StateFields() []string {
return []string{
"views",
"size",
}
}
-func (x *VectorisedView) beforeSave() {}
+func (v *VectorisedView) beforeSave() {}
-func (x *VectorisedView) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.views)
- m.Save(1, &x.size)
+func (v *VectorisedView) StateSave(stateSinkObject state.Sink) {
+ v.beforeSave()
+ stateSinkObject.Save(0, &v.views)
+ stateSinkObject.Save(1, &v.size)
}
-func (x *VectorisedView) afterLoad() {}
+func (v *VectorisedView) afterLoad() {}
-func (x *VectorisedView) StateLoad(m state.Source) {
- m.Load(0, &x.views)
- m.Load(1, &x.size)
+func (v *VectorisedView) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &v.views)
+ stateSourceObject.Load(1, &v.size)
}
func init() {
diff --git a/pkg/tcpip/header/header_state_autogen.go b/pkg/tcpip/header/header_state_autogen.go
index 7efd361fb..8e70640cd 100644
--- a/pkg/tcpip/header/header_state_autogen.go
+++ b/pkg/tcpip/header/header_state_autogen.go
@@ -6,37 +6,37 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *SACKBlock) StateTypeName() string {
+func (s *SACKBlock) StateTypeName() string {
return "pkg/tcpip/header.SACKBlock"
}
-func (x *SACKBlock) StateFields() []string {
+func (s *SACKBlock) StateFields() []string {
return []string{
"Start",
"End",
}
}
-func (x *SACKBlock) beforeSave() {}
+func (s *SACKBlock) beforeSave() {}
-func (x *SACKBlock) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Start)
- m.Save(1, &x.End)
+func (s *SACKBlock) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.Start)
+ stateSinkObject.Save(1, &s.End)
}
-func (x *SACKBlock) afterLoad() {}
+func (s *SACKBlock) afterLoad() {}
-func (x *SACKBlock) StateLoad(m state.Source) {
- m.Load(0, &x.Start)
- m.Load(1, &x.End)
+func (s *SACKBlock) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.Start)
+ stateSourceObject.Load(1, &s.End)
}
-func (x *TCPOptions) StateTypeName() string {
+func (t *TCPOptions) StateTypeName() string {
return "pkg/tcpip/header.TCPOptions"
}
-func (x *TCPOptions) StateFields() []string {
+func (t *TCPOptions) StateFields() []string {
return []string{
"TS",
"TSVal",
@@ -45,23 +45,23 @@ func (x *TCPOptions) StateFields() []string {
}
}
-func (x *TCPOptions) beforeSave() {}
+func (t *TCPOptions) beforeSave() {}
-func (x *TCPOptions) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.TS)
- m.Save(1, &x.TSVal)
- m.Save(2, &x.TSEcr)
- m.Save(3, &x.SACKBlocks)
+func (t *TCPOptions) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.TS)
+ stateSinkObject.Save(1, &t.TSVal)
+ stateSinkObject.Save(2, &t.TSEcr)
+ stateSinkObject.Save(3, &t.SACKBlocks)
}
-func (x *TCPOptions) afterLoad() {}
+func (t *TCPOptions) afterLoad() {}
-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 (t *TCPOptions) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.TS)
+ stateSourceObject.Load(1, &t.TSVal)
+ stateSourceObject.Load(2, &t.TSEcr)
+ stateSourceObject.Load(3, &t.SACKBlocks)
}
func init() {
diff --git a/pkg/tcpip/link/channel/channel_state_autogen.go b/pkg/tcpip/link/channel/channel_state_autogen.go
index d00c11cb2..38c12a3bf 100644
--- a/pkg/tcpip/link/channel/channel_state_autogen.go
+++ b/pkg/tcpip/link/channel/channel_state_autogen.go
@@ -6,27 +6,27 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *NotificationHandle) StateTypeName() string {
+func (n *NotificationHandle) StateTypeName() string {
return "pkg/tcpip/link/channel.NotificationHandle"
}
-func (x *NotificationHandle) StateFields() []string {
+func (n *NotificationHandle) StateFields() []string {
return []string{
"n",
}
}
-func (x *NotificationHandle) beforeSave() {}
+func (n *NotificationHandle) beforeSave() {}
-func (x *NotificationHandle) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.n)
+func (n *NotificationHandle) StateSave(stateSinkObject state.Sink) {
+ n.beforeSave()
+ stateSinkObject.Save(0, &n.n)
}
-func (x *NotificationHandle) afterLoad() {}
+func (n *NotificationHandle) afterLoad() {}
-func (x *NotificationHandle) StateLoad(m state.Source) {
- m.Load(0, &x.n)
+func (n *NotificationHandle) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &n.n)
}
func init() {
diff --git a/pkg/tcpip/link/tun/tun_state_autogen.go b/pkg/tcpip/link/tun/tun_state_autogen.go
index 0b3041e84..168171eb1 100644
--- a/pkg/tcpip/link/tun/tun_state_autogen.go
+++ b/pkg/tcpip/link/tun/tun_state_autogen.go
@@ -6,11 +6,11 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *Device) StateTypeName() string {
+func (d *Device) StateTypeName() string {
return "pkg/tcpip/link/tun.Device"
}
-func (x *Device) StateFields() []string {
+func (d *Device) StateFields() []string {
return []string{
"Queue",
"endpoint",
@@ -19,44 +19,44 @@ func (x *Device) StateFields() []string {
}
}
-func (x *Device) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Queue)
- m.Save(1, &x.endpoint)
- m.Save(2, &x.notifyHandle)
- m.Save(3, &x.flags)
+func (d *Device) StateSave(stateSinkObject state.Sink) {
+ d.beforeSave()
+ stateSinkObject.Save(0, &d.Queue)
+ stateSinkObject.Save(1, &d.endpoint)
+ stateSinkObject.Save(2, &d.notifyHandle)
+ stateSinkObject.Save(3, &d.flags)
}
-func (x *Device) afterLoad() {}
+func (d *Device) afterLoad() {}
-func (x *Device) StateLoad(m state.Source) {
- m.Load(0, &x.Queue)
- m.Load(1, &x.endpoint)
- m.Load(2, &x.notifyHandle)
- m.Load(3, &x.flags)
+func (d *Device) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &d.Queue)
+ stateSourceObject.Load(1, &d.endpoint)
+ stateSourceObject.Load(2, &d.notifyHandle)
+ stateSourceObject.Load(3, &d.flags)
}
-func (x *tunEndpointRefs) StateTypeName() string {
+func (t *tunEndpointRefs) StateTypeName() string {
return "pkg/tcpip/link/tun.tunEndpointRefs"
}
-func (x *tunEndpointRefs) StateFields() []string {
+func (t *tunEndpointRefs) StateFields() []string {
return []string{
"refCount",
}
}
-func (x *tunEndpointRefs) beforeSave() {}
+func (t *tunEndpointRefs) beforeSave() {}
-func (x *tunEndpointRefs) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.refCount)
+func (t *tunEndpointRefs) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.refCount)
}
-func (x *tunEndpointRefs) afterLoad() {}
+func (t *tunEndpointRefs) afterLoad() {}
-func (x *tunEndpointRefs) StateLoad(m state.Source) {
- m.Load(0, &x.refCount)
+func (t *tunEndpointRefs) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.refCount)
}
func init() {
diff --git a/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go b/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go
index 780ddfdc3..22324ce1c 100644
--- a/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go
+++ b/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go
@@ -6,56 +6,56 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *reassemblerList) StateTypeName() string {
+func (r *reassemblerList) StateTypeName() string {
return "pkg/tcpip/network/fragmentation.reassemblerList"
}
-func (x *reassemblerList) StateFields() []string {
+func (r *reassemblerList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *reassemblerList) beforeSave() {}
+func (r *reassemblerList) beforeSave() {}
-func (x *reassemblerList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (r *reassemblerList) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.head)
+ stateSinkObject.Save(1, &r.tail)
}
-func (x *reassemblerList) afterLoad() {}
+func (r *reassemblerList) afterLoad() {}
-func (x *reassemblerList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (r *reassemblerList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.head)
+ stateSourceObject.Load(1, &r.tail)
}
-func (x *reassemblerEntry) StateTypeName() string {
+func (r *reassemblerEntry) StateTypeName() string {
return "pkg/tcpip/network/fragmentation.reassemblerEntry"
}
-func (x *reassemblerEntry) StateFields() []string {
+func (r *reassemblerEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *reassemblerEntry) beforeSave() {}
+func (r *reassemblerEntry) beforeSave() {}
-func (x *reassemblerEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (r *reassemblerEntry) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.next)
+ stateSinkObject.Save(1, &r.prev)
}
-func (x *reassemblerEntry) afterLoad() {}
+func (r *reassemblerEntry) afterLoad() {}
-func (x *reassemblerEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (r *reassemblerEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.next)
+ stateSourceObject.Load(1, &r.prev)
}
func init() {
diff --git a/pkg/tcpip/ports/ports_state_autogen.go b/pkg/tcpip/ports/ports_state_autogen.go
index 54db0b8f9..1e1d9cd4c 100644
--- a/pkg/tcpip/ports/ports_state_autogen.go
+++ b/pkg/tcpip/ports/ports_state_autogen.go
@@ -6,11 +6,11 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *Flags) StateTypeName() string {
+func (f *Flags) StateTypeName() string {
return "pkg/tcpip/ports.Flags"
}
-func (x *Flags) StateFields() []string {
+func (f *Flags) StateFields() []string {
return []string{
"MostRecent",
"LoadBalanced",
@@ -18,21 +18,21 @@ func (x *Flags) StateFields() []string {
}
}
-func (x *Flags) beforeSave() {}
+func (f *Flags) beforeSave() {}
-func (x *Flags) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.MostRecent)
- m.Save(1, &x.LoadBalanced)
- m.Save(2, &x.TupleOnly)
+func (f *Flags) StateSave(stateSinkObject state.Sink) {
+ f.beforeSave()
+ stateSinkObject.Save(0, &f.MostRecent)
+ stateSinkObject.Save(1, &f.LoadBalanced)
+ stateSinkObject.Save(2, &f.TupleOnly)
}
-func (x *Flags) afterLoad() {}
+func (f *Flags) afterLoad() {}
-func (x *Flags) StateLoad(m state.Source) {
- m.Load(0, &x.MostRecent)
- m.Load(1, &x.LoadBalanced)
- m.Load(2, &x.TupleOnly)
+func (f *Flags) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &f.MostRecent)
+ stateSourceObject.Load(1, &f.LoadBalanced)
+ stateSourceObject.Load(2, &f.TupleOnly)
}
func init() {
diff --git a/pkg/tcpip/stack/stack_state_autogen.go b/pkg/tcpip/stack/stack_state_autogen.go
index 2917ce5c1..941e37504 100644
--- a/pkg/tcpip/stack/stack_state_autogen.go
+++ b/pkg/tcpip/stack/stack_state_autogen.go
@@ -6,11 +6,11 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *tuple) StateTypeName() string {
+func (t *tuple) StateTypeName() string {
return "pkg/tcpip/stack.tuple"
}
-func (x *tuple) StateFields() []string {
+func (t *tuple) StateFields() []string {
return []string{
"tupleEntry",
"tupleID",
@@ -19,30 +19,30 @@ func (x *tuple) StateFields() []string {
}
}
-func (x *tuple) beforeSave() {}
+func (t *tuple) beforeSave() {}
-func (x *tuple) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.tupleEntry)
- m.Save(1, &x.tupleID)
- m.Save(2, &x.conn)
- m.Save(3, &x.direction)
+func (t *tuple) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.tupleEntry)
+ stateSinkObject.Save(1, &t.tupleID)
+ stateSinkObject.Save(2, &t.conn)
+ stateSinkObject.Save(3, &t.direction)
}
-func (x *tuple) afterLoad() {}
+func (t *tuple) afterLoad() {}
-func (x *tuple) StateLoad(m state.Source) {
- m.Load(0, &x.tupleEntry)
- m.Load(1, &x.tupleID)
- m.Load(2, &x.conn)
- m.Load(3, &x.direction)
+func (t *tuple) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.tupleEntry)
+ stateSourceObject.Load(1, &t.tupleID)
+ stateSourceObject.Load(2, &t.conn)
+ stateSourceObject.Load(3, &t.direction)
}
-func (x *tupleID) StateTypeName() string {
+func (t *tupleID) StateTypeName() string {
return "pkg/tcpip/stack.tupleID"
}
-func (x *tupleID) StateFields() []string {
+func (t *tupleID) StateFields() []string {
return []string{
"srcAddr",
"srcPort",
@@ -53,34 +53,34 @@ func (x *tupleID) StateFields() []string {
}
}
-func (x *tupleID) beforeSave() {}
+func (t *tupleID) beforeSave() {}
-func (x *tupleID) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.srcAddr)
- m.Save(1, &x.srcPort)
- m.Save(2, &x.dstAddr)
- m.Save(3, &x.dstPort)
- m.Save(4, &x.transProto)
- m.Save(5, &x.netProto)
+func (t *tupleID) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.srcAddr)
+ stateSinkObject.Save(1, &t.srcPort)
+ stateSinkObject.Save(2, &t.dstAddr)
+ stateSinkObject.Save(3, &t.dstPort)
+ stateSinkObject.Save(4, &t.transProto)
+ stateSinkObject.Save(5, &t.netProto)
}
-func (x *tupleID) afterLoad() {}
+func (t *tupleID) afterLoad() {}
-func (x *tupleID) StateLoad(m state.Source) {
- m.Load(0, &x.srcAddr)
- m.Load(1, &x.srcPort)
- m.Load(2, &x.dstAddr)
- m.Load(3, &x.dstPort)
- m.Load(4, &x.transProto)
- m.Load(5, &x.netProto)
+func (t *tupleID) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.srcAddr)
+ stateSourceObject.Load(1, &t.srcPort)
+ stateSourceObject.Load(2, &t.dstAddr)
+ stateSourceObject.Load(3, &t.dstPort)
+ stateSourceObject.Load(4, &t.transProto)
+ stateSourceObject.Load(5, &t.netProto)
}
-func (x *conn) StateTypeName() string {
+func (c *conn) StateTypeName() string {
return "pkg/tcpip/stack.conn"
}
-func (x *conn) StateFields() []string {
+func (c *conn) StateFields() []string {
return []string{
"original",
"reply",
@@ -91,108 +91,108 @@ func (x *conn) StateFields() []string {
}
}
-func (x *conn) beforeSave() {}
+func (c *conn) beforeSave() {}
-func (x *conn) StateSave(m state.Sink) {
- x.beforeSave()
- var lastUsed unixTime = x.saveLastUsed()
- m.SaveValue(5, lastUsed)
- m.Save(0, &x.original)
- m.Save(1, &x.reply)
- m.Save(2, &x.manip)
- m.Save(3, &x.tcbHook)
- m.Save(4, &x.tcb)
+func (c *conn) StateSave(stateSinkObject state.Sink) {
+ c.beforeSave()
+ var lastUsedValue unixTime = c.saveLastUsed()
+ stateSinkObject.SaveValue(5, lastUsedValue)
+ stateSinkObject.Save(0, &c.original)
+ stateSinkObject.Save(1, &c.reply)
+ stateSinkObject.Save(2, &c.manip)
+ stateSinkObject.Save(3, &c.tcbHook)
+ stateSinkObject.Save(4, &c.tcb)
}
-func (x *conn) afterLoad() {}
+func (c *conn) afterLoad() {}
-func (x *conn) StateLoad(m state.Source) {
- m.Load(0, &x.original)
- m.Load(1, &x.reply)
- m.Load(2, &x.manip)
- m.Load(3, &x.tcbHook)
- m.Load(4, &x.tcb)
- m.LoadValue(5, new(unixTime), func(y interface{}) { x.loadLastUsed(y.(unixTime)) })
+func (c *conn) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &c.original)
+ stateSourceObject.Load(1, &c.reply)
+ stateSourceObject.Load(2, &c.manip)
+ stateSourceObject.Load(3, &c.tcbHook)
+ stateSourceObject.Load(4, &c.tcb)
+ stateSourceObject.LoadValue(5, new(unixTime), func(y interface{}) { c.loadLastUsed(y.(unixTime)) })
}
-func (x *ConnTrack) StateTypeName() string {
+func (c *ConnTrack) StateTypeName() string {
return "pkg/tcpip/stack.ConnTrack"
}
-func (x *ConnTrack) StateFields() []string {
+func (c *ConnTrack) StateFields() []string {
return []string{
"seed",
"buckets",
}
}
-func (x *ConnTrack) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.seed)
- m.Save(1, &x.buckets)
+func (c *ConnTrack) StateSave(stateSinkObject state.Sink) {
+ c.beforeSave()
+ stateSinkObject.Save(0, &c.seed)
+ stateSinkObject.Save(1, &c.buckets)
}
-func (x *ConnTrack) afterLoad() {}
+func (c *ConnTrack) afterLoad() {}
-func (x *ConnTrack) StateLoad(m state.Source) {
- m.Load(0, &x.seed)
- m.Load(1, &x.buckets)
+func (c *ConnTrack) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &c.seed)
+ stateSourceObject.Load(1, &c.buckets)
}
-func (x *bucket) StateTypeName() string {
+func (b *bucket) StateTypeName() string {
return "pkg/tcpip/stack.bucket"
}
-func (x *bucket) StateFields() []string {
+func (b *bucket) StateFields() []string {
return []string{
"tuples",
}
}
-func (x *bucket) beforeSave() {}
+func (b *bucket) beforeSave() {}
-func (x *bucket) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.tuples)
+func (b *bucket) StateSave(stateSinkObject state.Sink) {
+ b.beforeSave()
+ stateSinkObject.Save(0, &b.tuples)
}
-func (x *bucket) afterLoad() {}
+func (b *bucket) afterLoad() {}
-func (x *bucket) StateLoad(m state.Source) {
- m.Load(0, &x.tuples)
+func (b *bucket) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &b.tuples)
}
-func (x *unixTime) StateTypeName() string {
+func (u *unixTime) StateTypeName() string {
return "pkg/tcpip/stack.unixTime"
}
-func (x *unixTime) StateFields() []string {
+func (u *unixTime) StateFields() []string {
return []string{
"second",
"nano",
}
}
-func (x *unixTime) beforeSave() {}
+func (u *unixTime) beforeSave() {}
-func (x *unixTime) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.second)
- m.Save(1, &x.nano)
+func (u *unixTime) StateSave(stateSinkObject state.Sink) {
+ u.beforeSave()
+ stateSinkObject.Save(0, &u.second)
+ stateSinkObject.Save(1, &u.nano)
}
-func (x *unixTime) afterLoad() {}
+func (u *unixTime) afterLoad() {}
-func (x *unixTime) StateLoad(m state.Source) {
- m.Load(0, &x.second)
- m.Load(1, &x.nano)
+func (u *unixTime) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &u.second)
+ stateSourceObject.Load(1, &u.nano)
}
-func (x *IPTables) StateTypeName() string {
+func (i *IPTables) StateTypeName() string {
return "pkg/tcpip/stack.IPTables"
}
-func (x *IPTables) StateFields() []string {
+func (i *IPTables) StateFields() []string {
return []string{
"mu",
"v4Tables",
@@ -204,33 +204,33 @@ func (x *IPTables) StateFields() []string {
}
}
-func (x *IPTables) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.mu)
- m.Save(1, &x.v4Tables)
- m.Save(2, &x.v6Tables)
- m.Save(3, &x.modified)
- m.Save(4, &x.priorities)
- m.Save(5, &x.connections)
- m.Save(6, &x.reaperDone)
+func (i *IPTables) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ stateSinkObject.Save(0, &i.mu)
+ stateSinkObject.Save(1, &i.v4Tables)
+ stateSinkObject.Save(2, &i.v6Tables)
+ stateSinkObject.Save(3, &i.modified)
+ stateSinkObject.Save(4, &i.priorities)
+ stateSinkObject.Save(5, &i.connections)
+ stateSinkObject.Save(6, &i.reaperDone)
}
-func (x *IPTables) StateLoad(m state.Source) {
- m.Load(0, &x.mu)
- m.Load(1, &x.v4Tables)
- m.Load(2, &x.v6Tables)
- m.Load(3, &x.modified)
- m.Load(4, &x.priorities)
- m.Load(5, &x.connections)
- m.Load(6, &x.reaperDone)
- m.AfterLoad(x.afterLoad)
+func (i *IPTables) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.mu)
+ stateSourceObject.Load(1, &i.v4Tables)
+ stateSourceObject.Load(2, &i.v6Tables)
+ stateSourceObject.Load(3, &i.modified)
+ stateSourceObject.Load(4, &i.priorities)
+ stateSourceObject.Load(5, &i.connections)
+ stateSourceObject.Load(6, &i.reaperDone)
+ stateSourceObject.AfterLoad(i.afterLoad)
}
-func (x *Table) StateTypeName() string {
+func (t *Table) StateTypeName() string {
return "pkg/tcpip/stack.Table"
}
-func (x *Table) StateFields() []string {
+func (t *Table) StateFields() []string {
return []string{
"Rules",
"BuiltinChains",
@@ -238,28 +238,28 @@ func (x *Table) StateFields() []string {
}
}
-func (x *Table) beforeSave() {}
+func (t *Table) beforeSave() {}
-func (x *Table) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Rules)
- m.Save(1, &x.BuiltinChains)
- m.Save(2, &x.Underflows)
+func (t *Table) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.Rules)
+ stateSinkObject.Save(1, &t.BuiltinChains)
+ stateSinkObject.Save(2, &t.Underflows)
}
-func (x *Table) afterLoad() {}
+func (t *Table) afterLoad() {}
-func (x *Table) StateLoad(m state.Source) {
- m.Load(0, &x.Rules)
- m.Load(1, &x.BuiltinChains)
- m.Load(2, &x.Underflows)
+func (t *Table) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.Rules)
+ stateSourceObject.Load(1, &t.BuiltinChains)
+ stateSourceObject.Load(2, &t.Underflows)
}
-func (x *Rule) StateTypeName() string {
+func (r *Rule) StateTypeName() string {
return "pkg/tcpip/stack.Rule"
}
-func (x *Rule) StateFields() []string {
+func (r *Rule) StateFields() []string {
return []string{
"Filter",
"Matchers",
@@ -267,28 +267,28 @@ func (x *Rule) StateFields() []string {
}
}
-func (x *Rule) beforeSave() {}
+func (r *Rule) beforeSave() {}
-func (x *Rule) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Filter)
- m.Save(1, &x.Matchers)
- m.Save(2, &x.Target)
+func (r *Rule) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.Filter)
+ stateSinkObject.Save(1, &r.Matchers)
+ stateSinkObject.Save(2, &r.Target)
}
-func (x *Rule) afterLoad() {}
+func (r *Rule) afterLoad() {}
-func (x *Rule) StateLoad(m state.Source) {
- m.Load(0, &x.Filter)
- m.Load(1, &x.Matchers)
- m.Load(2, &x.Target)
+func (r *Rule) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.Filter)
+ stateSourceObject.Load(1, &r.Matchers)
+ stateSourceObject.Load(2, &r.Target)
}
-func (x *IPHeaderFilter) StateTypeName() string {
+func (i *IPHeaderFilter) StateTypeName() string {
return "pkg/tcpip/stack.IPHeaderFilter"
}
-func (x *IPHeaderFilter) StateFields() []string {
+func (i *IPHeaderFilter) StateFields() []string {
return []string{
"Protocol",
"CheckProtocol",
@@ -304,200 +304,200 @@ func (x *IPHeaderFilter) StateFields() []string {
}
}
-func (x *IPHeaderFilter) beforeSave() {}
-
-func (x *IPHeaderFilter) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Protocol)
- m.Save(1, &x.CheckProtocol)
- m.Save(2, &x.Dst)
- m.Save(3, &x.DstMask)
- m.Save(4, &x.DstInvert)
- m.Save(5, &x.Src)
- m.Save(6, &x.SrcMask)
- m.Save(7, &x.SrcInvert)
- m.Save(8, &x.OutputInterface)
- m.Save(9, &x.OutputInterfaceMask)
- m.Save(10, &x.OutputInterfaceInvert)
-}
-
-func (x *IPHeaderFilter) afterLoad() {}
-
-func (x *IPHeaderFilter) StateLoad(m state.Source) {
- m.Load(0, &x.Protocol)
- m.Load(1, &x.CheckProtocol)
- m.Load(2, &x.Dst)
- m.Load(3, &x.DstMask)
- m.Load(4, &x.DstInvert)
- m.Load(5, &x.Src)
- m.Load(6, &x.SrcMask)
- m.Load(7, &x.SrcInvert)
- m.Load(8, &x.OutputInterface)
- m.Load(9, &x.OutputInterfaceMask)
- m.Load(10, &x.OutputInterfaceInvert)
-}
-
-func (x *linkAddrEntryList) StateTypeName() string {
+func (i *IPHeaderFilter) beforeSave() {}
+
+func (i *IPHeaderFilter) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ stateSinkObject.Save(0, &i.Protocol)
+ stateSinkObject.Save(1, &i.CheckProtocol)
+ stateSinkObject.Save(2, &i.Dst)
+ stateSinkObject.Save(3, &i.DstMask)
+ stateSinkObject.Save(4, &i.DstInvert)
+ stateSinkObject.Save(5, &i.Src)
+ stateSinkObject.Save(6, &i.SrcMask)
+ stateSinkObject.Save(7, &i.SrcInvert)
+ stateSinkObject.Save(8, &i.OutputInterface)
+ stateSinkObject.Save(9, &i.OutputInterfaceMask)
+ stateSinkObject.Save(10, &i.OutputInterfaceInvert)
+}
+
+func (i *IPHeaderFilter) afterLoad() {}
+
+func (i *IPHeaderFilter) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.Protocol)
+ stateSourceObject.Load(1, &i.CheckProtocol)
+ stateSourceObject.Load(2, &i.Dst)
+ stateSourceObject.Load(3, &i.DstMask)
+ stateSourceObject.Load(4, &i.DstInvert)
+ stateSourceObject.Load(5, &i.Src)
+ stateSourceObject.Load(6, &i.SrcMask)
+ stateSourceObject.Load(7, &i.SrcInvert)
+ stateSourceObject.Load(8, &i.OutputInterface)
+ stateSourceObject.Load(9, &i.OutputInterfaceMask)
+ stateSourceObject.Load(10, &i.OutputInterfaceInvert)
+}
+
+func (l *linkAddrEntryList) StateTypeName() string {
return "pkg/tcpip/stack.linkAddrEntryList"
}
-func (x *linkAddrEntryList) StateFields() []string {
+func (l *linkAddrEntryList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *linkAddrEntryList) beforeSave() {}
+func (l *linkAddrEntryList) beforeSave() {}
-func (x *linkAddrEntryList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (l *linkAddrEntryList) StateSave(stateSinkObject state.Sink) {
+ l.beforeSave()
+ stateSinkObject.Save(0, &l.head)
+ stateSinkObject.Save(1, &l.tail)
}
-func (x *linkAddrEntryList) afterLoad() {}
+func (l *linkAddrEntryList) afterLoad() {}
-func (x *linkAddrEntryList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (l *linkAddrEntryList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &l.head)
+ stateSourceObject.Load(1, &l.tail)
}
-func (x *linkAddrEntryEntry) StateTypeName() string {
+func (l *linkAddrEntryEntry) StateTypeName() string {
return "pkg/tcpip/stack.linkAddrEntryEntry"
}
-func (x *linkAddrEntryEntry) StateFields() []string {
+func (l *linkAddrEntryEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *linkAddrEntryEntry) beforeSave() {}
+func (l *linkAddrEntryEntry) beforeSave() {}
-func (x *linkAddrEntryEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (l *linkAddrEntryEntry) StateSave(stateSinkObject state.Sink) {
+ l.beforeSave()
+ stateSinkObject.Save(0, &l.next)
+ stateSinkObject.Save(1, &l.prev)
}
-func (x *linkAddrEntryEntry) afterLoad() {}
+func (l *linkAddrEntryEntry) afterLoad() {}
-func (x *linkAddrEntryEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (l *linkAddrEntryEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &l.next)
+ stateSourceObject.Load(1, &l.prev)
}
-func (x *neighborEntryList) StateTypeName() string {
+func (n *neighborEntryList) StateTypeName() string {
return "pkg/tcpip/stack.neighborEntryList"
}
-func (x *neighborEntryList) StateFields() []string {
+func (n *neighborEntryList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *neighborEntryList) beforeSave() {}
+func (n *neighborEntryList) beforeSave() {}
-func (x *neighborEntryList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (n *neighborEntryList) StateSave(stateSinkObject state.Sink) {
+ n.beforeSave()
+ stateSinkObject.Save(0, &n.head)
+ stateSinkObject.Save(1, &n.tail)
}
-func (x *neighborEntryList) afterLoad() {}
+func (n *neighborEntryList) afterLoad() {}
-func (x *neighborEntryList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (n *neighborEntryList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &n.head)
+ stateSourceObject.Load(1, &n.tail)
}
-func (x *neighborEntryEntry) StateTypeName() string {
+func (n *neighborEntryEntry) StateTypeName() string {
return "pkg/tcpip/stack.neighborEntryEntry"
}
-func (x *neighborEntryEntry) StateFields() []string {
+func (n *neighborEntryEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *neighborEntryEntry) beforeSave() {}
+func (n *neighborEntryEntry) beforeSave() {}
-func (x *neighborEntryEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (n *neighborEntryEntry) StateSave(stateSinkObject state.Sink) {
+ n.beforeSave()
+ stateSinkObject.Save(0, &n.next)
+ stateSinkObject.Save(1, &n.prev)
}
-func (x *neighborEntryEntry) afterLoad() {}
+func (n *neighborEntryEntry) afterLoad() {}
-func (x *neighborEntryEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (n *neighborEntryEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &n.next)
+ stateSourceObject.Load(1, &n.prev)
}
-func (x *PacketBufferList) StateTypeName() string {
+func (p *PacketBufferList) StateTypeName() string {
return "pkg/tcpip/stack.PacketBufferList"
}
-func (x *PacketBufferList) StateFields() []string {
+func (p *PacketBufferList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *PacketBufferList) beforeSave() {}
+func (p *PacketBufferList) beforeSave() {}
-func (x *PacketBufferList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (p *PacketBufferList) StateSave(stateSinkObject state.Sink) {
+ p.beforeSave()
+ stateSinkObject.Save(0, &p.head)
+ stateSinkObject.Save(1, &p.tail)
}
-func (x *PacketBufferList) afterLoad() {}
+func (p *PacketBufferList) afterLoad() {}
-func (x *PacketBufferList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (p *PacketBufferList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &p.head)
+ stateSourceObject.Load(1, &p.tail)
}
-func (x *PacketBufferEntry) StateTypeName() string {
+func (p *PacketBufferEntry) StateTypeName() string {
return "pkg/tcpip/stack.PacketBufferEntry"
}
-func (x *PacketBufferEntry) StateFields() []string {
+func (p *PacketBufferEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *PacketBufferEntry) beforeSave() {}
+func (p *PacketBufferEntry) beforeSave() {}
-func (x *PacketBufferEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (p *PacketBufferEntry) StateSave(stateSinkObject state.Sink) {
+ p.beforeSave()
+ stateSinkObject.Save(0, &p.next)
+ stateSinkObject.Save(1, &p.prev)
}
-func (x *PacketBufferEntry) afterLoad() {}
+func (p *PacketBufferEntry) afterLoad() {}
-func (x *PacketBufferEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (p *PacketBufferEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &p.next)
+ stateSourceObject.Load(1, &p.prev)
}
-func (x *TransportEndpointID) StateTypeName() string {
+func (t *TransportEndpointID) StateTypeName() string {
return "pkg/tcpip/stack.TransportEndpointID"
}
-func (x *TransportEndpointID) StateFields() []string {
+func (t *TransportEndpointID) StateFields() []string {
return []string{
"LocalPort",
"LocalAddress",
@@ -506,38 +506,38 @@ func (x *TransportEndpointID) StateFields() []string {
}
}
-func (x *TransportEndpointID) beforeSave() {}
+func (t *TransportEndpointID) beforeSave() {}
-func (x *TransportEndpointID) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.LocalPort)
- m.Save(1, &x.LocalAddress)
- m.Save(2, &x.RemotePort)
- m.Save(3, &x.RemoteAddress)
+func (t *TransportEndpointID) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.LocalPort)
+ stateSinkObject.Save(1, &t.LocalAddress)
+ stateSinkObject.Save(2, &t.RemotePort)
+ stateSinkObject.Save(3, &t.RemoteAddress)
}
-func (x *TransportEndpointID) afterLoad() {}
+func (t *TransportEndpointID) afterLoad() {}
-func (x *TransportEndpointID) StateLoad(m state.Source) {
- m.Load(0, &x.LocalPort)
- m.Load(1, &x.LocalAddress)
- m.Load(2, &x.RemotePort)
- m.Load(3, &x.RemoteAddress)
+func (t *TransportEndpointID) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.LocalPort)
+ stateSourceObject.Load(1, &t.LocalAddress)
+ stateSourceObject.Load(2, &t.RemotePort)
+ stateSourceObject.Load(3, &t.RemoteAddress)
}
-func (x *GSOType) StateTypeName() string {
+func (g *GSOType) StateTypeName() string {
return "pkg/tcpip/stack.GSOType"
}
-func (x *GSOType) StateFields() []string {
+func (g *GSOType) StateFields() []string {
return nil
}
-func (x *GSO) StateTypeName() string {
+func (g *GSO) StateTypeName() string {
return "pkg/tcpip/stack.GSO"
}
-func (x *GSO) StateFields() []string {
+func (g *GSO) StateFields() []string {
return []string{
"Type",
"NeedsCsum",
@@ -548,34 +548,34 @@ func (x *GSO) StateFields() []string {
}
}
-func (x *GSO) beforeSave() {}
+func (g *GSO) beforeSave() {}
-func (x *GSO) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Type)
- m.Save(1, &x.NeedsCsum)
- m.Save(2, &x.CsumOffset)
- m.Save(3, &x.MSS)
- m.Save(4, &x.L3HdrLen)
- m.Save(5, &x.MaxSize)
+func (g *GSO) StateSave(stateSinkObject state.Sink) {
+ g.beforeSave()
+ stateSinkObject.Save(0, &g.Type)
+ stateSinkObject.Save(1, &g.NeedsCsum)
+ stateSinkObject.Save(2, &g.CsumOffset)
+ stateSinkObject.Save(3, &g.MSS)
+ stateSinkObject.Save(4, &g.L3HdrLen)
+ stateSinkObject.Save(5, &g.MaxSize)
}
-func (x *GSO) afterLoad() {}
+func (g *GSO) afterLoad() {}
-func (x *GSO) StateLoad(m state.Source) {
- m.Load(0, &x.Type)
- m.Load(1, &x.NeedsCsum)
- m.Load(2, &x.CsumOffset)
- m.Load(3, &x.MSS)
- m.Load(4, &x.L3HdrLen)
- m.Load(5, &x.MaxSize)
+func (g *GSO) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &g.Type)
+ stateSourceObject.Load(1, &g.NeedsCsum)
+ stateSourceObject.Load(2, &g.CsumOffset)
+ stateSourceObject.Load(3, &g.MSS)
+ stateSourceObject.Load(4, &g.L3HdrLen)
+ stateSourceObject.Load(5, &g.MaxSize)
}
-func (x *TransportEndpointInfo) StateTypeName() string {
+func (t *TransportEndpointInfo) StateTypeName() string {
return "pkg/tcpip/stack.TransportEndpointInfo"
}
-func (x *TransportEndpointInfo) StateFields() []string {
+func (t *TransportEndpointInfo) StateFields() []string {
return []string{
"NetProto",
"TransProto",
@@ -586,34 +586,34 @@ func (x *TransportEndpointInfo) StateFields() []string {
}
}
-func (x *TransportEndpointInfo) beforeSave() {}
+func (t *TransportEndpointInfo) beforeSave() {}
-func (x *TransportEndpointInfo) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.NetProto)
- m.Save(1, &x.TransProto)
- m.Save(2, &x.ID)
- m.Save(3, &x.BindNICID)
- m.Save(4, &x.BindAddr)
- m.Save(5, &x.RegisterNICID)
+func (t *TransportEndpointInfo) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.NetProto)
+ stateSinkObject.Save(1, &t.TransProto)
+ stateSinkObject.Save(2, &t.ID)
+ stateSinkObject.Save(3, &t.BindNICID)
+ stateSinkObject.Save(4, &t.BindAddr)
+ stateSinkObject.Save(5, &t.RegisterNICID)
}
-func (x *TransportEndpointInfo) afterLoad() {}
+func (t *TransportEndpointInfo) afterLoad() {}
-func (x *TransportEndpointInfo) StateLoad(m state.Source) {
- m.Load(0, &x.NetProto)
- m.Load(1, &x.TransProto)
- m.Load(2, &x.ID)
- m.Load(3, &x.BindNICID)
- m.Load(4, &x.BindAddr)
- m.Load(5, &x.RegisterNICID)
+func (t *TransportEndpointInfo) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.NetProto)
+ stateSourceObject.Load(1, &t.TransProto)
+ stateSourceObject.Load(2, &t.ID)
+ stateSourceObject.Load(3, &t.BindNICID)
+ stateSourceObject.Load(4, &t.BindAddr)
+ stateSourceObject.Load(5, &t.RegisterNICID)
}
-func (x *multiPortEndpoint) StateTypeName() string {
+func (m *multiPortEndpoint) StateTypeName() string {
return "pkg/tcpip/stack.multiPortEndpoint"
}
-func (x *multiPortEndpoint) StateFields() []string {
+func (m *multiPortEndpoint) StateFields() []string {
return []string{
"demux",
"netProto",
@@ -623,77 +623,77 @@ func (x *multiPortEndpoint) StateFields() []string {
}
}
-func (x *multiPortEndpoint) beforeSave() {}
+func (m *multiPortEndpoint) beforeSave() {}
-func (x *multiPortEndpoint) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.demux)
- m.Save(1, &x.netProto)
- m.Save(2, &x.transProto)
- m.Save(3, &x.endpoints)
- m.Save(4, &x.flags)
+func (m *multiPortEndpoint) StateSave(stateSinkObject state.Sink) {
+ m.beforeSave()
+ stateSinkObject.Save(0, &m.demux)
+ stateSinkObject.Save(1, &m.netProto)
+ stateSinkObject.Save(2, &m.transProto)
+ stateSinkObject.Save(3, &m.endpoints)
+ stateSinkObject.Save(4, &m.flags)
}
-func (x *multiPortEndpoint) afterLoad() {}
+func (m *multiPortEndpoint) afterLoad() {}
-func (x *multiPortEndpoint) StateLoad(m state.Source) {
- m.Load(0, &x.demux)
- m.Load(1, &x.netProto)
- m.Load(2, &x.transProto)
- m.Load(3, &x.endpoints)
- m.Load(4, &x.flags)
+func (m *multiPortEndpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &m.demux)
+ stateSourceObject.Load(1, &m.netProto)
+ stateSourceObject.Load(2, &m.transProto)
+ stateSourceObject.Load(3, &m.endpoints)
+ stateSourceObject.Load(4, &m.flags)
}
-func (x *tupleList) StateTypeName() string {
+func (t *tupleList) StateTypeName() string {
return "pkg/tcpip/stack.tupleList"
}
-func (x *tupleList) StateFields() []string {
+func (t *tupleList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *tupleList) beforeSave() {}
+func (t *tupleList) beforeSave() {}
-func (x *tupleList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (t *tupleList) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.head)
+ stateSinkObject.Save(1, &t.tail)
}
-func (x *tupleList) afterLoad() {}
+func (t *tupleList) afterLoad() {}
-func (x *tupleList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (t *tupleList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.head)
+ stateSourceObject.Load(1, &t.tail)
}
-func (x *tupleEntry) StateTypeName() string {
+func (t *tupleEntry) StateTypeName() string {
return "pkg/tcpip/stack.tupleEntry"
}
-func (x *tupleEntry) StateFields() []string {
+func (t *tupleEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *tupleEntry) beforeSave() {}
+func (t *tupleEntry) beforeSave() {}
-func (x *tupleEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (t *tupleEntry) StateSave(stateSinkObject state.Sink) {
+ t.beforeSave()
+ stateSinkObject.Save(0, &t.next)
+ stateSinkObject.Save(1, &t.prev)
}
-func (x *tupleEntry) afterLoad() {}
+func (t *tupleEntry) afterLoad() {}
-func (x *tupleEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (t *tupleEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &t.next)
+ stateSourceObject.Load(1, &t.prev)
}
func init() {
diff --git a/pkg/tcpip/tcpip_state_autogen.go b/pkg/tcpip/tcpip_state_autogen.go
index 034b39c1f..638637135 100644
--- a/pkg/tcpip/tcpip_state_autogen.go
+++ b/pkg/tcpip/tcpip_state_autogen.go
@@ -6,11 +6,11 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *FullAddress) StateTypeName() string {
+func (f *FullAddress) StateTypeName() string {
return "pkg/tcpip.FullAddress"
}
-func (x *FullAddress) StateFields() []string {
+func (f *FullAddress) StateFields() []string {
return []string{
"NIC",
"Addr",
@@ -18,28 +18,28 @@ func (x *FullAddress) StateFields() []string {
}
}
-func (x *FullAddress) beforeSave() {}
+func (f *FullAddress) beforeSave() {}
-func (x *FullAddress) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.NIC)
- m.Save(1, &x.Addr)
- m.Save(2, &x.Port)
+func (f *FullAddress) StateSave(stateSinkObject state.Sink) {
+ f.beforeSave()
+ stateSinkObject.Save(0, &f.NIC)
+ stateSinkObject.Save(1, &f.Addr)
+ stateSinkObject.Save(2, &f.Port)
}
-func (x *FullAddress) afterLoad() {}
+func (f *FullAddress) afterLoad() {}
-func (x *FullAddress) StateLoad(m state.Source) {
- m.Load(0, &x.NIC)
- m.Load(1, &x.Addr)
- m.Load(2, &x.Port)
+func (f *FullAddress) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &f.NIC)
+ stateSourceObject.Load(1, &f.Addr)
+ stateSourceObject.Load(2, &f.Port)
}
-func (x *ControlMessages) StateTypeName() string {
+func (c *ControlMessages) StateTypeName() string {
return "pkg/tcpip.ControlMessages"
}
-func (x *ControlMessages) StateFields() []string {
+func (c *ControlMessages) StateFields() []string {
return []string{
"HasTimestamp",
"Timestamp",
@@ -54,94 +54,94 @@ func (x *ControlMessages) StateFields() []string {
}
}
-func (x *ControlMessages) beforeSave() {}
+func (c *ControlMessages) beforeSave() {}
-func (x *ControlMessages) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.HasTimestamp)
- m.Save(1, &x.Timestamp)
- m.Save(2, &x.HasInq)
- m.Save(3, &x.Inq)
- m.Save(4, &x.HasTOS)
- m.Save(5, &x.TOS)
- m.Save(6, &x.HasTClass)
- m.Save(7, &x.TClass)
- m.Save(8, &x.HasIPPacketInfo)
- m.Save(9, &x.PacketInfo)
+func (c *ControlMessages) StateSave(stateSinkObject state.Sink) {
+ c.beforeSave()
+ stateSinkObject.Save(0, &c.HasTimestamp)
+ stateSinkObject.Save(1, &c.Timestamp)
+ stateSinkObject.Save(2, &c.HasInq)
+ stateSinkObject.Save(3, &c.Inq)
+ stateSinkObject.Save(4, &c.HasTOS)
+ stateSinkObject.Save(5, &c.TOS)
+ stateSinkObject.Save(6, &c.HasTClass)
+ stateSinkObject.Save(7, &c.TClass)
+ stateSinkObject.Save(8, &c.HasIPPacketInfo)
+ stateSinkObject.Save(9, &c.PacketInfo)
}
-func (x *ControlMessages) afterLoad() {}
+func (c *ControlMessages) afterLoad() {}
-func (x *ControlMessages) StateLoad(m state.Source) {
- m.Load(0, &x.HasTimestamp)
- m.Load(1, &x.Timestamp)
- m.Load(2, &x.HasInq)
- m.Load(3, &x.Inq)
- m.Load(4, &x.HasTOS)
- m.Load(5, &x.TOS)
- m.Load(6, &x.HasTClass)
- m.Load(7, &x.TClass)
- m.Load(8, &x.HasIPPacketInfo)
- m.Load(9, &x.PacketInfo)
+func (c *ControlMessages) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &c.HasTimestamp)
+ stateSourceObject.Load(1, &c.Timestamp)
+ stateSourceObject.Load(2, &c.HasInq)
+ stateSourceObject.Load(3, &c.Inq)
+ stateSourceObject.Load(4, &c.HasTOS)
+ stateSourceObject.Load(5, &c.TOS)
+ stateSourceObject.Load(6, &c.HasTClass)
+ stateSourceObject.Load(7, &c.TClass)
+ stateSourceObject.Load(8, &c.HasIPPacketInfo)
+ stateSourceObject.Load(9, &c.PacketInfo)
}
-func (x *LinkPacketInfo) StateTypeName() string {
+func (l *LinkPacketInfo) StateTypeName() string {
return "pkg/tcpip.LinkPacketInfo"
}
-func (x *LinkPacketInfo) StateFields() []string {
+func (l *LinkPacketInfo) StateFields() []string {
return []string{
"Protocol",
"PktType",
}
}
-func (x *LinkPacketInfo) beforeSave() {}
+func (l *LinkPacketInfo) beforeSave() {}
-func (x *LinkPacketInfo) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Protocol)
- m.Save(1, &x.PktType)
+func (l *LinkPacketInfo) StateSave(stateSinkObject state.Sink) {
+ l.beforeSave()
+ stateSinkObject.Save(0, &l.Protocol)
+ stateSinkObject.Save(1, &l.PktType)
}
-func (x *LinkPacketInfo) afterLoad() {}
+func (l *LinkPacketInfo) afterLoad() {}
-func (x *LinkPacketInfo) StateLoad(m state.Source) {
- m.Load(0, &x.Protocol)
- m.Load(1, &x.PktType)
+func (l *LinkPacketInfo) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &l.Protocol)
+ stateSourceObject.Load(1, &l.PktType)
}
-func (x *LingerOption) StateTypeName() string {
+func (l *LingerOption) StateTypeName() string {
return "pkg/tcpip.LingerOption"
}
-func (x *LingerOption) StateFields() []string {
+func (l *LingerOption) StateFields() []string {
return []string{
"Enabled",
"Timeout",
}
}
-func (x *LingerOption) beforeSave() {}
+func (l *LingerOption) beforeSave() {}
-func (x *LingerOption) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Enabled)
- m.Save(1, &x.Timeout)
+func (l *LingerOption) StateSave(stateSinkObject state.Sink) {
+ l.beforeSave()
+ stateSinkObject.Save(0, &l.Enabled)
+ stateSinkObject.Save(1, &l.Timeout)
}
-func (x *LingerOption) afterLoad() {}
+func (l *LingerOption) afterLoad() {}
-func (x *LingerOption) StateLoad(m state.Source) {
- m.Load(0, &x.Enabled)
- m.Load(1, &x.Timeout)
+func (l *LingerOption) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &l.Enabled)
+ stateSourceObject.Load(1, &l.Timeout)
}
-func (x *IPPacketInfo) StateTypeName() string {
+func (i *IPPacketInfo) StateTypeName() string {
return "pkg/tcpip.IPPacketInfo"
}
-func (x *IPPacketInfo) StateFields() []string {
+func (i *IPPacketInfo) StateFields() []string {
return []string{
"NIC",
"LocalAddr",
@@ -149,21 +149,21 @@ func (x *IPPacketInfo) StateFields() []string {
}
}
-func (x *IPPacketInfo) beforeSave() {}
+func (i *IPPacketInfo) beforeSave() {}
-func (x *IPPacketInfo) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.NIC)
- m.Save(1, &x.LocalAddr)
- m.Save(2, &x.DestinationAddr)
+func (i *IPPacketInfo) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ stateSinkObject.Save(0, &i.NIC)
+ stateSinkObject.Save(1, &i.LocalAddr)
+ stateSinkObject.Save(2, &i.DestinationAddr)
}
-func (x *IPPacketInfo) afterLoad() {}
+func (i *IPPacketInfo) afterLoad() {}
-func (x *IPPacketInfo) StateLoad(m state.Source) {
- m.Load(0, &x.NIC)
- m.Load(1, &x.LocalAddr)
- m.Load(2, &x.DestinationAddr)
+func (i *IPPacketInfo) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.NIC)
+ stateSourceObject.Load(1, &i.LocalAddr)
+ stateSourceObject.Load(2, &i.DestinationAddr)
}
func init() {
diff --git a/pkg/tcpip/tcpip_unsafe_state_autogen.go b/pkg/tcpip/tcpip_unsafe_state_autogen.go
index adefdcc37..8f6fc08cf 100644
--- a/pkg/tcpip/tcpip_unsafe_state_autogen.go
+++ b/pkg/tcpip/tcpip_unsafe_state_autogen.go
@@ -9,23 +9,23 @@ import (
"gvisor.dev/gvisor/pkg/state"
)
-func (x *StdClock) StateTypeName() string {
+func (s *StdClock) StateTypeName() string {
return "pkg/tcpip.StdClock"
}
-func (x *StdClock) StateFields() []string {
+func (s *StdClock) StateFields() []string {
return []string{}
}
-func (x *StdClock) beforeSave() {}
+func (s *StdClock) beforeSave() {}
-func (x *StdClock) StateSave(m state.Sink) {
- x.beforeSave()
+func (s *StdClock) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
}
-func (x *StdClock) afterLoad() {}
+func (s *StdClock) afterLoad() {}
-func (x *StdClock) StateLoad(m state.Source) {
+func (s *StdClock) StateLoad(stateSourceObject state.Source) {
}
func init() {
diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
index 776ef0850..d88c817e4 100644
--- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go
+++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
@@ -7,11 +7,11 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/buffer"
)
-func (x *icmpPacket) StateTypeName() string {
+func (i *icmpPacket) StateTypeName() string {
return "pkg/tcpip/transport/icmp.icmpPacket"
}
-func (x *icmpPacket) StateFields() []string {
+func (i *icmpPacket) StateFields() []string {
return []string{
"icmpPacketEntry",
"senderAddress",
@@ -20,31 +20,31 @@ func (x *icmpPacket) StateFields() []string {
}
}
-func (x *icmpPacket) beforeSave() {}
+func (i *icmpPacket) beforeSave() {}
-func (x *icmpPacket) StateSave(m state.Sink) {
- x.beforeSave()
- var data buffer.VectorisedView = x.saveData()
- m.SaveValue(2, data)
- m.Save(0, &x.icmpPacketEntry)
- m.Save(1, &x.senderAddress)
- m.Save(3, &x.timestamp)
+func (i *icmpPacket) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ var dataValue buffer.VectorisedView = i.saveData()
+ stateSinkObject.SaveValue(2, dataValue)
+ stateSinkObject.Save(0, &i.icmpPacketEntry)
+ stateSinkObject.Save(1, &i.senderAddress)
+ stateSinkObject.Save(3, &i.timestamp)
}
-func (x *icmpPacket) afterLoad() {}
+func (i *icmpPacket) afterLoad() {}
-func (x *icmpPacket) StateLoad(m state.Source) {
- m.Load(0, &x.icmpPacketEntry)
- m.Load(1, &x.senderAddress)
- m.Load(3, &x.timestamp)
- m.LoadValue(2, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) })
+func (i *icmpPacket) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.icmpPacketEntry)
+ stateSourceObject.Load(1, &i.senderAddress)
+ stateSourceObject.Load(3, &i.timestamp)
+ stateSourceObject.LoadValue(2, new(buffer.VectorisedView), func(y interface{}) { i.loadData(y.(buffer.VectorisedView)) })
}
-func (x *endpoint) StateTypeName() string {
+func (e *endpoint) StateTypeName() string {
return "pkg/tcpip/transport/icmp.endpoint"
}
-func (x *endpoint) StateFields() []string {
+func (e *endpoint) StateFields() []string {
return []string{
"TransportEndpointInfo",
"waiterQueue",
@@ -63,93 +63,93 @@ func (x *endpoint) StateFields() []string {
}
}
-func (x *endpoint) StateSave(m state.Sink) {
- x.beforeSave()
- var rcvBufSizeMax int = x.saveRcvBufSizeMax()
- m.SaveValue(5, rcvBufSizeMax)
- m.Save(0, &x.TransportEndpointInfo)
- m.Save(1, &x.waiterQueue)
- m.Save(2, &x.uniqueID)
- m.Save(3, &x.rcvReady)
- m.Save(4, &x.rcvList)
- m.Save(6, &x.rcvBufSize)
- m.Save(7, &x.rcvClosed)
- m.Save(8, &x.sndBufSize)
- m.Save(9, &x.shutdownFlags)
- m.Save(10, &x.state)
- m.Save(11, &x.ttl)
- m.Save(12, &x.linger)
- m.Save(13, &x.owner)
-}
-
-func (x *endpoint) StateLoad(m state.Source) {
- m.Load(0, &x.TransportEndpointInfo)
- m.Load(1, &x.waiterQueue)
- m.Load(2, &x.uniqueID)
- m.Load(3, &x.rcvReady)
- m.Load(4, &x.rcvList)
- m.Load(6, &x.rcvBufSize)
- m.Load(7, &x.rcvClosed)
- m.Load(8, &x.sndBufSize)
- m.Load(9, &x.shutdownFlags)
- m.Load(10, &x.state)
- m.Load(11, &x.ttl)
- m.Load(12, &x.linger)
- m.Load(13, &x.owner)
- m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *icmpPacketList) StateTypeName() string {
+func (e *endpoint) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax()
+ stateSinkObject.SaveValue(5, rcvBufSizeMaxValue)
+ stateSinkObject.Save(0, &e.TransportEndpointInfo)
+ stateSinkObject.Save(1, &e.waiterQueue)
+ stateSinkObject.Save(2, &e.uniqueID)
+ stateSinkObject.Save(3, &e.rcvReady)
+ stateSinkObject.Save(4, &e.rcvList)
+ stateSinkObject.Save(6, &e.rcvBufSize)
+ stateSinkObject.Save(7, &e.rcvClosed)
+ stateSinkObject.Save(8, &e.sndBufSize)
+ stateSinkObject.Save(9, &e.shutdownFlags)
+ stateSinkObject.Save(10, &e.state)
+ stateSinkObject.Save(11, &e.ttl)
+ stateSinkObject.Save(12, &e.linger)
+ stateSinkObject.Save(13, &e.owner)
+}
+
+func (e *endpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.TransportEndpointInfo)
+ stateSourceObject.Load(1, &e.waiterQueue)
+ stateSourceObject.Load(2, &e.uniqueID)
+ stateSourceObject.Load(3, &e.rcvReady)
+ stateSourceObject.Load(4, &e.rcvList)
+ stateSourceObject.Load(6, &e.rcvBufSize)
+ stateSourceObject.Load(7, &e.rcvClosed)
+ stateSourceObject.Load(8, &e.sndBufSize)
+ stateSourceObject.Load(9, &e.shutdownFlags)
+ stateSourceObject.Load(10, &e.state)
+ stateSourceObject.Load(11, &e.ttl)
+ stateSourceObject.Load(12, &e.linger)
+ stateSourceObject.Load(13, &e.owner)
+ stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
+ stateSourceObject.AfterLoad(e.afterLoad)
+}
+
+func (i *icmpPacketList) StateTypeName() string {
return "pkg/tcpip/transport/icmp.icmpPacketList"
}
-func (x *icmpPacketList) StateFields() []string {
+func (i *icmpPacketList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *icmpPacketList) beforeSave() {}
+func (i *icmpPacketList) beforeSave() {}
-func (x *icmpPacketList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (i *icmpPacketList) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ stateSinkObject.Save(0, &i.head)
+ stateSinkObject.Save(1, &i.tail)
}
-func (x *icmpPacketList) afterLoad() {}
+func (i *icmpPacketList) afterLoad() {}
-func (x *icmpPacketList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (i *icmpPacketList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.head)
+ stateSourceObject.Load(1, &i.tail)
}
-func (x *icmpPacketEntry) StateTypeName() string {
+func (i *icmpPacketEntry) StateTypeName() string {
return "pkg/tcpip/transport/icmp.icmpPacketEntry"
}
-func (x *icmpPacketEntry) StateFields() []string {
+func (i *icmpPacketEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *icmpPacketEntry) beforeSave() {}
+func (i *icmpPacketEntry) beforeSave() {}
-func (x *icmpPacketEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (i *icmpPacketEntry) StateSave(stateSinkObject state.Sink) {
+ i.beforeSave()
+ stateSinkObject.Save(0, &i.next)
+ stateSinkObject.Save(1, &i.prev)
}
-func (x *icmpPacketEntry) afterLoad() {}
+func (i *icmpPacketEntry) afterLoad() {}
-func (x *icmpPacketEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (i *icmpPacketEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &i.next)
+ stateSourceObject.Load(1, &i.prev)
}
func init() {
diff --git a/pkg/tcpip/transport/packet/packet_state_autogen.go b/pkg/tcpip/transport/packet/packet_state_autogen.go
index 5edd9db89..261bf1448 100644
--- a/pkg/tcpip/transport/packet/packet_state_autogen.go
+++ b/pkg/tcpip/transport/packet/packet_state_autogen.go
@@ -7,11 +7,11 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/buffer"
)
-func (x *packet) StateTypeName() string {
+func (p *packet) StateTypeName() string {
return "pkg/tcpip/transport/packet.packet"
}
-func (x *packet) StateFields() []string {
+func (p *packet) StateFields() []string {
return []string{
"packetEntry",
"data",
@@ -21,33 +21,33 @@ func (x *packet) StateFields() []string {
}
}
-func (x *packet) beforeSave() {}
+func (p *packet) beforeSave() {}
-func (x *packet) StateSave(m state.Sink) {
- x.beforeSave()
- var data buffer.VectorisedView = x.saveData()
- m.SaveValue(1, data)
- m.Save(0, &x.packetEntry)
- m.Save(2, &x.timestampNS)
- m.Save(3, &x.senderAddr)
- m.Save(4, &x.packetInfo)
+func (p *packet) StateSave(stateSinkObject state.Sink) {
+ p.beforeSave()
+ var dataValue buffer.VectorisedView = p.saveData()
+ stateSinkObject.SaveValue(1, dataValue)
+ stateSinkObject.Save(0, &p.packetEntry)
+ stateSinkObject.Save(2, &p.timestampNS)
+ stateSinkObject.Save(3, &p.senderAddr)
+ stateSinkObject.Save(4, &p.packetInfo)
}
-func (x *packet) afterLoad() {}
+func (p *packet) afterLoad() {}
-func (x *packet) StateLoad(m state.Source) {
- m.Load(0, &x.packetEntry)
- m.Load(2, &x.timestampNS)
- m.Load(3, &x.senderAddr)
- m.Load(4, &x.packetInfo)
- m.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) })
+func (p *packet) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &p.packetEntry)
+ stateSourceObject.Load(2, &p.timestampNS)
+ stateSourceObject.Load(3, &p.senderAddr)
+ stateSourceObject.Load(4, &p.packetInfo)
+ stateSourceObject.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { p.loadData(y.(buffer.VectorisedView)) })
}
-func (x *endpoint) StateTypeName() string {
+func (e *endpoint) StateTypeName() string {
return "pkg/tcpip/transport/packet.endpoint"
}
-func (x *endpoint) StateFields() []string {
+func (e *endpoint) StateFields() []string {
return []string{
"TransportEndpointInfo",
"netProto",
@@ -67,96 +67,96 @@ func (x *endpoint) StateFields() []string {
}
}
-func (x *endpoint) StateSave(m state.Sink) {
- x.beforeSave()
- var rcvBufSizeMax int = x.saveRcvBufSizeMax()
- m.SaveValue(5, rcvBufSizeMax)
- var lastError string = x.saveLastError()
- m.SaveValue(14, lastError)
- m.Save(0, &x.TransportEndpointInfo)
- m.Save(1, &x.netProto)
- m.Save(2, &x.waiterQueue)
- m.Save(3, &x.cooked)
- m.Save(4, &x.rcvList)
- m.Save(6, &x.rcvBufSize)
- m.Save(7, &x.rcvClosed)
- m.Save(8, &x.sndBufSize)
- m.Save(9, &x.sndBufSizeMax)
- m.Save(10, &x.closed)
- m.Save(11, &x.bound)
- m.Save(12, &x.boundNIC)
- m.Save(13, &x.linger)
-}
-
-func (x *endpoint) StateLoad(m state.Source) {
- m.Load(0, &x.TransportEndpointInfo)
- m.Load(1, &x.netProto)
- m.Load(2, &x.waiterQueue)
- m.Load(3, &x.cooked)
- m.Load(4, &x.rcvList)
- m.Load(6, &x.rcvBufSize)
- m.Load(7, &x.rcvClosed)
- m.Load(8, &x.sndBufSize)
- m.Load(9, &x.sndBufSizeMax)
- m.Load(10, &x.closed)
- m.Load(11, &x.bound)
- m.Load(12, &x.boundNIC)
- m.Load(13, &x.linger)
- m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) })
- m.LoadValue(14, new(string), func(y interface{}) { x.loadLastError(y.(string)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *packetList) StateTypeName() string {
+func (e *endpoint) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax()
+ stateSinkObject.SaveValue(5, rcvBufSizeMaxValue)
+ var lastErrorValue string = e.saveLastError()
+ stateSinkObject.SaveValue(14, lastErrorValue)
+ stateSinkObject.Save(0, &e.TransportEndpointInfo)
+ stateSinkObject.Save(1, &e.netProto)
+ stateSinkObject.Save(2, &e.waiterQueue)
+ stateSinkObject.Save(3, &e.cooked)
+ stateSinkObject.Save(4, &e.rcvList)
+ stateSinkObject.Save(6, &e.rcvBufSize)
+ stateSinkObject.Save(7, &e.rcvClosed)
+ stateSinkObject.Save(8, &e.sndBufSize)
+ stateSinkObject.Save(9, &e.sndBufSizeMax)
+ stateSinkObject.Save(10, &e.closed)
+ stateSinkObject.Save(11, &e.bound)
+ stateSinkObject.Save(12, &e.boundNIC)
+ stateSinkObject.Save(13, &e.linger)
+}
+
+func (e *endpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.TransportEndpointInfo)
+ stateSourceObject.Load(1, &e.netProto)
+ stateSourceObject.Load(2, &e.waiterQueue)
+ stateSourceObject.Load(3, &e.cooked)
+ stateSourceObject.Load(4, &e.rcvList)
+ stateSourceObject.Load(6, &e.rcvBufSize)
+ stateSourceObject.Load(7, &e.rcvClosed)
+ stateSourceObject.Load(8, &e.sndBufSize)
+ stateSourceObject.Load(9, &e.sndBufSizeMax)
+ stateSourceObject.Load(10, &e.closed)
+ stateSourceObject.Load(11, &e.bound)
+ stateSourceObject.Load(12, &e.boundNIC)
+ stateSourceObject.Load(13, &e.linger)
+ stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
+ stateSourceObject.LoadValue(14, new(string), func(y interface{}) { e.loadLastError(y.(string)) })
+ stateSourceObject.AfterLoad(e.afterLoad)
+}
+
+func (p *packetList) StateTypeName() string {
return "pkg/tcpip/transport/packet.packetList"
}
-func (x *packetList) StateFields() []string {
+func (p *packetList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *packetList) beforeSave() {}
+func (p *packetList) beforeSave() {}
-func (x *packetList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (p *packetList) StateSave(stateSinkObject state.Sink) {
+ p.beforeSave()
+ stateSinkObject.Save(0, &p.head)
+ stateSinkObject.Save(1, &p.tail)
}
-func (x *packetList) afterLoad() {}
+func (p *packetList) afterLoad() {}
-func (x *packetList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (p *packetList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &p.head)
+ stateSourceObject.Load(1, &p.tail)
}
-func (x *packetEntry) StateTypeName() string {
+func (p *packetEntry) StateTypeName() string {
return "pkg/tcpip/transport/packet.packetEntry"
}
-func (x *packetEntry) StateFields() []string {
+func (p *packetEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *packetEntry) beforeSave() {}
+func (p *packetEntry) beforeSave() {}
-func (x *packetEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (p *packetEntry) StateSave(stateSinkObject state.Sink) {
+ p.beforeSave()
+ stateSinkObject.Save(0, &p.next)
+ stateSinkObject.Save(1, &p.prev)
}
-func (x *packetEntry) afterLoad() {}
+func (p *packetEntry) afterLoad() {}
-func (x *packetEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (p *packetEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &p.next)
+ stateSourceObject.Load(1, &p.prev)
}
func init() {
diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go
index 4930b46f4..6efb1f07e 100644
--- a/pkg/tcpip/transport/raw/raw_state_autogen.go
+++ b/pkg/tcpip/transport/raw/raw_state_autogen.go
@@ -7,11 +7,11 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/buffer"
)
-func (x *rawPacket) StateTypeName() string {
+func (r *rawPacket) StateTypeName() string {
return "pkg/tcpip/transport/raw.rawPacket"
}
-func (x *rawPacket) StateFields() []string {
+func (r *rawPacket) StateFields() []string {
return []string{
"rawPacketEntry",
"data",
@@ -20,31 +20,31 @@ func (x *rawPacket) StateFields() []string {
}
}
-func (x *rawPacket) beforeSave() {}
+func (r *rawPacket) beforeSave() {}
-func (x *rawPacket) StateSave(m state.Sink) {
- x.beforeSave()
- var data buffer.VectorisedView = x.saveData()
- m.SaveValue(1, data)
- m.Save(0, &x.rawPacketEntry)
- m.Save(2, &x.timestampNS)
- m.Save(3, &x.senderAddr)
+func (r *rawPacket) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ var dataValue buffer.VectorisedView = r.saveData()
+ stateSinkObject.SaveValue(1, dataValue)
+ stateSinkObject.Save(0, &r.rawPacketEntry)
+ stateSinkObject.Save(2, &r.timestampNS)
+ stateSinkObject.Save(3, &r.senderAddr)
}
-func (x *rawPacket) afterLoad() {}
+func (r *rawPacket) afterLoad() {}
-func (x *rawPacket) StateLoad(m state.Source) {
- m.Load(0, &x.rawPacketEntry)
- m.Load(2, &x.timestampNS)
- m.Load(3, &x.senderAddr)
- m.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) })
+func (r *rawPacket) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.rawPacketEntry)
+ stateSourceObject.Load(2, &r.timestampNS)
+ stateSourceObject.Load(3, &r.senderAddr)
+ stateSourceObject.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { r.loadData(y.(buffer.VectorisedView)) })
}
-func (x *endpoint) StateTypeName() string {
+func (e *endpoint) StateTypeName() string {
return "pkg/tcpip/transport/raw.endpoint"
}
-func (x *endpoint) StateFields() []string {
+func (e *endpoint) StateFields() []string {
return []string{
"TransportEndpointInfo",
"waiterQueue",
@@ -64,95 +64,95 @@ func (x *endpoint) StateFields() []string {
}
}
-func (x *endpoint) StateSave(m state.Sink) {
- x.beforeSave()
- var rcvBufSizeMax int = x.saveRcvBufSizeMax()
- m.SaveValue(6, rcvBufSizeMax)
- m.Save(0, &x.TransportEndpointInfo)
- m.Save(1, &x.waiterQueue)
- m.Save(2, &x.associated)
- m.Save(3, &x.hdrIncluded)
- m.Save(4, &x.rcvList)
- m.Save(5, &x.rcvBufSize)
- m.Save(7, &x.rcvClosed)
- m.Save(8, &x.sndBufSize)
- m.Save(9, &x.sndBufSizeMax)
- m.Save(10, &x.closed)
- m.Save(11, &x.connected)
- m.Save(12, &x.bound)
- m.Save(13, &x.linger)
- m.Save(14, &x.owner)
-}
-
-func (x *endpoint) StateLoad(m state.Source) {
- m.Load(0, &x.TransportEndpointInfo)
- m.Load(1, &x.waiterQueue)
- m.Load(2, &x.associated)
- m.Load(3, &x.hdrIncluded)
- m.Load(4, &x.rcvList)
- m.Load(5, &x.rcvBufSize)
- m.Load(7, &x.rcvClosed)
- m.Load(8, &x.sndBufSize)
- m.Load(9, &x.sndBufSizeMax)
- m.Load(10, &x.closed)
- m.Load(11, &x.connected)
- m.Load(12, &x.bound)
- m.Load(13, &x.linger)
- m.Load(14, &x.owner)
- m.LoadValue(6, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *rawPacketList) StateTypeName() string {
+func (e *endpoint) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax()
+ stateSinkObject.SaveValue(6, rcvBufSizeMaxValue)
+ stateSinkObject.Save(0, &e.TransportEndpointInfo)
+ stateSinkObject.Save(1, &e.waiterQueue)
+ stateSinkObject.Save(2, &e.associated)
+ stateSinkObject.Save(3, &e.hdrIncluded)
+ stateSinkObject.Save(4, &e.rcvList)
+ stateSinkObject.Save(5, &e.rcvBufSize)
+ stateSinkObject.Save(7, &e.rcvClosed)
+ stateSinkObject.Save(8, &e.sndBufSize)
+ stateSinkObject.Save(9, &e.sndBufSizeMax)
+ stateSinkObject.Save(10, &e.closed)
+ stateSinkObject.Save(11, &e.connected)
+ stateSinkObject.Save(12, &e.bound)
+ stateSinkObject.Save(13, &e.linger)
+ stateSinkObject.Save(14, &e.owner)
+}
+
+func (e *endpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.TransportEndpointInfo)
+ stateSourceObject.Load(1, &e.waiterQueue)
+ stateSourceObject.Load(2, &e.associated)
+ stateSourceObject.Load(3, &e.hdrIncluded)
+ stateSourceObject.Load(4, &e.rcvList)
+ stateSourceObject.Load(5, &e.rcvBufSize)
+ stateSourceObject.Load(7, &e.rcvClosed)
+ stateSourceObject.Load(8, &e.sndBufSize)
+ stateSourceObject.Load(9, &e.sndBufSizeMax)
+ stateSourceObject.Load(10, &e.closed)
+ stateSourceObject.Load(11, &e.connected)
+ stateSourceObject.Load(12, &e.bound)
+ stateSourceObject.Load(13, &e.linger)
+ stateSourceObject.Load(14, &e.owner)
+ stateSourceObject.LoadValue(6, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
+ stateSourceObject.AfterLoad(e.afterLoad)
+}
+
+func (r *rawPacketList) StateTypeName() string {
return "pkg/tcpip/transport/raw.rawPacketList"
}
-func (x *rawPacketList) StateFields() []string {
+func (r *rawPacketList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *rawPacketList) beforeSave() {}
+func (r *rawPacketList) beforeSave() {}
-func (x *rawPacketList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (r *rawPacketList) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.head)
+ stateSinkObject.Save(1, &r.tail)
}
-func (x *rawPacketList) afterLoad() {}
+func (r *rawPacketList) afterLoad() {}
-func (x *rawPacketList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (r *rawPacketList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.head)
+ stateSourceObject.Load(1, &r.tail)
}
-func (x *rawPacketEntry) StateTypeName() string {
+func (r *rawPacketEntry) StateTypeName() string {
return "pkg/tcpip/transport/raw.rawPacketEntry"
}
-func (x *rawPacketEntry) StateFields() []string {
+func (r *rawPacketEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *rawPacketEntry) beforeSave() {}
+func (r *rawPacketEntry) beforeSave() {}
-func (x *rawPacketEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (r *rawPacketEntry) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.next)
+ stateSinkObject.Save(1, &r.prev)
}
-func (x *rawPacketEntry) afterLoad() {}
+func (r *rawPacketEntry) afterLoad() {}
-func (x *rawPacketEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (r *rawPacketEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.next)
+ stateSourceObject.Load(1, &r.prev)
}
func init() {
diff --git a/pkg/tcpip/transport/tcp/tcp_state_autogen.go b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
index 08f185795..9893252ef 100644
--- a/pkg/tcpip/transport/tcp/tcp_state_autogen.go
+++ b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
@@ -7,11 +7,11 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/buffer"
)
-func (x *cubicState) StateTypeName() string {
+func (c *cubicState) StateTypeName() string {
return "pkg/tcpip/transport/tcp.cubicState"
}
-func (x *cubicState) StateFields() []string {
+func (c *cubicState) StateFields() []string {
return []string{
"wLastMax",
"wMax",
@@ -26,69 +26,69 @@ func (x *cubicState) StateFields() []string {
}
}
-func (x *cubicState) beforeSave() {}
+func (c *cubicState) beforeSave() {}
-func (x *cubicState) StateSave(m state.Sink) {
- x.beforeSave()
- var t unixTime = x.saveT()
- m.SaveValue(2, t)
- m.Save(0, &x.wLastMax)
- m.Save(1, &x.wMax)
- m.Save(3, &x.numCongestionEvents)
- m.Save(4, &x.c)
- m.Save(5, &x.k)
- m.Save(6, &x.beta)
- m.Save(7, &x.wC)
- m.Save(8, &x.wEst)
- m.Save(9, &x.s)
+func (c *cubicState) StateSave(stateSinkObject state.Sink) {
+ c.beforeSave()
+ var tValue unixTime = c.saveT()
+ stateSinkObject.SaveValue(2, tValue)
+ stateSinkObject.Save(0, &c.wLastMax)
+ stateSinkObject.Save(1, &c.wMax)
+ stateSinkObject.Save(3, &c.numCongestionEvents)
+ stateSinkObject.Save(4, &c.c)
+ stateSinkObject.Save(5, &c.k)
+ stateSinkObject.Save(6, &c.beta)
+ stateSinkObject.Save(7, &c.wC)
+ stateSinkObject.Save(8, &c.wEst)
+ stateSinkObject.Save(9, &c.s)
}
-func (x *cubicState) afterLoad() {}
+func (c *cubicState) afterLoad() {}
-func (x *cubicState) StateLoad(m state.Source) {
- m.Load(0, &x.wLastMax)
- m.Load(1, &x.wMax)
- m.Load(3, &x.numCongestionEvents)
- m.Load(4, &x.c)
- m.Load(5, &x.k)
- m.Load(6, &x.beta)
- m.Load(7, &x.wC)
- m.Load(8, &x.wEst)
- m.Load(9, &x.s)
- m.LoadValue(2, new(unixTime), func(y interface{}) { x.loadT(y.(unixTime)) })
+func (c *cubicState) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &c.wLastMax)
+ stateSourceObject.Load(1, &c.wMax)
+ stateSourceObject.Load(3, &c.numCongestionEvents)
+ stateSourceObject.Load(4, &c.c)
+ stateSourceObject.Load(5, &c.k)
+ stateSourceObject.Load(6, &c.beta)
+ stateSourceObject.Load(7, &c.wC)
+ stateSourceObject.Load(8, &c.wEst)
+ stateSourceObject.Load(9, &c.s)
+ stateSourceObject.LoadValue(2, new(unixTime), func(y interface{}) { c.loadT(y.(unixTime)) })
}
-func (x *SACKInfo) StateTypeName() string {
+func (s *SACKInfo) StateTypeName() string {
return "pkg/tcpip/transport/tcp.SACKInfo"
}
-func (x *SACKInfo) StateFields() []string {
+func (s *SACKInfo) StateFields() []string {
return []string{
"Blocks",
"NumBlocks",
}
}
-func (x *SACKInfo) beforeSave() {}
+func (s *SACKInfo) beforeSave() {}
-func (x *SACKInfo) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.Blocks)
- m.Save(1, &x.NumBlocks)
+func (s *SACKInfo) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.Blocks)
+ stateSinkObject.Save(1, &s.NumBlocks)
}
-func (x *SACKInfo) afterLoad() {}
+func (s *SACKInfo) afterLoad() {}
-func (x *SACKInfo) StateLoad(m state.Source) {
- m.Load(0, &x.Blocks)
- m.Load(1, &x.NumBlocks)
+func (s *SACKInfo) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.Blocks)
+ stateSourceObject.Load(1, &s.NumBlocks)
}
-func (x *rcvBufAutoTuneParams) StateTypeName() string {
+func (r *rcvBufAutoTuneParams) StateTypeName() string {
return "pkg/tcpip/transport/tcp.rcvBufAutoTuneParams"
}
-func (x *rcvBufAutoTuneParams) StateFields() []string {
+func (r *rcvBufAutoTuneParams) StateFields() []string {
return []string{
"measureTime",
"copied",
@@ -100,65 +100,65 @@ func (x *rcvBufAutoTuneParams) StateFields() []string {
}
}
-func (x *rcvBufAutoTuneParams) beforeSave() {}
+func (r *rcvBufAutoTuneParams) beforeSave() {}
-func (x *rcvBufAutoTuneParams) StateSave(m state.Sink) {
- x.beforeSave()
- var measureTime unixTime = x.saveMeasureTime()
- m.SaveValue(0, measureTime)
- var rttMeasureTime unixTime = x.saveRttMeasureTime()
- m.SaveValue(5, rttMeasureTime)
- m.Save(1, &x.copied)
- m.Save(2, &x.prevCopied)
- m.Save(3, &x.rtt)
- m.Save(4, &x.rttMeasureSeqNumber)
- m.Save(6, &x.disabled)
+func (r *rcvBufAutoTuneParams) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ var measureTimeValue unixTime = r.saveMeasureTime()
+ stateSinkObject.SaveValue(0, measureTimeValue)
+ var rttMeasureTimeValue unixTime = r.saveRttMeasureTime()
+ stateSinkObject.SaveValue(5, rttMeasureTimeValue)
+ stateSinkObject.Save(1, &r.copied)
+ stateSinkObject.Save(2, &r.prevCopied)
+ stateSinkObject.Save(3, &r.rtt)
+ stateSinkObject.Save(4, &r.rttMeasureSeqNumber)
+ stateSinkObject.Save(6, &r.disabled)
}
-func (x *rcvBufAutoTuneParams) afterLoad() {}
+func (r *rcvBufAutoTuneParams) afterLoad() {}
-func (x *rcvBufAutoTuneParams) StateLoad(m state.Source) {
- m.Load(1, &x.copied)
- m.Load(2, &x.prevCopied)
- m.Load(3, &x.rtt)
- m.Load(4, &x.rttMeasureSeqNumber)
- m.Load(6, &x.disabled)
- m.LoadValue(0, new(unixTime), func(y interface{}) { x.loadMeasureTime(y.(unixTime)) })
- m.LoadValue(5, new(unixTime), func(y interface{}) { x.loadRttMeasureTime(y.(unixTime)) })
+func (r *rcvBufAutoTuneParams) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(1, &r.copied)
+ stateSourceObject.Load(2, &r.prevCopied)
+ stateSourceObject.Load(3, &r.rtt)
+ stateSourceObject.Load(4, &r.rttMeasureSeqNumber)
+ stateSourceObject.Load(6, &r.disabled)
+ stateSourceObject.LoadValue(0, new(unixTime), func(y interface{}) { r.loadMeasureTime(y.(unixTime)) })
+ stateSourceObject.LoadValue(5, new(unixTime), func(y interface{}) { r.loadRttMeasureTime(y.(unixTime)) })
}
-func (x *EndpointInfo) StateTypeName() string {
+func (e *EndpointInfo) StateTypeName() string {
return "pkg/tcpip/transport/tcp.EndpointInfo"
}
-func (x *EndpointInfo) StateFields() []string {
+func (e *EndpointInfo) StateFields() []string {
return []string{
"TransportEndpointInfo",
"HardError",
}
}
-func (x *EndpointInfo) beforeSave() {}
+func (e *EndpointInfo) beforeSave() {}
-func (x *EndpointInfo) StateSave(m state.Sink) {
- x.beforeSave()
- var HardError string = x.saveHardError()
- m.SaveValue(1, HardError)
- m.Save(0, &x.TransportEndpointInfo)
+func (e *EndpointInfo) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var HardErrorValue string = e.saveHardError()
+ stateSinkObject.SaveValue(1, HardErrorValue)
+ stateSinkObject.Save(0, &e.TransportEndpointInfo)
}
-func (x *EndpointInfo) afterLoad() {}
+func (e *EndpointInfo) afterLoad() {}
-func (x *EndpointInfo) StateLoad(m state.Source) {
- m.Load(0, &x.TransportEndpointInfo)
- m.LoadValue(1, new(string), func(y interface{}) { x.loadHardError(y.(string)) })
+func (e *EndpointInfo) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.TransportEndpointInfo)
+ stateSourceObject.LoadValue(1, new(string), func(y interface{}) { e.loadHardError(y.(string)) })
}
-func (x *endpoint) StateTypeName() string {
+func (e *endpoint) StateTypeName() string {
return "pkg/tcpip/transport/tcp.endpoint"
}
-func (x *endpoint) StateFields() []string {
+func (e *endpoint) StateFields() []string {
return []string{
"EndpointInfo",
"waiterQueue",
@@ -227,151 +227,151 @@ func (x *endpoint) StateFields() []string {
}
}
-func (x *endpoint) StateSave(m state.Sink) {
- x.beforeSave()
- var lastError string = x.saveLastError()
- m.SaveValue(3, lastError)
- var state EndpointState = x.saveState()
- m.SaveValue(11, state)
- var recentTSTime unixTime = x.saveRecentTSTime()
- m.SaveValue(26, recentTSTime)
- var acceptedChan []*endpoint = x.saveAcceptedChan()
- m.SaveValue(52, acceptedChan)
- m.Save(0, &x.EndpointInfo)
- m.Save(1, &x.waiterQueue)
- m.Save(2, &x.uniqueID)
- m.Save(4, &x.rcvList)
- m.Save(5, &x.rcvClosed)
- m.Save(6, &x.rcvBufSize)
- m.Save(7, &x.rcvBufUsed)
- m.Save(8, &x.rcvAutoParams)
- m.Save(9, &x.rcvMemUsed)
- m.Save(10, &x.ownedByUser)
- m.Save(12, &x.boundNICID)
- m.Save(13, &x.ttl)
- m.Save(14, &x.v6only)
- m.Save(15, &x.isConnectNotified)
- m.Save(16, &x.broadcast)
- m.Save(17, &x.portFlags)
- m.Save(18, &x.boundBindToDevice)
- m.Save(19, &x.boundPortFlags)
- m.Save(20, &x.boundDest)
- m.Save(21, &x.effectiveNetProtos)
- m.Save(22, &x.workerRunning)
- m.Save(23, &x.workerCleanup)
- m.Save(24, &x.sendTSOk)
- m.Save(25, &x.recentTS)
- m.Save(27, &x.tsOffset)
- m.Save(28, &x.shutdownFlags)
- m.Save(29, &x.sackPermitted)
- m.Save(30, &x.sack)
- m.Save(31, &x.bindToDevice)
- m.Save(32, &x.delay)
- m.Save(33, &x.cork)
- m.Save(34, &x.scoreboard)
- m.Save(35, &x.slowAck)
- m.Save(36, &x.segmentQueue)
- m.Save(37, &x.synRcvdCount)
- m.Save(38, &x.userMSS)
- m.Save(39, &x.maxSynRetries)
- m.Save(40, &x.windowClamp)
- m.Save(41, &x.sndBufSize)
- m.Save(42, &x.sndBufUsed)
- m.Save(43, &x.sndClosed)
- m.Save(44, &x.sndBufInQueue)
- m.Save(45, &x.sndQueue)
- m.Save(46, &x.cc)
- m.Save(47, &x.packetTooBigCount)
- m.Save(48, &x.sndMTU)
- m.Save(49, &x.keepalive)
- m.Save(50, &x.userTimeout)
- m.Save(51, &x.deferAccept)
- m.Save(53, &x.rcv)
- m.Save(54, &x.snd)
- m.Save(55, &x.connectingAddress)
- m.Save(56, &x.amss)
- m.Save(57, &x.sendTOS)
- m.Save(58, &x.gso)
- m.Save(59, &x.tcpLingerTimeout)
- m.Save(60, &x.closed)
- m.Save(61, &x.txHash)
- m.Save(62, &x.owner)
- m.Save(63, &x.linger)
-}
-
-func (x *endpoint) StateLoad(m state.Source) {
- m.Load(0, &x.EndpointInfo)
- m.LoadWait(1, &x.waiterQueue)
- m.Load(2, &x.uniqueID)
- m.LoadWait(4, &x.rcvList)
- m.Load(5, &x.rcvClosed)
- m.Load(6, &x.rcvBufSize)
- m.Load(7, &x.rcvBufUsed)
- m.Load(8, &x.rcvAutoParams)
- m.Load(9, &x.rcvMemUsed)
- m.Load(10, &x.ownedByUser)
- m.Load(12, &x.boundNICID)
- m.Load(13, &x.ttl)
- m.Load(14, &x.v6only)
- m.Load(15, &x.isConnectNotified)
- m.Load(16, &x.broadcast)
- m.Load(17, &x.portFlags)
- m.Load(18, &x.boundBindToDevice)
- m.Load(19, &x.boundPortFlags)
- m.Load(20, &x.boundDest)
- m.Load(21, &x.effectiveNetProtos)
- m.Load(22, &x.workerRunning)
- m.Load(23, &x.workerCleanup)
- m.Load(24, &x.sendTSOk)
- m.Load(25, &x.recentTS)
- m.Load(27, &x.tsOffset)
- m.Load(28, &x.shutdownFlags)
- m.Load(29, &x.sackPermitted)
- m.Load(30, &x.sack)
- m.Load(31, &x.bindToDevice)
- m.Load(32, &x.delay)
- m.Load(33, &x.cork)
- m.Load(34, &x.scoreboard)
- m.Load(35, &x.slowAck)
- m.LoadWait(36, &x.segmentQueue)
- m.Load(37, &x.synRcvdCount)
- m.Load(38, &x.userMSS)
- m.Load(39, &x.maxSynRetries)
- m.Load(40, &x.windowClamp)
- m.Load(41, &x.sndBufSize)
- m.Load(42, &x.sndBufUsed)
- m.Load(43, &x.sndClosed)
- m.Load(44, &x.sndBufInQueue)
- m.LoadWait(45, &x.sndQueue)
- m.Load(46, &x.cc)
- m.Load(47, &x.packetTooBigCount)
- m.Load(48, &x.sndMTU)
- m.Load(49, &x.keepalive)
- m.Load(50, &x.userTimeout)
- m.Load(51, &x.deferAccept)
- m.LoadWait(53, &x.rcv)
- m.LoadWait(54, &x.snd)
- m.Load(55, &x.connectingAddress)
- m.Load(56, &x.amss)
- m.Load(57, &x.sendTOS)
- m.Load(58, &x.gso)
- m.Load(59, &x.tcpLingerTimeout)
- m.Load(60, &x.closed)
- m.Load(61, &x.txHash)
- m.Load(62, &x.owner)
- m.Load(63, &x.linger)
- m.LoadValue(3, new(string), func(y interface{}) { x.loadLastError(y.(string)) })
- m.LoadValue(11, new(EndpointState), func(y interface{}) { x.loadState(y.(EndpointState)) })
- m.LoadValue(26, new(unixTime), func(y interface{}) { x.loadRecentTSTime(y.(unixTime)) })
- m.LoadValue(52, new([]*endpoint), func(y interface{}) { x.loadAcceptedChan(y.([]*endpoint)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *keepalive) StateTypeName() string {
+func (e *endpoint) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var lastErrorValue string = e.saveLastError()
+ stateSinkObject.SaveValue(3, lastErrorValue)
+ var stateValue EndpointState = e.saveState()
+ stateSinkObject.SaveValue(11, stateValue)
+ var recentTSTimeValue unixTime = e.saveRecentTSTime()
+ stateSinkObject.SaveValue(26, recentTSTimeValue)
+ var acceptedChanValue []*endpoint = e.saveAcceptedChan()
+ stateSinkObject.SaveValue(52, acceptedChanValue)
+ stateSinkObject.Save(0, &e.EndpointInfo)
+ stateSinkObject.Save(1, &e.waiterQueue)
+ stateSinkObject.Save(2, &e.uniqueID)
+ stateSinkObject.Save(4, &e.rcvList)
+ stateSinkObject.Save(5, &e.rcvClosed)
+ stateSinkObject.Save(6, &e.rcvBufSize)
+ stateSinkObject.Save(7, &e.rcvBufUsed)
+ stateSinkObject.Save(8, &e.rcvAutoParams)
+ stateSinkObject.Save(9, &e.rcvMemUsed)
+ stateSinkObject.Save(10, &e.ownedByUser)
+ stateSinkObject.Save(12, &e.boundNICID)
+ stateSinkObject.Save(13, &e.ttl)
+ stateSinkObject.Save(14, &e.v6only)
+ stateSinkObject.Save(15, &e.isConnectNotified)
+ stateSinkObject.Save(16, &e.broadcast)
+ stateSinkObject.Save(17, &e.portFlags)
+ stateSinkObject.Save(18, &e.boundBindToDevice)
+ stateSinkObject.Save(19, &e.boundPortFlags)
+ stateSinkObject.Save(20, &e.boundDest)
+ stateSinkObject.Save(21, &e.effectiveNetProtos)
+ stateSinkObject.Save(22, &e.workerRunning)
+ stateSinkObject.Save(23, &e.workerCleanup)
+ stateSinkObject.Save(24, &e.sendTSOk)
+ stateSinkObject.Save(25, &e.recentTS)
+ stateSinkObject.Save(27, &e.tsOffset)
+ stateSinkObject.Save(28, &e.shutdownFlags)
+ stateSinkObject.Save(29, &e.sackPermitted)
+ stateSinkObject.Save(30, &e.sack)
+ stateSinkObject.Save(31, &e.bindToDevice)
+ stateSinkObject.Save(32, &e.delay)
+ stateSinkObject.Save(33, &e.cork)
+ stateSinkObject.Save(34, &e.scoreboard)
+ stateSinkObject.Save(35, &e.slowAck)
+ stateSinkObject.Save(36, &e.segmentQueue)
+ stateSinkObject.Save(37, &e.synRcvdCount)
+ stateSinkObject.Save(38, &e.userMSS)
+ stateSinkObject.Save(39, &e.maxSynRetries)
+ stateSinkObject.Save(40, &e.windowClamp)
+ stateSinkObject.Save(41, &e.sndBufSize)
+ stateSinkObject.Save(42, &e.sndBufUsed)
+ stateSinkObject.Save(43, &e.sndClosed)
+ stateSinkObject.Save(44, &e.sndBufInQueue)
+ stateSinkObject.Save(45, &e.sndQueue)
+ stateSinkObject.Save(46, &e.cc)
+ stateSinkObject.Save(47, &e.packetTooBigCount)
+ stateSinkObject.Save(48, &e.sndMTU)
+ stateSinkObject.Save(49, &e.keepalive)
+ stateSinkObject.Save(50, &e.userTimeout)
+ stateSinkObject.Save(51, &e.deferAccept)
+ stateSinkObject.Save(53, &e.rcv)
+ stateSinkObject.Save(54, &e.snd)
+ stateSinkObject.Save(55, &e.connectingAddress)
+ stateSinkObject.Save(56, &e.amss)
+ stateSinkObject.Save(57, &e.sendTOS)
+ stateSinkObject.Save(58, &e.gso)
+ stateSinkObject.Save(59, &e.tcpLingerTimeout)
+ stateSinkObject.Save(60, &e.closed)
+ stateSinkObject.Save(61, &e.txHash)
+ stateSinkObject.Save(62, &e.owner)
+ stateSinkObject.Save(63, &e.linger)
+}
+
+func (e *endpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.EndpointInfo)
+ stateSourceObject.LoadWait(1, &e.waiterQueue)
+ stateSourceObject.Load(2, &e.uniqueID)
+ stateSourceObject.LoadWait(4, &e.rcvList)
+ stateSourceObject.Load(5, &e.rcvClosed)
+ stateSourceObject.Load(6, &e.rcvBufSize)
+ stateSourceObject.Load(7, &e.rcvBufUsed)
+ stateSourceObject.Load(8, &e.rcvAutoParams)
+ stateSourceObject.Load(9, &e.rcvMemUsed)
+ stateSourceObject.Load(10, &e.ownedByUser)
+ stateSourceObject.Load(12, &e.boundNICID)
+ stateSourceObject.Load(13, &e.ttl)
+ stateSourceObject.Load(14, &e.v6only)
+ stateSourceObject.Load(15, &e.isConnectNotified)
+ stateSourceObject.Load(16, &e.broadcast)
+ stateSourceObject.Load(17, &e.portFlags)
+ stateSourceObject.Load(18, &e.boundBindToDevice)
+ stateSourceObject.Load(19, &e.boundPortFlags)
+ stateSourceObject.Load(20, &e.boundDest)
+ stateSourceObject.Load(21, &e.effectiveNetProtos)
+ stateSourceObject.Load(22, &e.workerRunning)
+ stateSourceObject.Load(23, &e.workerCleanup)
+ stateSourceObject.Load(24, &e.sendTSOk)
+ stateSourceObject.Load(25, &e.recentTS)
+ stateSourceObject.Load(27, &e.tsOffset)
+ stateSourceObject.Load(28, &e.shutdownFlags)
+ stateSourceObject.Load(29, &e.sackPermitted)
+ stateSourceObject.Load(30, &e.sack)
+ stateSourceObject.Load(31, &e.bindToDevice)
+ stateSourceObject.Load(32, &e.delay)
+ stateSourceObject.Load(33, &e.cork)
+ stateSourceObject.Load(34, &e.scoreboard)
+ stateSourceObject.Load(35, &e.slowAck)
+ stateSourceObject.LoadWait(36, &e.segmentQueue)
+ stateSourceObject.Load(37, &e.synRcvdCount)
+ stateSourceObject.Load(38, &e.userMSS)
+ stateSourceObject.Load(39, &e.maxSynRetries)
+ stateSourceObject.Load(40, &e.windowClamp)
+ stateSourceObject.Load(41, &e.sndBufSize)
+ stateSourceObject.Load(42, &e.sndBufUsed)
+ stateSourceObject.Load(43, &e.sndClosed)
+ stateSourceObject.Load(44, &e.sndBufInQueue)
+ stateSourceObject.LoadWait(45, &e.sndQueue)
+ stateSourceObject.Load(46, &e.cc)
+ stateSourceObject.Load(47, &e.packetTooBigCount)
+ stateSourceObject.Load(48, &e.sndMTU)
+ stateSourceObject.Load(49, &e.keepalive)
+ stateSourceObject.Load(50, &e.userTimeout)
+ stateSourceObject.Load(51, &e.deferAccept)
+ stateSourceObject.LoadWait(53, &e.rcv)
+ stateSourceObject.LoadWait(54, &e.snd)
+ stateSourceObject.Load(55, &e.connectingAddress)
+ stateSourceObject.Load(56, &e.amss)
+ stateSourceObject.Load(57, &e.sendTOS)
+ stateSourceObject.Load(58, &e.gso)
+ stateSourceObject.Load(59, &e.tcpLingerTimeout)
+ stateSourceObject.Load(60, &e.closed)
+ stateSourceObject.Load(61, &e.txHash)
+ stateSourceObject.Load(62, &e.owner)
+ stateSourceObject.Load(63, &e.linger)
+ stateSourceObject.LoadValue(3, new(string), func(y interface{}) { e.loadLastError(y.(string)) })
+ stateSourceObject.LoadValue(11, new(EndpointState), func(y interface{}) { e.loadState(y.(EndpointState)) })
+ stateSourceObject.LoadValue(26, new(unixTime), func(y interface{}) { e.loadRecentTSTime(y.(unixTime)) })
+ stateSourceObject.LoadValue(52, new([]*endpoint), func(y interface{}) { e.loadAcceptedChan(y.([]*endpoint)) })
+ stateSourceObject.AfterLoad(e.afterLoad)
+}
+
+func (k *keepalive) StateTypeName() string {
return "pkg/tcpip/transport/tcp.keepalive"
}
-func (x *keepalive) StateFields() []string {
+func (k *keepalive) StateFields() []string {
return []string{
"enabled",
"idle",
@@ -381,32 +381,32 @@ func (x *keepalive) StateFields() []string {
}
}
-func (x *keepalive) beforeSave() {}
+func (k *keepalive) beforeSave() {}
-func (x *keepalive) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.enabled)
- m.Save(1, &x.idle)
- m.Save(2, &x.interval)
- m.Save(3, &x.count)
- m.Save(4, &x.unacked)
+func (k *keepalive) StateSave(stateSinkObject state.Sink) {
+ k.beforeSave()
+ stateSinkObject.Save(0, &k.enabled)
+ stateSinkObject.Save(1, &k.idle)
+ stateSinkObject.Save(2, &k.interval)
+ stateSinkObject.Save(3, &k.count)
+ stateSinkObject.Save(4, &k.unacked)
}
-func (x *keepalive) afterLoad() {}
+func (k *keepalive) afterLoad() {}
-func (x *keepalive) StateLoad(m state.Source) {
- m.Load(0, &x.enabled)
- m.Load(1, &x.idle)
- m.Load(2, &x.interval)
- m.Load(3, &x.count)
- m.Load(4, &x.unacked)
+func (k *keepalive) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &k.enabled)
+ stateSourceObject.Load(1, &k.idle)
+ stateSourceObject.Load(2, &k.interval)
+ stateSourceObject.Load(3, &k.count)
+ stateSourceObject.Load(4, &k.unacked)
}
-func (x *rackControl) StateTypeName() string {
+func (r *rackControl) StateTypeName() string {
return "pkg/tcpip/transport/tcp.rackControl"
}
-func (x *rackControl) StateFields() []string {
+func (r *rackControl) StateFields() []string {
return []string{
"xmitTime",
"endSequence",
@@ -416,33 +416,33 @@ func (x *rackControl) StateFields() []string {
}
}
-func (x *rackControl) beforeSave() {}
+func (r *rackControl) beforeSave() {}
-func (x *rackControl) StateSave(m state.Sink) {
- x.beforeSave()
- var xmitTime unixTime = x.saveXmitTime()
- m.SaveValue(0, xmitTime)
- m.Save(1, &x.endSequence)
- m.Save(2, &x.fack)
- m.Save(3, &x.minRTT)
- m.Save(4, &x.rtt)
+func (r *rackControl) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ var xmitTimeValue unixTime = r.saveXmitTime()
+ stateSinkObject.SaveValue(0, xmitTimeValue)
+ stateSinkObject.Save(1, &r.endSequence)
+ stateSinkObject.Save(2, &r.fack)
+ stateSinkObject.Save(3, &r.minRTT)
+ stateSinkObject.Save(4, &r.rtt)
}
-func (x *rackControl) afterLoad() {}
+func (r *rackControl) afterLoad() {}
-func (x *rackControl) StateLoad(m state.Source) {
- m.Load(1, &x.endSequence)
- m.Load(2, &x.fack)
- m.Load(3, &x.minRTT)
- m.Load(4, &x.rtt)
- m.LoadValue(0, new(unixTime), func(y interface{}) { x.loadXmitTime(y.(unixTime)) })
+func (r *rackControl) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(1, &r.endSequence)
+ stateSourceObject.Load(2, &r.fack)
+ stateSourceObject.Load(3, &r.minRTT)
+ stateSourceObject.Load(4, &r.rtt)
+ stateSourceObject.LoadValue(0, new(unixTime), func(y interface{}) { r.loadXmitTime(y.(unixTime)) })
}
-func (x *receiver) StateTypeName() string {
+func (r *receiver) StateTypeName() string {
return "pkg/tcpip/transport/tcp.receiver"
}
-func (x *receiver) StateFields() []string {
+func (r *receiver) StateFields() []string {
return []string{
"ep",
"rcvNxt",
@@ -456,90 +456,90 @@ func (x *receiver) StateFields() []string {
}
}
-func (x *receiver) beforeSave() {}
+func (r *receiver) beforeSave() {}
-func (x *receiver) StateSave(m state.Sink) {
- x.beforeSave()
- var lastRcvdAckTime unixTime = x.saveLastRcvdAckTime()
- m.SaveValue(8, lastRcvdAckTime)
- m.Save(0, &x.ep)
- m.Save(1, &x.rcvNxt)
- m.Save(2, &x.rcvAcc)
- m.Save(3, &x.rcvWnd)
- m.Save(4, &x.rcvWndScale)
- m.Save(5, &x.closed)
- m.Save(6, &x.pendingRcvdSegments)
- m.Save(7, &x.pendingBufUsed)
+func (r *receiver) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ var lastRcvdAckTimeValue unixTime = r.saveLastRcvdAckTime()
+ stateSinkObject.SaveValue(8, lastRcvdAckTimeValue)
+ stateSinkObject.Save(0, &r.ep)
+ stateSinkObject.Save(1, &r.rcvNxt)
+ stateSinkObject.Save(2, &r.rcvAcc)
+ stateSinkObject.Save(3, &r.rcvWnd)
+ stateSinkObject.Save(4, &r.rcvWndScale)
+ stateSinkObject.Save(5, &r.closed)
+ stateSinkObject.Save(6, &r.pendingRcvdSegments)
+ stateSinkObject.Save(7, &r.pendingBufUsed)
}
-func (x *receiver) afterLoad() {}
+func (r *receiver) afterLoad() {}
-func (x *receiver) StateLoad(m state.Source) {
- m.Load(0, &x.ep)
- m.Load(1, &x.rcvNxt)
- m.Load(2, &x.rcvAcc)
- m.Load(3, &x.rcvWnd)
- m.Load(4, &x.rcvWndScale)
- m.Load(5, &x.closed)
- m.Load(6, &x.pendingRcvdSegments)
- m.Load(7, &x.pendingBufUsed)
- m.LoadValue(8, new(unixTime), func(y interface{}) { x.loadLastRcvdAckTime(y.(unixTime)) })
+func (r *receiver) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.ep)
+ stateSourceObject.Load(1, &r.rcvNxt)
+ stateSourceObject.Load(2, &r.rcvAcc)
+ stateSourceObject.Load(3, &r.rcvWnd)
+ stateSourceObject.Load(4, &r.rcvWndScale)
+ stateSourceObject.Load(5, &r.closed)
+ stateSourceObject.Load(6, &r.pendingRcvdSegments)
+ stateSourceObject.Load(7, &r.pendingBufUsed)
+ stateSourceObject.LoadValue(8, new(unixTime), func(y interface{}) { r.loadLastRcvdAckTime(y.(unixTime)) })
}
-func (x *renoState) StateTypeName() string {
+func (r *renoState) StateTypeName() string {
return "pkg/tcpip/transport/tcp.renoState"
}
-func (x *renoState) StateFields() []string {
+func (r *renoState) StateFields() []string {
return []string{
"s",
}
}
-func (x *renoState) beforeSave() {}
+func (r *renoState) beforeSave() {}
-func (x *renoState) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.s)
+func (r *renoState) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.s)
}
-func (x *renoState) afterLoad() {}
+func (r *renoState) afterLoad() {}
-func (x *renoState) StateLoad(m state.Source) {
- m.Load(0, &x.s)
+func (r *renoState) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.s)
}
-func (x *SACKScoreboard) StateTypeName() string {
+func (s *SACKScoreboard) StateTypeName() string {
return "pkg/tcpip/transport/tcp.SACKScoreboard"
}
-func (x *SACKScoreboard) StateFields() []string {
+func (s *SACKScoreboard) StateFields() []string {
return []string{
"smss",
"maxSACKED",
}
}
-func (x *SACKScoreboard) beforeSave() {}
+func (s *SACKScoreboard) beforeSave() {}
-func (x *SACKScoreboard) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.smss)
- m.Save(1, &x.maxSACKED)
+func (s *SACKScoreboard) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.smss)
+ stateSinkObject.Save(1, &s.maxSACKED)
}
-func (x *SACKScoreboard) afterLoad() {}
+func (s *SACKScoreboard) afterLoad() {}
-func (x *SACKScoreboard) StateLoad(m state.Source) {
- m.Load(0, &x.smss)
- m.Load(1, &x.maxSACKED)
+func (s *SACKScoreboard) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.smss)
+ stateSourceObject.Load(1, &s.maxSACKED)
}
-func (x *segment) StateTypeName() string {
+func (s *segment) StateTypeName() string {
return "pkg/tcpip/transport/tcp.segment"
}
-func (x *segment) StateFields() []string {
+func (s *segment) StateFields() []string {
return []string{
"segmentEntry",
"refCnt",
@@ -563,64 +563,64 @@ func (x *segment) StateFields() []string {
}
}
-func (x *segment) beforeSave() {}
-
-func (x *segment) StateSave(m state.Sink) {
- x.beforeSave()
- var data buffer.VectorisedView = x.saveData()
- m.SaveValue(4, data)
- var options []byte = x.saveOptions()
- m.SaveValue(14, options)
- var rcvdTime unixTime = x.saveRcvdTime()
- m.SaveValue(16, rcvdTime)
- var xmitTime unixTime = x.saveXmitTime()
- m.SaveValue(17, xmitTime)
- m.Save(0, &x.segmentEntry)
- m.Save(1, &x.refCnt)
- m.Save(2, &x.ep)
- m.Save(3, &x.qFlags)
- m.Save(5, &x.hdr)
- m.Save(6, &x.viewToDeliver)
- m.Save(7, &x.sequenceNumber)
- m.Save(8, &x.ackNumber)
- m.Save(9, &x.flags)
- m.Save(10, &x.window)
- m.Save(11, &x.csum)
- m.Save(12, &x.csumValid)
- m.Save(13, &x.parsedOptions)
- m.Save(15, &x.hasNewSACKInfo)
- m.Save(18, &x.xmitCount)
-}
-
-func (x *segment) afterLoad() {}
-
-func (x *segment) StateLoad(m state.Source) {
- m.Load(0, &x.segmentEntry)
- m.Load(1, &x.refCnt)
- m.Load(2, &x.ep)
- m.Load(3, &x.qFlags)
- m.Load(5, &x.hdr)
- m.Load(6, &x.viewToDeliver)
- m.Load(7, &x.sequenceNumber)
- m.Load(8, &x.ackNumber)
- m.Load(9, &x.flags)
- m.Load(10, &x.window)
- m.Load(11, &x.csum)
- m.Load(12, &x.csumValid)
- m.Load(13, &x.parsedOptions)
- m.Load(15, &x.hasNewSACKInfo)
- m.Load(18, &x.xmitCount)
- m.LoadValue(4, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) })
- m.LoadValue(14, new([]byte), func(y interface{}) { x.loadOptions(y.([]byte)) })
- m.LoadValue(16, new(unixTime), func(y interface{}) { x.loadRcvdTime(y.(unixTime)) })
- m.LoadValue(17, new(unixTime), func(y interface{}) { x.loadXmitTime(y.(unixTime)) })
-}
-
-func (x *segmentQueue) StateTypeName() string {
+func (s *segment) beforeSave() {}
+
+func (s *segment) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ var dataValue buffer.VectorisedView = s.saveData()
+ stateSinkObject.SaveValue(4, dataValue)
+ var optionsValue []byte = s.saveOptions()
+ stateSinkObject.SaveValue(14, optionsValue)
+ var rcvdTimeValue unixTime = s.saveRcvdTime()
+ stateSinkObject.SaveValue(16, rcvdTimeValue)
+ var xmitTimeValue unixTime = s.saveXmitTime()
+ stateSinkObject.SaveValue(17, xmitTimeValue)
+ stateSinkObject.Save(0, &s.segmentEntry)
+ stateSinkObject.Save(1, &s.refCnt)
+ stateSinkObject.Save(2, &s.ep)
+ stateSinkObject.Save(3, &s.qFlags)
+ stateSinkObject.Save(5, &s.hdr)
+ stateSinkObject.Save(6, &s.viewToDeliver)
+ stateSinkObject.Save(7, &s.sequenceNumber)
+ stateSinkObject.Save(8, &s.ackNumber)
+ stateSinkObject.Save(9, &s.flags)
+ stateSinkObject.Save(10, &s.window)
+ stateSinkObject.Save(11, &s.csum)
+ stateSinkObject.Save(12, &s.csumValid)
+ stateSinkObject.Save(13, &s.parsedOptions)
+ stateSinkObject.Save(15, &s.hasNewSACKInfo)
+ stateSinkObject.Save(18, &s.xmitCount)
+}
+
+func (s *segment) afterLoad() {}
+
+func (s *segment) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.segmentEntry)
+ stateSourceObject.Load(1, &s.refCnt)
+ stateSourceObject.Load(2, &s.ep)
+ stateSourceObject.Load(3, &s.qFlags)
+ stateSourceObject.Load(5, &s.hdr)
+ stateSourceObject.Load(6, &s.viewToDeliver)
+ stateSourceObject.Load(7, &s.sequenceNumber)
+ stateSourceObject.Load(8, &s.ackNumber)
+ stateSourceObject.Load(9, &s.flags)
+ stateSourceObject.Load(10, &s.window)
+ stateSourceObject.Load(11, &s.csum)
+ stateSourceObject.Load(12, &s.csumValid)
+ stateSourceObject.Load(13, &s.parsedOptions)
+ stateSourceObject.Load(15, &s.hasNewSACKInfo)
+ stateSourceObject.Load(18, &s.xmitCount)
+ stateSourceObject.LoadValue(4, new(buffer.VectorisedView), func(y interface{}) { s.loadData(y.(buffer.VectorisedView)) })
+ stateSourceObject.LoadValue(14, new([]byte), func(y interface{}) { s.loadOptions(y.([]byte)) })
+ stateSourceObject.LoadValue(16, new(unixTime), func(y interface{}) { s.loadRcvdTime(y.(unixTime)) })
+ stateSourceObject.LoadValue(17, new(unixTime), func(y interface{}) { s.loadXmitTime(y.(unixTime)) })
+}
+
+func (s *segmentQueue) StateTypeName() string {
return "pkg/tcpip/transport/tcp.segmentQueue"
}
-func (x *segmentQueue) StateFields() []string {
+func (s *segmentQueue) StateFields() []string {
return []string{
"list",
"ep",
@@ -628,28 +628,28 @@ func (x *segmentQueue) StateFields() []string {
}
}
-func (x *segmentQueue) beforeSave() {}
+func (s *segmentQueue) beforeSave() {}
-func (x *segmentQueue) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.list)
- m.Save(1, &x.ep)
- m.Save(2, &x.frozen)
+func (s *segmentQueue) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.list)
+ stateSinkObject.Save(1, &s.ep)
+ stateSinkObject.Save(2, &s.frozen)
}
-func (x *segmentQueue) afterLoad() {}
+func (s *segmentQueue) afterLoad() {}
-func (x *segmentQueue) StateLoad(m state.Source) {
- m.LoadWait(0, &x.list)
- m.Load(1, &x.ep)
- m.Load(2, &x.frozen)
+func (s *segmentQueue) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.LoadWait(0, &s.list)
+ stateSourceObject.Load(1, &s.ep)
+ stateSourceObject.Load(2, &s.frozen)
}
-func (x *sender) StateTypeName() string {
+func (s *sender) StateTypeName() string {
return "pkg/tcpip/transport/tcp.sender"
}
-func (x *sender) StateFields() []string {
+func (s *sender) StateFields() []string {
return []string{
"ep",
"lastSendTime",
@@ -683,82 +683,82 @@ func (x *sender) StateFields() []string {
}
}
-func (x *sender) beforeSave() {}
-
-func (x *sender) StateSave(m state.Sink) {
- x.beforeSave()
- var lastSendTime unixTime = x.saveLastSendTime()
- m.SaveValue(1, lastSendTime)
- var rttMeasureTime unixTime = x.saveRttMeasureTime()
- m.SaveValue(12, rttMeasureTime)
- var firstRetransmittedSegXmitTime unixTime = x.saveFirstRetransmittedSegXmitTime()
- m.SaveValue(13, firstRetransmittedSegXmitTime)
- m.Save(0, &x.ep)
- m.Save(2, &x.dupAckCount)
- m.Save(3, &x.fr)
- m.Save(4, &x.sndCwnd)
- m.Save(5, &x.sndSsthresh)
- m.Save(6, &x.sndCAAckCount)
- m.Save(7, &x.outstanding)
- m.Save(8, &x.sndWnd)
- m.Save(9, &x.sndUna)
- m.Save(10, &x.sndNxt)
- m.Save(11, &x.rttMeasureSeqNum)
- m.Save(14, &x.closed)
- m.Save(15, &x.writeNext)
- m.Save(16, &x.writeList)
- m.Save(17, &x.rtt)
- m.Save(18, &x.rto)
- m.Save(19, &x.minRTO)
- m.Save(20, &x.maxRTO)
- m.Save(21, &x.maxRetries)
- m.Save(22, &x.maxPayloadSize)
- m.Save(23, &x.gso)
- m.Save(24, &x.sndWndScale)
- m.Save(25, &x.maxSentAck)
- m.Save(26, &x.state)
- m.Save(27, &x.cc)
- m.Save(28, &x.rc)
-}
-
-func (x *sender) StateLoad(m state.Source) {
- m.Load(0, &x.ep)
- m.Load(2, &x.dupAckCount)
- m.Load(3, &x.fr)
- m.Load(4, &x.sndCwnd)
- m.Load(5, &x.sndSsthresh)
- m.Load(6, &x.sndCAAckCount)
- m.Load(7, &x.outstanding)
- m.Load(8, &x.sndWnd)
- m.Load(9, &x.sndUna)
- m.Load(10, &x.sndNxt)
- m.Load(11, &x.rttMeasureSeqNum)
- m.Load(14, &x.closed)
- m.Load(15, &x.writeNext)
- m.Load(16, &x.writeList)
- m.Load(17, &x.rtt)
- m.Load(18, &x.rto)
- m.Load(19, &x.minRTO)
- m.Load(20, &x.maxRTO)
- m.Load(21, &x.maxRetries)
- m.Load(22, &x.maxPayloadSize)
- m.Load(23, &x.gso)
- m.Load(24, &x.sndWndScale)
- m.Load(25, &x.maxSentAck)
- m.Load(26, &x.state)
- m.Load(27, &x.cc)
- m.Load(28, &x.rc)
- m.LoadValue(1, new(unixTime), func(y interface{}) { x.loadLastSendTime(y.(unixTime)) })
- m.LoadValue(12, new(unixTime), func(y interface{}) { x.loadRttMeasureTime(y.(unixTime)) })
- m.LoadValue(13, new(unixTime), func(y interface{}) { x.loadFirstRetransmittedSegXmitTime(y.(unixTime)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *rtt) StateTypeName() string {
+func (s *sender) beforeSave() {}
+
+func (s *sender) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ var lastSendTimeValue unixTime = s.saveLastSendTime()
+ stateSinkObject.SaveValue(1, lastSendTimeValue)
+ var rttMeasureTimeValue unixTime = s.saveRttMeasureTime()
+ stateSinkObject.SaveValue(12, rttMeasureTimeValue)
+ var firstRetransmittedSegXmitTimeValue unixTime = s.saveFirstRetransmittedSegXmitTime()
+ stateSinkObject.SaveValue(13, firstRetransmittedSegXmitTimeValue)
+ stateSinkObject.Save(0, &s.ep)
+ stateSinkObject.Save(2, &s.dupAckCount)
+ stateSinkObject.Save(3, &s.fr)
+ stateSinkObject.Save(4, &s.sndCwnd)
+ stateSinkObject.Save(5, &s.sndSsthresh)
+ stateSinkObject.Save(6, &s.sndCAAckCount)
+ stateSinkObject.Save(7, &s.outstanding)
+ stateSinkObject.Save(8, &s.sndWnd)
+ stateSinkObject.Save(9, &s.sndUna)
+ stateSinkObject.Save(10, &s.sndNxt)
+ stateSinkObject.Save(11, &s.rttMeasureSeqNum)
+ stateSinkObject.Save(14, &s.closed)
+ stateSinkObject.Save(15, &s.writeNext)
+ stateSinkObject.Save(16, &s.writeList)
+ stateSinkObject.Save(17, &s.rtt)
+ stateSinkObject.Save(18, &s.rto)
+ stateSinkObject.Save(19, &s.minRTO)
+ stateSinkObject.Save(20, &s.maxRTO)
+ stateSinkObject.Save(21, &s.maxRetries)
+ stateSinkObject.Save(22, &s.maxPayloadSize)
+ stateSinkObject.Save(23, &s.gso)
+ stateSinkObject.Save(24, &s.sndWndScale)
+ stateSinkObject.Save(25, &s.maxSentAck)
+ stateSinkObject.Save(26, &s.state)
+ stateSinkObject.Save(27, &s.cc)
+ stateSinkObject.Save(28, &s.rc)
+}
+
+func (s *sender) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.ep)
+ stateSourceObject.Load(2, &s.dupAckCount)
+ stateSourceObject.Load(3, &s.fr)
+ stateSourceObject.Load(4, &s.sndCwnd)
+ stateSourceObject.Load(5, &s.sndSsthresh)
+ stateSourceObject.Load(6, &s.sndCAAckCount)
+ stateSourceObject.Load(7, &s.outstanding)
+ stateSourceObject.Load(8, &s.sndWnd)
+ stateSourceObject.Load(9, &s.sndUna)
+ stateSourceObject.Load(10, &s.sndNxt)
+ stateSourceObject.Load(11, &s.rttMeasureSeqNum)
+ stateSourceObject.Load(14, &s.closed)
+ stateSourceObject.Load(15, &s.writeNext)
+ stateSourceObject.Load(16, &s.writeList)
+ stateSourceObject.Load(17, &s.rtt)
+ stateSourceObject.Load(18, &s.rto)
+ stateSourceObject.Load(19, &s.minRTO)
+ stateSourceObject.Load(20, &s.maxRTO)
+ stateSourceObject.Load(21, &s.maxRetries)
+ stateSourceObject.Load(22, &s.maxPayloadSize)
+ stateSourceObject.Load(23, &s.gso)
+ stateSourceObject.Load(24, &s.sndWndScale)
+ stateSourceObject.Load(25, &s.maxSentAck)
+ stateSourceObject.Load(26, &s.state)
+ stateSourceObject.Load(27, &s.cc)
+ stateSourceObject.Load(28, &s.rc)
+ stateSourceObject.LoadValue(1, new(unixTime), func(y interface{}) { s.loadLastSendTime(y.(unixTime)) })
+ stateSourceObject.LoadValue(12, new(unixTime), func(y interface{}) { s.loadRttMeasureTime(y.(unixTime)) })
+ stateSourceObject.LoadValue(13, new(unixTime), func(y interface{}) { s.loadFirstRetransmittedSegXmitTime(y.(unixTime)) })
+ stateSourceObject.AfterLoad(s.afterLoad)
+}
+
+func (r *rtt) StateTypeName() string {
return "pkg/tcpip/transport/tcp.rtt"
}
-func (x *rtt) StateFields() []string {
+func (r *rtt) StateFields() []string {
return []string{
"srtt",
"rttvar",
@@ -766,28 +766,28 @@ func (x *rtt) StateFields() []string {
}
}
-func (x *rtt) beforeSave() {}
+func (r *rtt) beforeSave() {}
-func (x *rtt) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.srtt)
- m.Save(1, &x.rttvar)
- m.Save(2, &x.srttInited)
+func (r *rtt) StateSave(stateSinkObject state.Sink) {
+ r.beforeSave()
+ stateSinkObject.Save(0, &r.srtt)
+ stateSinkObject.Save(1, &r.rttvar)
+ stateSinkObject.Save(2, &r.srttInited)
}
-func (x *rtt) afterLoad() {}
+func (r *rtt) afterLoad() {}
-func (x *rtt) StateLoad(m state.Source) {
- m.Load(0, &x.srtt)
- m.Load(1, &x.rttvar)
- m.Load(2, &x.srttInited)
+func (r *rtt) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &r.srtt)
+ stateSourceObject.Load(1, &r.rttvar)
+ stateSourceObject.Load(2, &r.srttInited)
}
-func (x *fastRecovery) StateTypeName() string {
+func (f *fastRecovery) StateTypeName() string {
return "pkg/tcpip/transport/tcp.fastRecovery"
}
-func (x *fastRecovery) StateFields() []string {
+func (f *fastRecovery) StateFields() []string {
return []string{
"active",
"first",
@@ -798,157 +798,157 @@ func (x *fastRecovery) StateFields() []string {
}
}
-func (x *fastRecovery) beforeSave() {}
+func (f *fastRecovery) beforeSave() {}
-func (x *fastRecovery) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.active)
- m.Save(1, &x.first)
- m.Save(2, &x.last)
- m.Save(3, &x.maxCwnd)
- m.Save(4, &x.highRxt)
- m.Save(5, &x.rescueRxt)
+func (f *fastRecovery) StateSave(stateSinkObject state.Sink) {
+ f.beforeSave()
+ stateSinkObject.Save(0, &f.active)
+ stateSinkObject.Save(1, &f.first)
+ stateSinkObject.Save(2, &f.last)
+ stateSinkObject.Save(3, &f.maxCwnd)
+ stateSinkObject.Save(4, &f.highRxt)
+ stateSinkObject.Save(5, &f.rescueRxt)
}
-func (x *fastRecovery) afterLoad() {}
+func (f *fastRecovery) afterLoad() {}
-func (x *fastRecovery) StateLoad(m state.Source) {
- m.Load(0, &x.active)
- m.Load(1, &x.first)
- m.Load(2, &x.last)
- m.Load(3, &x.maxCwnd)
- m.Load(4, &x.highRxt)
- m.Load(5, &x.rescueRxt)
+func (f *fastRecovery) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &f.active)
+ stateSourceObject.Load(1, &f.first)
+ stateSourceObject.Load(2, &f.last)
+ stateSourceObject.Load(3, &f.maxCwnd)
+ stateSourceObject.Load(4, &f.highRxt)
+ stateSourceObject.Load(5, &f.rescueRxt)
}
-func (x *unixTime) StateTypeName() string {
+func (u *unixTime) StateTypeName() string {
return "pkg/tcpip/transport/tcp.unixTime"
}
-func (x *unixTime) StateFields() []string {
+func (u *unixTime) StateFields() []string {
return []string{
"second",
"nano",
}
}
-func (x *unixTime) beforeSave() {}
+func (u *unixTime) beforeSave() {}
-func (x *unixTime) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.second)
- m.Save(1, &x.nano)
+func (u *unixTime) StateSave(stateSinkObject state.Sink) {
+ u.beforeSave()
+ stateSinkObject.Save(0, &u.second)
+ stateSinkObject.Save(1, &u.nano)
}
-func (x *unixTime) afterLoad() {}
+func (u *unixTime) afterLoad() {}
-func (x *unixTime) StateLoad(m state.Source) {
- m.Load(0, &x.second)
- m.Load(1, &x.nano)
+func (u *unixTime) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &u.second)
+ stateSourceObject.Load(1, &u.nano)
}
-func (x *endpointList) StateTypeName() string {
+func (e *endpointList) StateTypeName() string {
return "pkg/tcpip/transport/tcp.endpointList"
}
-func (x *endpointList) StateFields() []string {
+func (e *endpointList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *endpointList) beforeSave() {}
+func (e *endpointList) beforeSave() {}
-func (x *endpointList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (e *endpointList) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ stateSinkObject.Save(0, &e.head)
+ stateSinkObject.Save(1, &e.tail)
}
-func (x *endpointList) afterLoad() {}
+func (e *endpointList) afterLoad() {}
-func (x *endpointList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (e *endpointList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.head)
+ stateSourceObject.Load(1, &e.tail)
}
-func (x *endpointEntry) StateTypeName() string {
+func (e *endpointEntry) StateTypeName() string {
return "pkg/tcpip/transport/tcp.endpointEntry"
}
-func (x *endpointEntry) StateFields() []string {
+func (e *endpointEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *endpointEntry) beforeSave() {}
+func (e *endpointEntry) beforeSave() {}
-func (x *endpointEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (e *endpointEntry) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ stateSinkObject.Save(0, &e.next)
+ stateSinkObject.Save(1, &e.prev)
}
-func (x *endpointEntry) afterLoad() {}
+func (e *endpointEntry) afterLoad() {}
-func (x *endpointEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (e *endpointEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.next)
+ stateSourceObject.Load(1, &e.prev)
}
-func (x *segmentList) StateTypeName() string {
+func (s *segmentList) StateTypeName() string {
return "pkg/tcpip/transport/tcp.segmentList"
}
-func (x *segmentList) StateFields() []string {
+func (s *segmentList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *segmentList) beforeSave() {}
+func (s *segmentList) beforeSave() {}
-func (x *segmentList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (s *segmentList) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.head)
+ stateSinkObject.Save(1, &s.tail)
}
-func (x *segmentList) afterLoad() {}
+func (s *segmentList) afterLoad() {}
-func (x *segmentList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (s *segmentList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.head)
+ stateSourceObject.Load(1, &s.tail)
}
-func (x *segmentEntry) StateTypeName() string {
+func (s *segmentEntry) StateTypeName() string {
return "pkg/tcpip/transport/tcp.segmentEntry"
}
-func (x *segmentEntry) StateFields() []string {
+func (s *segmentEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *segmentEntry) beforeSave() {}
+func (s *segmentEntry) beforeSave() {}
-func (x *segmentEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (s *segmentEntry) StateSave(stateSinkObject state.Sink) {
+ s.beforeSave()
+ stateSinkObject.Save(0, &s.next)
+ stateSinkObject.Save(1, &s.prev)
}
-func (x *segmentEntry) afterLoad() {}
+func (s *segmentEntry) afterLoad() {}
-func (x *segmentEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (s *segmentEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &s.next)
+ stateSourceObject.Load(1, &s.prev)
}
func init() {
diff --git a/pkg/tcpip/transport/udp/udp_state_autogen.go b/pkg/tcpip/transport/udp/udp_state_autogen.go
index ce3b1df48..74cec739f 100644
--- a/pkg/tcpip/transport/udp/udp_state_autogen.go
+++ b/pkg/tcpip/transport/udp/udp_state_autogen.go
@@ -7,11 +7,11 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/buffer"
)
-func (x *udpPacket) StateTypeName() string {
+func (u *udpPacket) StateTypeName() string {
return "pkg/tcpip/transport/udp.udpPacket"
}
-func (x *udpPacket) StateFields() []string {
+func (u *udpPacket) StateFields() []string {
return []string{
"udpPacketEntry",
"senderAddress",
@@ -22,35 +22,35 @@ func (x *udpPacket) StateFields() []string {
}
}
-func (x *udpPacket) beforeSave() {}
+func (u *udpPacket) beforeSave() {}
-func (x *udpPacket) StateSave(m state.Sink) {
- x.beforeSave()
- var data buffer.VectorisedView = x.saveData()
- m.SaveValue(3, data)
- m.Save(0, &x.udpPacketEntry)
- m.Save(1, &x.senderAddress)
- m.Save(2, &x.packetInfo)
- m.Save(4, &x.timestamp)
- m.Save(5, &x.tos)
+func (u *udpPacket) StateSave(stateSinkObject state.Sink) {
+ u.beforeSave()
+ var dataValue buffer.VectorisedView = u.saveData()
+ stateSinkObject.SaveValue(3, dataValue)
+ stateSinkObject.Save(0, &u.udpPacketEntry)
+ stateSinkObject.Save(1, &u.senderAddress)
+ stateSinkObject.Save(2, &u.packetInfo)
+ stateSinkObject.Save(4, &u.timestamp)
+ stateSinkObject.Save(5, &u.tos)
}
-func (x *udpPacket) afterLoad() {}
+func (u *udpPacket) afterLoad() {}
-func (x *udpPacket) StateLoad(m state.Source) {
- m.Load(0, &x.udpPacketEntry)
- m.Load(1, &x.senderAddress)
- m.Load(2, &x.packetInfo)
- m.Load(4, &x.timestamp)
- m.Load(5, &x.tos)
- m.LoadValue(3, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) })
+func (u *udpPacket) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &u.udpPacketEntry)
+ stateSourceObject.Load(1, &u.senderAddress)
+ stateSourceObject.Load(2, &u.packetInfo)
+ stateSourceObject.Load(4, &u.timestamp)
+ stateSourceObject.Load(5, &u.tos)
+ stateSourceObject.LoadValue(3, new(buffer.VectorisedView), func(y interface{}) { u.loadData(y.(buffer.VectorisedView)) })
}
-func (x *endpoint) StateTypeName() string {
+func (e *endpoint) StateTypeName() string {
return "pkg/tcpip/transport/udp.endpoint"
}
-func (x *endpoint) StateFields() []string {
+func (e *endpoint) StateFields() []string {
return []string{
"TransportEndpointInfo",
"waiterQueue",
@@ -89,160 +89,160 @@ func (x *endpoint) StateFields() []string {
}
}
-func (x *endpoint) StateSave(m state.Sink) {
- x.beforeSave()
- var rcvBufSizeMax int = x.saveRcvBufSizeMax()
- m.SaveValue(5, rcvBufSizeMax)
- var lastError string = x.saveLastError()
- m.SaveValue(22, lastError)
- m.Save(0, &x.TransportEndpointInfo)
- m.Save(1, &x.waiterQueue)
- m.Save(2, &x.uniqueID)
- m.Save(3, &x.rcvReady)
- m.Save(4, &x.rcvList)
- m.Save(6, &x.rcvBufSize)
- m.Save(7, &x.rcvClosed)
- m.Save(8, &x.sndBufSize)
- m.Save(9, &x.sndBufSizeMax)
- m.Save(10, &x.state)
- m.Save(11, &x.dstPort)
- m.Save(12, &x.v6only)
- m.Save(13, &x.ttl)
- m.Save(14, &x.multicastTTL)
- m.Save(15, &x.multicastAddr)
- m.Save(16, &x.multicastNICID)
- m.Save(17, &x.multicastLoop)
- m.Save(18, &x.portFlags)
- m.Save(19, &x.bindToDevice)
- m.Save(20, &x.broadcast)
- m.Save(21, &x.noChecksum)
- m.Save(23, &x.boundBindToDevice)
- m.Save(24, &x.boundPortFlags)
- m.Save(25, &x.sendTOS)
- m.Save(26, &x.receiveTOS)
- m.Save(27, &x.receiveTClass)
- m.Save(28, &x.receiveIPPacketInfo)
- m.Save(29, &x.shutdownFlags)
- m.Save(30, &x.multicastMemberships)
- m.Save(31, &x.effectiveNetProtos)
- m.Save(32, &x.owner)
- m.Save(33, &x.linger)
-}
-
-func (x *endpoint) StateLoad(m state.Source) {
- m.Load(0, &x.TransportEndpointInfo)
- m.Load(1, &x.waiterQueue)
- m.Load(2, &x.uniqueID)
- m.Load(3, &x.rcvReady)
- m.Load(4, &x.rcvList)
- m.Load(6, &x.rcvBufSize)
- m.Load(7, &x.rcvClosed)
- m.Load(8, &x.sndBufSize)
- m.Load(9, &x.sndBufSizeMax)
- m.Load(10, &x.state)
- m.Load(11, &x.dstPort)
- m.Load(12, &x.v6only)
- m.Load(13, &x.ttl)
- m.Load(14, &x.multicastTTL)
- m.Load(15, &x.multicastAddr)
- m.Load(16, &x.multicastNICID)
- m.Load(17, &x.multicastLoop)
- m.Load(18, &x.portFlags)
- m.Load(19, &x.bindToDevice)
- m.Load(20, &x.broadcast)
- m.Load(21, &x.noChecksum)
- m.Load(23, &x.boundBindToDevice)
- m.Load(24, &x.boundPortFlags)
- m.Load(25, &x.sendTOS)
- m.Load(26, &x.receiveTOS)
- m.Load(27, &x.receiveTClass)
- m.Load(28, &x.receiveIPPacketInfo)
- m.Load(29, &x.shutdownFlags)
- m.Load(30, &x.multicastMemberships)
- m.Load(31, &x.effectiveNetProtos)
- m.Load(32, &x.owner)
- m.Load(33, &x.linger)
- m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) })
- m.LoadValue(22, new(string), func(y interface{}) { x.loadLastError(y.(string)) })
- m.AfterLoad(x.afterLoad)
-}
-
-func (x *multicastMembership) StateTypeName() string {
+func (e *endpoint) StateSave(stateSinkObject state.Sink) {
+ e.beforeSave()
+ var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax()
+ stateSinkObject.SaveValue(5, rcvBufSizeMaxValue)
+ var lastErrorValue string = e.saveLastError()
+ stateSinkObject.SaveValue(22, lastErrorValue)
+ stateSinkObject.Save(0, &e.TransportEndpointInfo)
+ stateSinkObject.Save(1, &e.waiterQueue)
+ stateSinkObject.Save(2, &e.uniqueID)
+ stateSinkObject.Save(3, &e.rcvReady)
+ stateSinkObject.Save(4, &e.rcvList)
+ stateSinkObject.Save(6, &e.rcvBufSize)
+ stateSinkObject.Save(7, &e.rcvClosed)
+ stateSinkObject.Save(8, &e.sndBufSize)
+ stateSinkObject.Save(9, &e.sndBufSizeMax)
+ stateSinkObject.Save(10, &e.state)
+ stateSinkObject.Save(11, &e.dstPort)
+ stateSinkObject.Save(12, &e.v6only)
+ stateSinkObject.Save(13, &e.ttl)
+ stateSinkObject.Save(14, &e.multicastTTL)
+ stateSinkObject.Save(15, &e.multicastAddr)
+ stateSinkObject.Save(16, &e.multicastNICID)
+ stateSinkObject.Save(17, &e.multicastLoop)
+ stateSinkObject.Save(18, &e.portFlags)
+ stateSinkObject.Save(19, &e.bindToDevice)
+ stateSinkObject.Save(20, &e.broadcast)
+ stateSinkObject.Save(21, &e.noChecksum)
+ stateSinkObject.Save(23, &e.boundBindToDevice)
+ stateSinkObject.Save(24, &e.boundPortFlags)
+ stateSinkObject.Save(25, &e.sendTOS)
+ stateSinkObject.Save(26, &e.receiveTOS)
+ stateSinkObject.Save(27, &e.receiveTClass)
+ stateSinkObject.Save(28, &e.receiveIPPacketInfo)
+ stateSinkObject.Save(29, &e.shutdownFlags)
+ stateSinkObject.Save(30, &e.multicastMemberships)
+ stateSinkObject.Save(31, &e.effectiveNetProtos)
+ stateSinkObject.Save(32, &e.owner)
+ stateSinkObject.Save(33, &e.linger)
+}
+
+func (e *endpoint) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &e.TransportEndpointInfo)
+ stateSourceObject.Load(1, &e.waiterQueue)
+ stateSourceObject.Load(2, &e.uniqueID)
+ stateSourceObject.Load(3, &e.rcvReady)
+ stateSourceObject.Load(4, &e.rcvList)
+ stateSourceObject.Load(6, &e.rcvBufSize)
+ stateSourceObject.Load(7, &e.rcvClosed)
+ stateSourceObject.Load(8, &e.sndBufSize)
+ stateSourceObject.Load(9, &e.sndBufSizeMax)
+ stateSourceObject.Load(10, &e.state)
+ stateSourceObject.Load(11, &e.dstPort)
+ stateSourceObject.Load(12, &e.v6only)
+ stateSourceObject.Load(13, &e.ttl)
+ stateSourceObject.Load(14, &e.multicastTTL)
+ stateSourceObject.Load(15, &e.multicastAddr)
+ stateSourceObject.Load(16, &e.multicastNICID)
+ stateSourceObject.Load(17, &e.multicastLoop)
+ stateSourceObject.Load(18, &e.portFlags)
+ stateSourceObject.Load(19, &e.bindToDevice)
+ stateSourceObject.Load(20, &e.broadcast)
+ stateSourceObject.Load(21, &e.noChecksum)
+ stateSourceObject.Load(23, &e.boundBindToDevice)
+ stateSourceObject.Load(24, &e.boundPortFlags)
+ stateSourceObject.Load(25, &e.sendTOS)
+ stateSourceObject.Load(26, &e.receiveTOS)
+ stateSourceObject.Load(27, &e.receiveTClass)
+ stateSourceObject.Load(28, &e.receiveIPPacketInfo)
+ stateSourceObject.Load(29, &e.shutdownFlags)
+ stateSourceObject.Load(30, &e.multicastMemberships)
+ stateSourceObject.Load(31, &e.effectiveNetProtos)
+ stateSourceObject.Load(32, &e.owner)
+ stateSourceObject.Load(33, &e.linger)
+ stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
+ stateSourceObject.LoadValue(22, new(string), func(y interface{}) { e.loadLastError(y.(string)) })
+ stateSourceObject.AfterLoad(e.afterLoad)
+}
+
+func (m *multicastMembership) StateTypeName() string {
return "pkg/tcpip/transport/udp.multicastMembership"
}
-func (x *multicastMembership) StateFields() []string {
+func (m *multicastMembership) StateFields() []string {
return []string{
"nicID",
"multicastAddr",
}
}
-func (x *multicastMembership) beforeSave() {}
+func (m *multicastMembership) beforeSave() {}
-func (x *multicastMembership) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.nicID)
- m.Save(1, &x.multicastAddr)
+func (m *multicastMembership) StateSave(stateSinkObject state.Sink) {
+ m.beforeSave()
+ stateSinkObject.Save(0, &m.nicID)
+ stateSinkObject.Save(1, &m.multicastAddr)
}
-func (x *multicastMembership) afterLoad() {}
+func (m *multicastMembership) afterLoad() {}
-func (x *multicastMembership) StateLoad(m state.Source) {
- m.Load(0, &x.nicID)
- m.Load(1, &x.multicastAddr)
+func (m *multicastMembership) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &m.nicID)
+ stateSourceObject.Load(1, &m.multicastAddr)
}
-func (x *udpPacketList) StateTypeName() string {
+func (u *udpPacketList) StateTypeName() string {
return "pkg/tcpip/transport/udp.udpPacketList"
}
-func (x *udpPacketList) StateFields() []string {
+func (u *udpPacketList) StateFields() []string {
return []string{
"head",
"tail",
}
}
-func (x *udpPacketList) beforeSave() {}
+func (u *udpPacketList) beforeSave() {}
-func (x *udpPacketList) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.head)
- m.Save(1, &x.tail)
+func (u *udpPacketList) StateSave(stateSinkObject state.Sink) {
+ u.beforeSave()
+ stateSinkObject.Save(0, &u.head)
+ stateSinkObject.Save(1, &u.tail)
}
-func (x *udpPacketList) afterLoad() {}
+func (u *udpPacketList) afterLoad() {}
-func (x *udpPacketList) StateLoad(m state.Source) {
- m.Load(0, &x.head)
- m.Load(1, &x.tail)
+func (u *udpPacketList) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &u.head)
+ stateSourceObject.Load(1, &u.tail)
}
-func (x *udpPacketEntry) StateTypeName() string {
+func (u *udpPacketEntry) StateTypeName() string {
return "pkg/tcpip/transport/udp.udpPacketEntry"
}
-func (x *udpPacketEntry) StateFields() []string {
+func (u *udpPacketEntry) StateFields() []string {
return []string{
"next",
"prev",
}
}
-func (x *udpPacketEntry) beforeSave() {}
+func (u *udpPacketEntry) beforeSave() {}
-func (x *udpPacketEntry) StateSave(m state.Sink) {
- x.beforeSave()
- m.Save(0, &x.next)
- m.Save(1, &x.prev)
+func (u *udpPacketEntry) StateSave(stateSinkObject state.Sink) {
+ u.beforeSave()
+ stateSinkObject.Save(0, &u.next)
+ stateSinkObject.Save(1, &u.prev)
}
-func (x *udpPacketEntry) afterLoad() {}
+func (u *udpPacketEntry) afterLoad() {}
-func (x *udpPacketEntry) StateLoad(m state.Source) {
- m.Load(0, &x.next)
- m.Load(1, &x.prev)
+func (u *udpPacketEntry) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &u.next)
+ stateSourceObject.Load(1, &u.prev)
}
func init() {