github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/tcpip/header/header_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package header 4 5 import ( 6 "github.com/ttpreport/gvisor-ligolo/pkg/state" 7 ) 8 9 func (t *TCPSynOptions) StateTypeName() string { 10 return "pkg/tcpip/header.TCPSynOptions" 11 } 12 13 func (t *TCPSynOptions) StateFields() []string { 14 return []string{ 15 "MSS", 16 "WS", 17 "TS", 18 "TSVal", 19 "TSEcr", 20 "SACKPermitted", 21 "Flags", 22 } 23 } 24 25 func (t *TCPSynOptions) beforeSave() {} 26 27 // +checklocksignore 28 func (t *TCPSynOptions) StateSave(stateSinkObject state.Sink) { 29 t.beforeSave() 30 stateSinkObject.Save(0, &t.MSS) 31 stateSinkObject.Save(1, &t.WS) 32 stateSinkObject.Save(2, &t.TS) 33 stateSinkObject.Save(3, &t.TSVal) 34 stateSinkObject.Save(4, &t.TSEcr) 35 stateSinkObject.Save(5, &t.SACKPermitted) 36 stateSinkObject.Save(6, &t.Flags) 37 } 38 39 func (t *TCPSynOptions) afterLoad() {} 40 41 // +checklocksignore 42 func (t *TCPSynOptions) StateLoad(stateSourceObject state.Source) { 43 stateSourceObject.Load(0, &t.MSS) 44 stateSourceObject.Load(1, &t.WS) 45 stateSourceObject.Load(2, &t.TS) 46 stateSourceObject.Load(3, &t.TSVal) 47 stateSourceObject.Load(4, &t.TSEcr) 48 stateSourceObject.Load(5, &t.SACKPermitted) 49 stateSourceObject.Load(6, &t.Flags) 50 } 51 52 func (r *SACKBlock) StateTypeName() string { 53 return "pkg/tcpip/header.SACKBlock" 54 } 55 56 func (r *SACKBlock) StateFields() []string { 57 return []string{ 58 "Start", 59 "End", 60 } 61 } 62 63 func (r *SACKBlock) beforeSave() {} 64 65 // +checklocksignore 66 func (r *SACKBlock) StateSave(stateSinkObject state.Sink) { 67 r.beforeSave() 68 stateSinkObject.Save(0, &r.Start) 69 stateSinkObject.Save(1, &r.End) 70 } 71 72 func (r *SACKBlock) afterLoad() {} 73 74 // +checklocksignore 75 func (r *SACKBlock) StateLoad(stateSourceObject state.Source) { 76 stateSourceObject.Load(0, &r.Start) 77 stateSourceObject.Load(1, &r.End) 78 } 79 80 func (t *TCPOptions) StateTypeName() string { 81 return "pkg/tcpip/header.TCPOptions" 82 } 83 84 func (t *TCPOptions) StateFields() []string { 85 return []string{ 86 "TS", 87 "TSVal", 88 "TSEcr", 89 "SACKBlocks", 90 } 91 } 92 93 func (t *TCPOptions) beforeSave() {} 94 95 // +checklocksignore 96 func (t *TCPOptions) StateSave(stateSinkObject state.Sink) { 97 t.beforeSave() 98 stateSinkObject.Save(0, &t.TS) 99 stateSinkObject.Save(1, &t.TSVal) 100 stateSinkObject.Save(2, &t.TSEcr) 101 stateSinkObject.Save(3, &t.SACKBlocks) 102 } 103 104 func (t *TCPOptions) afterLoad() {} 105 106 // +checklocksignore 107 func (t *TCPOptions) StateLoad(stateSourceObject state.Source) { 108 stateSourceObject.Load(0, &t.TS) 109 stateSourceObject.Load(1, &t.TSVal) 110 stateSourceObject.Load(2, &t.TSEcr) 111 stateSourceObject.Load(3, &t.SACKBlocks) 112 } 113 114 func init() { 115 state.Register((*TCPSynOptions)(nil)) 116 state.Register((*SACKBlock)(nil)) 117 state.Register((*TCPOptions)(nil)) 118 }