// automatically generated by stateify. package raw import ( "gvisor.dev/gvisor/pkg/state" "gvisor.dev/gvisor/pkg/tcpip/buffer" ) func (x *rawPacket) beforeSave() {} func (x *rawPacket) save(m state.Map) { x.beforeSave() var data buffer.VectorisedView = x.saveData() m.SaveValue("data", data) m.Save("rawPacketEntry", &x.rawPacketEntry) m.Save("timestampNS", &x.timestampNS) m.Save("senderAddr", &x.senderAddr) } func (x *rawPacket) afterLoad() {} func (x *rawPacket) load(m state.Map) { m.Load("rawPacketEntry", &x.rawPacketEntry) m.Load("timestampNS", &x.timestampNS) m.Load("senderAddr", &x.senderAddr) m.LoadValue("data", new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) } func (x *endpoint) save(m state.Map) { x.beforeSave() var rcvBufSizeMax int = x.saveRcvBufSizeMax() m.SaveValue("rcvBufSizeMax", rcvBufSizeMax) m.Save("TransportEndpointInfo", &x.TransportEndpointInfo) m.Save("waiterQueue", &x.waiterQueue) m.Save("associated", &x.associated) m.Save("rcvList", &x.rcvList) m.Save("rcvBufSize", &x.rcvBufSize) m.Save("rcvClosed", &x.rcvClosed) m.Save("sndBufSize", &x.sndBufSize) m.Save("closed", &x.closed) m.Save("connected", &x.connected) m.Save("bound", &x.bound) } func (x *endpoint) load(m state.Map) { m.Load("TransportEndpointInfo", &x.TransportEndpointInfo) m.Load("waiterQueue", &x.waiterQueue) m.Load("associated", &x.associated) m.Load("rcvList", &x.rcvList) m.Load("rcvBufSize", &x.rcvBufSize) m.Load("rcvClosed", &x.rcvClosed) m.Load("sndBufSize", &x.sndBufSize) m.Load("closed", &x.closed) m.Load("connected", &x.connected) m.Load("bound", &x.bound) m.LoadValue("rcvBufSizeMax", new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) }) m.AfterLoad(x.afterLoad) } func (x *rawPacketList) beforeSave() {} func (x *rawPacketList) save(m state.Map) { x.beforeSave() m.Save("head", &x.head) m.Save("tail", &x.tail) } func (x *rawPacketList) afterLoad() {} func (x *rawPacketList) load(m state.Map) { m.Load("head", &x.head) m.Load("tail", &x.tail) } func (x *rawPacketEntry) beforeSave() {} func (x *rawPacketEntry) save(m state.Map) { x.beforeSave() m.Save("next", &x.next) m.Save("prev", &x.prev) } func (x *rawPacketEntry) afterLoad() {} func (x *rawPacketEntry) load(m state.Map) { m.Load("next", &x.next) m.Load("prev", &x.prev) } func init() { state.Register("pkg/tcpip/transport/raw.rawPacket", (*rawPacket)(nil), state.Fns{Save: (*rawPacket).save, Load: (*rawPacket).load}) state.Register("pkg/tcpip/transport/raw.endpoint", (*endpoint)(nil), state.Fns{Save: (*endpoint).save, Load: (*endpoint).load}) state.Register("pkg/tcpip/transport/raw.rawPacketList", (*rawPacketList)(nil), state.Fns{Save: (*rawPacketList).save, Load: (*rawPacketList).load}) state.Register("pkg/tcpip/transport/raw.rawPacketEntry", (*rawPacketEntry)(nil), state.Fns{Save: (*rawPacketEntry).save, Load: (*rawPacketEntry).load}) }