inet.af/netstack@v0.0.0-20220214151720-7585b01ddccf/tcpip/transport/internal/network/network_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package network 4 5 import ( 6 "inet.af/netstack/state" 7 ) 8 9 func (e *Endpoint) StateTypeName() string { 10 return "pkg/tcpip/transport/internal/network.Endpoint" 11 } 12 13 func (e *Endpoint) StateFields() []string { 14 return []string{ 15 "ops", 16 "netProto", 17 "transProto", 18 "wasBound", 19 "owner", 20 "writeShutdown", 21 "effectiveNetProto", 22 "multicastMemberships", 23 "ttl", 24 "multicastTTL", 25 "multicastAddr", 26 "multicastNICID", 27 "ipv4TOS", 28 "ipv6TClass", 29 "info", 30 "state", 31 } 32 } 33 34 func (e *Endpoint) beforeSave() {} 35 36 // +checklocksignore 37 func (e *Endpoint) StateSave(stateSinkObject state.Sink) { 38 e.beforeSave() 39 stateSinkObject.Save(0, &e.ops) 40 stateSinkObject.Save(1, &e.netProto) 41 stateSinkObject.Save(2, &e.transProto) 42 stateSinkObject.Save(3, &e.wasBound) 43 stateSinkObject.Save(4, &e.owner) 44 stateSinkObject.Save(5, &e.writeShutdown) 45 stateSinkObject.Save(6, &e.effectiveNetProto) 46 stateSinkObject.Save(7, &e.multicastMemberships) 47 stateSinkObject.Save(8, &e.ttl) 48 stateSinkObject.Save(9, &e.multicastTTL) 49 stateSinkObject.Save(10, &e.multicastAddr) 50 stateSinkObject.Save(11, &e.multicastNICID) 51 stateSinkObject.Save(12, &e.ipv4TOS) 52 stateSinkObject.Save(13, &e.ipv6TClass) 53 stateSinkObject.Save(14, &e.info) 54 stateSinkObject.Save(15, &e.state) 55 } 56 57 func (e *Endpoint) afterLoad() {} 58 59 // +checklocksignore 60 func (e *Endpoint) StateLoad(stateSourceObject state.Source) { 61 stateSourceObject.Load(0, &e.ops) 62 stateSourceObject.Load(1, &e.netProto) 63 stateSourceObject.Load(2, &e.transProto) 64 stateSourceObject.Load(3, &e.wasBound) 65 stateSourceObject.Load(4, &e.owner) 66 stateSourceObject.Load(5, &e.writeShutdown) 67 stateSourceObject.Load(6, &e.effectiveNetProto) 68 stateSourceObject.Load(7, &e.multicastMemberships) 69 stateSourceObject.Load(8, &e.ttl) 70 stateSourceObject.Load(9, &e.multicastTTL) 71 stateSourceObject.Load(10, &e.multicastAddr) 72 stateSourceObject.Load(11, &e.multicastNICID) 73 stateSourceObject.Load(12, &e.ipv4TOS) 74 stateSourceObject.Load(13, &e.ipv6TClass) 75 stateSourceObject.Load(14, &e.info) 76 stateSourceObject.Load(15, &e.state) 77 } 78 79 func (m *multicastMembership) StateTypeName() string { 80 return "pkg/tcpip/transport/internal/network.multicastMembership" 81 } 82 83 func (m *multicastMembership) StateFields() []string { 84 return []string{ 85 "nicID", 86 "multicastAddr", 87 } 88 } 89 90 func (m *multicastMembership) beforeSave() {} 91 92 // +checklocksignore 93 func (m *multicastMembership) StateSave(stateSinkObject state.Sink) { 94 m.beforeSave() 95 stateSinkObject.Save(0, &m.nicID) 96 stateSinkObject.Save(1, &m.multicastAddr) 97 } 98 99 func (m *multicastMembership) afterLoad() {} 100 101 // +checklocksignore 102 func (m *multicastMembership) StateLoad(stateSourceObject state.Source) { 103 stateSourceObject.Load(0, &m.nicID) 104 stateSourceObject.Load(1, &m.multicastAddr) 105 } 106 107 func init() { 108 state.Register((*Endpoint)(nil)) 109 state.Register((*multicastMembership)(nil)) 110 }