github.com/noisysockets/netstack@v0.6.0/pkg/tcpip/stack/gro/gro_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package gro 4 5 import ( 6 "context" 7 8 "github.com/noisysockets/netstack/pkg/state" 9 ) 10 11 func (l *groPacketList) StateTypeName() string { 12 return "pkg/tcpip/stack/gro.groPacketList" 13 } 14 15 func (l *groPacketList) StateFields() []string { 16 return []string{ 17 "head", 18 "tail", 19 } 20 } 21 22 func (l *groPacketList) beforeSave() {} 23 24 // +checklocksignore 25 func (l *groPacketList) StateSave(stateSinkObject state.Sink) { 26 l.beforeSave() 27 stateSinkObject.Save(0, &l.head) 28 stateSinkObject.Save(1, &l.tail) 29 } 30 31 func (l *groPacketList) afterLoad(context.Context) {} 32 33 // +checklocksignore 34 func (l *groPacketList) StateLoad(ctx context.Context, stateSourceObject state.Source) { 35 stateSourceObject.Load(0, &l.head) 36 stateSourceObject.Load(1, &l.tail) 37 } 38 39 func (e *groPacketEntry) StateTypeName() string { 40 return "pkg/tcpip/stack/gro.groPacketEntry" 41 } 42 43 func (e *groPacketEntry) StateFields() []string { 44 return []string{ 45 "next", 46 "prev", 47 } 48 } 49 50 func (e *groPacketEntry) beforeSave() {} 51 52 // +checklocksignore 53 func (e *groPacketEntry) StateSave(stateSinkObject state.Sink) { 54 e.beforeSave() 55 stateSinkObject.Save(0, &e.next) 56 stateSinkObject.Save(1, &e.prev) 57 } 58 59 func (e *groPacketEntry) afterLoad(context.Context) {} 60 61 // +checklocksignore 62 func (e *groPacketEntry) 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((*groPacketList)(nil)) 69 state.Register((*groPacketEntry)(nil)) 70 }