inet.af/netstack@v0.0.0-20220214151720-7585b01ddccf/tcpip/header/header_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package header 4 5 import ( 6 "inet.af/netstack/state" 7 ) 8 9 func (r *SACKBlock) StateTypeName() string { 10 return "pkg/tcpip/header.SACKBlock" 11 } 12 13 func (r *SACKBlock) StateFields() []string { 14 return []string{ 15 "Start", 16 "End", 17 } 18 } 19 20 func (r *SACKBlock) beforeSave() {} 21 22 // +checklocksignore 23 func (r *SACKBlock) StateSave(stateSinkObject state.Sink) { 24 r.beforeSave() 25 stateSinkObject.Save(0, &r.Start) 26 stateSinkObject.Save(1, &r.End) 27 } 28 29 func (r *SACKBlock) afterLoad() {} 30 31 // +checklocksignore 32 func (r *SACKBlock) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.Load(0, &r.Start) 34 stateSourceObject.Load(1, &r.End) 35 } 36 37 func (t *TCPOptions) StateTypeName() string { 38 return "pkg/tcpip/header.TCPOptions" 39 } 40 41 func (t *TCPOptions) StateFields() []string { 42 return []string{ 43 "TS", 44 "TSVal", 45 "TSEcr", 46 "SACKBlocks", 47 } 48 } 49 50 func (t *TCPOptions) beforeSave() {} 51 52 // +checklocksignore 53 func (t *TCPOptions) StateSave(stateSinkObject state.Sink) { 54 t.beforeSave() 55 stateSinkObject.Save(0, &t.TS) 56 stateSinkObject.Save(1, &t.TSVal) 57 stateSinkObject.Save(2, &t.TSEcr) 58 stateSinkObject.Save(3, &t.SACKBlocks) 59 } 60 61 func (t *TCPOptions) afterLoad() {} 62 63 // +checklocksignore 64 func (t *TCPOptions) StateLoad(stateSourceObject state.Source) { 65 stateSourceObject.Load(0, &t.TS) 66 stateSourceObject.Load(1, &t.TSVal) 67 stateSourceObject.Load(2, &t.TSEcr) 68 stateSourceObject.Load(3, &t.SACKBlocks) 69 } 70 71 func init() { 72 state.Register((*SACKBlock)(nil)) 73 state.Register((*TCPOptions)(nil)) 74 }