diff options
Diffstat (limited to 'pkg/abi/linux')
-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 |