github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/socket/socket_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package socket 4 5 import ( 6 "github.com/nicocha30/gvisor-ligolo/pkg/state" 7 ) 8 9 func (i *IPControlMessages) StateTypeName() string { 10 return "pkg/sentry/socket.IPControlMessages" 11 } 12 13 func (i *IPControlMessages) StateFields() []string { 14 return []string{ 15 "HasTimestamp", 16 "Timestamp", 17 "HasInq", 18 "Inq", 19 "HasTOS", 20 "TOS", 21 "HasTTL", 22 "TTL", 23 "HasHopLimit", 24 "HopLimit", 25 "HasTClass", 26 "TClass", 27 "HasIPPacketInfo", 28 "PacketInfo", 29 "HasIPv6PacketInfo", 30 "IPv6PacketInfo", 31 "OriginalDstAddress", 32 "SockErr", 33 } 34 } 35 36 func (i *IPControlMessages) beforeSave() {} 37 38 // +checklocksignore 39 func (i *IPControlMessages) StateSave(stateSinkObject state.Sink) { 40 i.beforeSave() 41 var TimestampValue int64 42 TimestampValue = i.saveTimestamp() 43 stateSinkObject.SaveValue(1, TimestampValue) 44 stateSinkObject.Save(0, &i.HasTimestamp) 45 stateSinkObject.Save(2, &i.HasInq) 46 stateSinkObject.Save(3, &i.Inq) 47 stateSinkObject.Save(4, &i.HasTOS) 48 stateSinkObject.Save(5, &i.TOS) 49 stateSinkObject.Save(6, &i.HasTTL) 50 stateSinkObject.Save(7, &i.TTL) 51 stateSinkObject.Save(8, &i.HasHopLimit) 52 stateSinkObject.Save(9, &i.HopLimit) 53 stateSinkObject.Save(10, &i.HasTClass) 54 stateSinkObject.Save(11, &i.TClass) 55 stateSinkObject.Save(12, &i.HasIPPacketInfo) 56 stateSinkObject.Save(13, &i.PacketInfo) 57 stateSinkObject.Save(14, &i.HasIPv6PacketInfo) 58 stateSinkObject.Save(15, &i.IPv6PacketInfo) 59 stateSinkObject.Save(16, &i.OriginalDstAddress) 60 stateSinkObject.Save(17, &i.SockErr) 61 } 62 63 func (i *IPControlMessages) afterLoad() {} 64 65 // +checklocksignore 66 func (i *IPControlMessages) StateLoad(stateSourceObject state.Source) { 67 stateSourceObject.Load(0, &i.HasTimestamp) 68 stateSourceObject.Load(2, &i.HasInq) 69 stateSourceObject.Load(3, &i.Inq) 70 stateSourceObject.Load(4, &i.HasTOS) 71 stateSourceObject.Load(5, &i.TOS) 72 stateSourceObject.Load(6, &i.HasTTL) 73 stateSourceObject.Load(7, &i.TTL) 74 stateSourceObject.Load(8, &i.HasHopLimit) 75 stateSourceObject.Load(9, &i.HopLimit) 76 stateSourceObject.Load(10, &i.HasTClass) 77 stateSourceObject.Load(11, &i.TClass) 78 stateSourceObject.Load(12, &i.HasIPPacketInfo) 79 stateSourceObject.Load(13, &i.PacketInfo) 80 stateSourceObject.Load(14, &i.HasIPv6PacketInfo) 81 stateSourceObject.Load(15, &i.IPv6PacketInfo) 82 stateSourceObject.Load(16, &i.OriginalDstAddress) 83 stateSourceObject.Load(17, &i.SockErr) 84 stateSourceObject.LoadValue(1, new(int64), func(y any) { i.loadTimestamp(y.(int64)) }) 85 } 86 87 func (to *SendReceiveTimeout) StateTypeName() string { 88 return "pkg/sentry/socket.SendReceiveTimeout" 89 } 90 91 func (to *SendReceiveTimeout) StateFields() []string { 92 return []string{ 93 "send", 94 "recv", 95 } 96 } 97 98 func (to *SendReceiveTimeout) beforeSave() {} 99 100 // +checklocksignore 101 func (to *SendReceiveTimeout) StateSave(stateSinkObject state.Sink) { 102 to.beforeSave() 103 stateSinkObject.Save(0, &to.send) 104 stateSinkObject.Save(1, &to.recv) 105 } 106 107 func (to *SendReceiveTimeout) afterLoad() {} 108 109 // +checklocksignore 110 func (to *SendReceiveTimeout) StateLoad(stateSourceObject state.Source) { 111 stateSourceObject.Load(0, &to.send) 112 stateSourceObject.Load(1, &to.recv) 113 } 114 115 func init() { 116 state.Register((*IPControlMessages)(nil)) 117 state.Register((*SendReceiveTimeout)(nil)) 118 }