diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-11 18:40:22 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-11 18:40:22 +0000 |
commit | e643a3498e5e1f80410cb4eaeb3d1b335095074e (patch) | |
tree | 6a7e5876cf8a6550b95892a3fb3c98d3abbe6067 /pkg/abi | |
parent | d85e8f86be2fcd18b198b8ac65a61200c0f92317 (diff) | |
parent | af4afdc0e0482fd6f4d6d8da77df30527b75e421 (diff) |
Merge release-20201208.0-28-gaf4afdc0e (automated)
Diffstat (limited to 'pkg/abi')
-rw-r--r-- | pkg/abi/linux/linux_state_autogen.go | 30 | ||||
-rw-r--r-- | pkg/abi/linux/socket.go | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/pkg/abi/linux/linux_state_autogen.go b/pkg/abi/linux/linux_state_autogen.go index 9f49af7ff..3791000da 100644 --- a/pkg/abi/linux/linux_state_autogen.go +++ b/pkg/abi/linux/linux_state_autogen.go @@ -70,6 +70,35 @@ func (b *BPFInstruction) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(3, &b.K) } +func (c *ControlMessageIPPacketInfo) StateTypeName() string { + return "pkg/abi/linux.ControlMessageIPPacketInfo" +} + +func (c *ControlMessageIPPacketInfo) StateFields() []string { + return []string{ + "NIC", + "LocalAddr", + "DestinationAddr", + } +} + +func (c *ControlMessageIPPacketInfo) beforeSave() {} + +func (c *ControlMessageIPPacketInfo) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.NIC) + stateSinkObject.Save(1, &c.LocalAddr) + stateSinkObject.Save(2, &c.DestinationAddr) +} + +func (c *ControlMessageIPPacketInfo) afterLoad() {} + +func (c *ControlMessageIPPacketInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.NIC) + stateSourceObject.Load(1, &c.LocalAddr) + stateSourceObject.Load(2, &c.DestinationAddr) +} + func (t *KernelTermios) StateTypeName() string { return "pkg/abi/linux.KernelTermios" } @@ -143,6 +172,7 @@ func (w *WindowSize) StateLoad(stateSourceObject state.Source) { func init() { state.Register((*IOEvent)(nil)) state.Register((*BPFInstruction)(nil)) + state.Register((*ControlMessageIPPacketInfo)(nil)) state.Register((*KernelTermios)(nil)) state.Register((*WindowSize)(nil)) } diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go index d156d41e4..732297f9c 100644 --- a/pkg/abi/linux/socket.go +++ b/pkg/abi/linux/socket.go @@ -448,6 +448,8 @@ type ControlMessageCredentials struct { // A ControlMessageIPPacketInfo is IP_PKTINFO socket control message. // // ControlMessageIPPacketInfo represents struct in_pktinfo from linux/in.h. +// +// +stateify savable type ControlMessageIPPacketInfo struct { NIC int32 LocalAddr InetAddr |