github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/tcpip/network/internal/fragmentation/fragmentation_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package fragmentation 4 5 import ( 6 "context" 7 8 "github.com/metacubex/gvisor/pkg/state" 9 ) 10 11 func (l *reassemblerList) StateTypeName() string { 12 return "pkg/tcpip/network/internal/fragmentation.reassemblerList" 13 } 14 15 func (l *reassemblerList) StateFields() []string { 16 return []string{ 17 "head", 18 "tail", 19 } 20 } 21 22 func (l *reassemblerList) beforeSave() {} 23 24 // +checklocksignore 25 func (l *reassemblerList) StateSave(stateSinkObject state.Sink) { 26 l.beforeSave() 27 stateSinkObject.Save(0, &l.head) 28 stateSinkObject.Save(1, &l.tail) 29 } 30 31 func (l *reassemblerList) afterLoad(context.Context) {} 32 33 // +checklocksignore 34 func (l *reassemblerList) StateLoad(ctx context.Context, stateSourceObject state.Source) { 35 stateSourceObject.Load(0, &l.head) 36 stateSourceObject.Load(1, &l.tail) 37 } 38 39 func (e *reassemblerEntry) StateTypeName() string { 40 return "pkg/tcpip/network/internal/fragmentation.reassemblerEntry" 41 } 42 43 func (e *reassemblerEntry) StateFields() []string { 44 return []string{ 45 "next", 46 "prev", 47 } 48 } 49 50 func (e *reassemblerEntry) beforeSave() {} 51 52 // +checklocksignore 53 func (e *reassemblerEntry) StateSave(stateSinkObject state.Sink) { 54 e.beforeSave() 55 stateSinkObject.Save(0, &e.next) 56 stateSinkObject.Save(1, &e.prev) 57 } 58 59 func (e *reassemblerEntry) afterLoad(context.Context) {} 60 61 // +checklocksignore 62 func (e *reassemblerEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) { 63 stateSourceObject.Load(0, &e.next) 64 stateSourceObject.Load(1, &e.prev) 65 } 66 67 func init() { 68 state.Register((*reassemblerList)(nil)) 69 state.Register((*reassemblerEntry)(nil)) 70 }