// automatically generated by stateify. package stack import ( "gvisor.dev/gvisor/pkg/state" ) func (t *tuple) StateTypeName() string { return "pkg/tcpip/stack.tuple" } func (t *tuple) StateFields() []string { return []string{ "tupleEntry", "tupleID", "conn", "direction", } } func (t *tuple) beforeSave() {} 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 (t *tuple) afterLoad() {} 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 (ti *tupleID) StateTypeName() string { return "pkg/tcpip/stack.tupleID" } func (ti *tupleID) StateFields() []string { return []string{ "srcAddr", "srcPort", "dstAddr", "dstPort", "transProto", "netProto", } } func (ti *tupleID) beforeSave() {} func (ti *tupleID) StateSave(stateSinkObject state.Sink) { ti.beforeSave() stateSinkObject.Save(0, &ti.srcAddr) stateSinkObject.Save(1, &ti.srcPort) stateSinkObject.Save(2, &ti.dstAddr) stateSinkObject.Save(3, &ti.dstPort) stateSinkObject.Save(4, &ti.transProto) stateSinkObject.Save(5, &ti.netProto) } func (ti *tupleID) afterLoad() {} func (ti *tupleID) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ti.srcAddr) stateSourceObject.Load(1, &ti.srcPort) stateSourceObject.Load(2, &ti.dstAddr) stateSourceObject.Load(3, &ti.dstPort) stateSourceObject.Load(4, &ti.transProto) stateSourceObject.Load(5, &ti.netProto) } func (cn *conn) StateTypeName() string { return "pkg/tcpip/stack.conn" } func (cn *conn) StateFields() []string { return []string{ "original", "reply", "manip", "tcbHook", "tcb", "lastUsed", } } func (cn *conn) beforeSave() {} func (cn *conn) StateSave(stateSinkObject state.Sink) { cn.beforeSave() var lastUsedValue unixTime = cn.saveLastUsed() stateSinkObject.SaveValue(5, lastUsedValue) stateSinkObject.Save(0, &cn.original) stateSinkObject.Save(1, &cn.reply) stateSinkObject.Save(2, &cn.manip) stateSinkObject.Save(3, &cn.tcbHook) stateSinkObject.Save(4, &cn.tcb) } func (cn *conn) afterLoad() {} func (cn *conn) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &cn.original) stateSourceObject.Load(1, &cn.reply) stateSourceObject.Load(2, &cn.manip) stateSourceObject.Load(3, &cn.tcbHook) stateSourceObject.Load(4, &cn.tcb) stateSourceObject.LoadValue(5, new(unixTime), func(y interface{}) { cn.loadLastUsed(y.(unixTime)) }) } func (ct *ConnTrack) StateTypeName() string { return "pkg/tcpip/stack.ConnTrack" } func (ct *ConnTrack) StateFields() []string { return []string{ "seed", "buckets", } } func (ct *ConnTrack) StateSave(stateSinkObject state.Sink) { ct.beforeSave() stateSinkObject.Save(0, &ct.seed) stateSinkObject.Save(1, &ct.buckets) } func (ct *ConnTrack) afterLoad() {} func (ct *ConnTrack) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ct.seed) stateSourceObject.Load(1, &ct.buckets) } func (b *bucket) StateTypeName() string { return "pkg/tcpip/stack.bucket" } func (b *bucket) StateFields() []string { return []string{ "tuples", } } func (b *bucket) beforeSave() {} func (b *bucket) StateSave(stateSinkObject state.Sink) { b.beforeSave() stateSinkObject.Save(0, &b.tuples) } func (b *bucket) afterLoad() {} func (b *bucket) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &b.tuples) } func (u *unixTime) StateTypeName() string { return "pkg/tcpip/stack.unixTime" } func (u *unixTime) StateFields() []string { return []string{ "second", "nano", } } func (u *unixTime) beforeSave() {} func (u *unixTime) StateSave(stateSinkObject state.Sink) { u.beforeSave() stateSinkObject.Save(0, &u.second) stateSinkObject.Save(1, &u.nano) } func (u *unixTime) afterLoad() {} func (u *unixTime) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &u.second) stateSourceObject.Load(1, &u.nano) } func (it *IPTables) StateTypeName() string { return "pkg/tcpip/stack.IPTables" } func (it *IPTables) StateFields() []string { return []string{ "mu", "v4Tables", "v6Tables", "modified", "priorities", "connections", "reaperDone", } } func (it *IPTables) StateSave(stateSinkObject state.Sink) { it.beforeSave() stateSinkObject.Save(0, &it.mu) stateSinkObject.Save(1, &it.v4Tables) stateSinkObject.Save(2, &it.v6Tables) stateSinkObject.Save(3, &it.modified) stateSinkObject.Save(4, &it.priorities) stateSinkObject.Save(5, &it.connections) stateSinkObject.Save(6, &it.reaperDone) } func (it *IPTables) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &it.mu) stateSourceObject.Load(1, &it.v4Tables) stateSourceObject.Load(2, &it.v6Tables) stateSourceObject.Load(3, &it.modified) stateSourceObject.Load(4, &it.priorities) stateSourceObject.Load(5, &it.connections) stateSourceObject.Load(6, &it.reaperDone) stateSourceObject.AfterLoad(it.afterLoad) } func (table *Table) StateTypeName() string { return "pkg/tcpip/stack.Table" } func (table *Table) StateFields() []string { return []string{ "Rules", "BuiltinChains", "Underflows", } } func (table *Table) beforeSave() {} func (table *Table) StateSave(stateSinkObject state.Sink) { table.beforeSave() stateSinkObject.Save(0, &table.Rules) stateSinkObject.Save(1, &table.BuiltinChains) stateSinkObject.Save(2, &table.Underflows) } func (table *Table) afterLoad() {} func (table *Table) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &table.Rules) stateSourceObject.Load(1, &table.BuiltinChains) stateSourceObject.Load(2, &table.Underflows) } func (r *Rule) StateTypeName() string { return "pkg/tcpip/stack.Rule" } func (r *Rule) StateFields() []string { return []string{ "Filter", "Matchers", "Target", } } func (r *Rule) beforeSave() {} 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 (r *Rule) afterLoad() {} func (r *Rule) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.Filter) stateSourceObject.Load(1, &r.Matchers) stateSourceObject.Load(2, &r.Target) } func (fl *IPHeaderFilter) StateTypeName() string { return "pkg/tcpip/stack.IPHeaderFilter" } func (fl *IPHeaderFilter) StateFields() []string { return []string{ "Protocol", "CheckProtocol", "Dst", "DstMask", "DstInvert", "Src", "SrcMask", "SrcInvert", "InputInterface", "InputInterfaceMask", "InputInterfaceInvert", "OutputInterface", "OutputInterfaceMask", "OutputInterfaceInvert", } } func (fl *IPHeaderFilter) beforeSave() {} func (fl *IPHeaderFilter) StateSave(stateSinkObject state.Sink) { fl.beforeSave() stateSinkObject.Save(0, &fl.Protocol) stateSinkObject.Save(1, &fl.CheckProtocol) stateSinkObject.Save(2, &fl.Dst) stateSinkObject.Save(3, &fl.DstMask) stateSinkObject.Save(4, &fl.DstInvert) stateSinkObject.Save(5, &fl.Src) stateSinkObject.Save(6, &fl.SrcMask) stateSinkObject.Save(7, &fl.SrcInvert) stateSinkObject.Save(8, &fl.InputInterface) stateSinkObject.Save(9, &fl.InputInterfaceMask) stateSinkObject.Save(10, &fl.InputInterfaceInvert) stateSinkObject.Save(11, &fl.OutputInterface) stateSinkObject.Save(12, &fl.OutputInterfaceMask) stateSinkObject.Save(13, &fl.OutputInterfaceInvert) } func (fl *IPHeaderFilter) afterLoad() {} func (fl *IPHeaderFilter) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &fl.Protocol) stateSourceObject.Load(1, &fl.CheckProtocol) stateSourceObject.Load(2, &fl.Dst) stateSourceObject.Load(3, &fl.DstMask) stateSourceObject.Load(4, &fl.DstInvert) stateSourceObject.Load(5, &fl.Src) stateSourceObject.Load(6, &fl.SrcMask) stateSourceObject.Load(7, &fl.SrcInvert) stateSourceObject.Load(8, &fl.InputInterface) stateSourceObject.Load(9, &fl.InputInterfaceMask) stateSourceObject.Load(10, &fl.InputInterfaceInvert) stateSourceObject.Load(11, &fl.OutputInterface) stateSourceObject.Load(12, &fl.OutputInterfaceMask) stateSourceObject.Load(13, &fl.OutputInterfaceInvert) } func (l *linkAddrEntryList) StateTypeName() string { return "pkg/tcpip/stack.linkAddrEntryList" } func (l *linkAddrEntryList) StateFields() []string { return []string{ "head", "tail", } } func (l *linkAddrEntryList) beforeSave() {} func (l *linkAddrEntryList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *linkAddrEntryList) afterLoad() {} func (l *linkAddrEntryList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *linkAddrEntryEntry) StateTypeName() string { return "pkg/tcpip/stack.linkAddrEntryEntry" } func (e *linkAddrEntryEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *linkAddrEntryEntry) beforeSave() {} func (e *linkAddrEntryEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *linkAddrEntryEntry) afterLoad() {} func (e *linkAddrEntryEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (l *neighborEntryList) StateTypeName() string { return "pkg/tcpip/stack.neighborEntryList" } func (l *neighborEntryList) StateFields() []string { return []string{ "head", "tail", } } func (l *neighborEntryList) beforeSave() {} func (l *neighborEntryList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *neighborEntryList) afterLoad() {} func (l *neighborEntryList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *neighborEntryEntry) StateTypeName() string { return "pkg/tcpip/stack.neighborEntryEntry" } func (e *neighborEntryEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *neighborEntryEntry) beforeSave() {} func (e *neighborEntryEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *neighborEntryEntry) afterLoad() {} func (e *neighborEntryEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (p *PacketBufferList) StateTypeName() string { return "pkg/tcpip/stack.PacketBufferList" } func (p *PacketBufferList) StateFields() []string { return []string{ "head", "tail", } } func (p *PacketBufferList) beforeSave() {} func (p *PacketBufferList) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.head) stateSinkObject.Save(1, &p.tail) } func (p *PacketBufferList) afterLoad() {} func (p *PacketBufferList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.head) stateSourceObject.Load(1, &p.tail) } func (e *PacketBufferEntry) StateTypeName() string { return "pkg/tcpip/stack.PacketBufferEntry" } func (e *PacketBufferEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *PacketBufferEntry) beforeSave() {} func (e *PacketBufferEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *PacketBufferEntry) afterLoad() {} func (e *PacketBufferEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (t *TransportEndpointID) StateTypeName() string { return "pkg/tcpip/stack.TransportEndpointID" } func (t *TransportEndpointID) StateFields() []string { return []string{ "LocalPort", "LocalAddress", "RemotePort", "RemoteAddress", } } func (t *TransportEndpointID) beforeSave() {} 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 (t *TransportEndpointID) afterLoad() {} 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 (g *GSOType) StateTypeName() string { return "pkg/tcpip/stack.GSOType" } func (g *GSOType) StateFields() []string { return nil } func (g *GSO) StateTypeName() string { return "pkg/tcpip/stack.GSO" } func (g *GSO) StateFields() []string { return []string{ "Type", "NeedsCsum", "CsumOffset", "MSS", "L3HdrLen", "MaxSize", } } func (g *GSO) beforeSave() {} 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 (g *GSO) afterLoad() {} 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 (t *TransportEndpointInfo) StateTypeName() string { return "pkg/tcpip/stack.TransportEndpointInfo" } func (t *TransportEndpointInfo) StateFields() []string { return []string{ "NetProto", "TransProto", "ID", "BindNICID", "BindAddr", "RegisterNICID", } } func (t *TransportEndpointInfo) beforeSave() {} 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 (t *TransportEndpointInfo) afterLoad() {} 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 (ep *multiPortEndpoint) StateTypeName() string { return "pkg/tcpip/stack.multiPortEndpoint" } func (ep *multiPortEndpoint) StateFields() []string { return []string{ "demux", "netProto", "transProto", "endpoints", "flags", } } func (ep *multiPortEndpoint) beforeSave() {} func (ep *multiPortEndpoint) StateSave(stateSinkObject state.Sink) { ep.beforeSave() stateSinkObject.Save(0, &ep.demux) stateSinkObject.Save(1, &ep.netProto) stateSinkObject.Save(2, &ep.transProto) stateSinkObject.Save(3, &ep.endpoints) stateSinkObject.Save(4, &ep.flags) } func (ep *multiPortEndpoint) afterLoad() {} func (ep *multiPortEndpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ep.demux) stateSourceObject.Load(1, &ep.netProto) stateSourceObject.Load(2, &ep.transProto) stateSourceObject.Load(3, &ep.endpoints) stateSourceObject.Load(4, &ep.flags) } func (l *tupleList) StateTypeName() string { return "pkg/tcpip/stack.tupleList" } func (l *tupleList) StateFields() []string { return []string{ "head", "tail", } } func (l *tupleList) beforeSave() {} func (l *tupleList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *tupleList) afterLoad() {} func (l *tupleList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *tupleEntry) StateTypeName() string { return "pkg/tcpip/stack.tupleEntry" } func (e *tupleEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *tupleEntry) beforeSave() {} func (e *tupleEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *tupleEntry) afterLoad() {} func (e *tupleEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func init() { state.Register((*tuple)(nil)) state.Register((*tupleID)(nil)) state.Register((*conn)(nil)) state.Register((*ConnTrack)(nil)) state.Register((*bucket)(nil)) state.Register((*unixTime)(nil)) state.Register((*IPTables)(nil)) state.Register((*Table)(nil)) state.Register((*Rule)(nil)) state.Register((*IPHeaderFilter)(nil)) state.Register((*linkAddrEntryList)(nil)) state.Register((*linkAddrEntryEntry)(nil)) state.Register((*neighborEntryList)(nil)) state.Register((*neighborEntryEntry)(nil)) state.Register((*PacketBufferList)(nil)) state.Register((*PacketBufferEntry)(nil)) state.Register((*TransportEndpointID)(nil)) state.Register((*GSOType)(nil)) state.Register((*GSO)(nil)) state.Register((*TransportEndpointInfo)(nil)) state.Register((*multiPortEndpoint)(nil)) state.Register((*tupleList)(nil)) state.Register((*tupleEntry)(nil)) }