diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-21 23:46:09 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-21 23:46:09 +0000 |
commit | c9bfc173aa5b829cb52b25008a9550d3469c86e8 (patch) | |
tree | 8909aa286658b57fcbd8b4445d3e1054036f4595 /pkg/tcpip/link/tun/tun_state_autogen.go | |
parent | 3385b688b8f2fd91fba4b1956e7d7b1c5925d842 (diff) | |
parent | b8f56c79be40d9c75f4e2f279c9d821d1c1c3569 (diff) |
Merge release-20200211.0-65-gb8f56c7 (automated)
Diffstat (limited to 'pkg/tcpip/link/tun/tun_state_autogen.go')
-rwxr-xr-x | pkg/tcpip/link/tun/tun_state_autogen.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pkg/tcpip/link/tun/tun_state_autogen.go b/pkg/tcpip/link/tun/tun_state_autogen.go index 149299ea3..8b56175e4 100755 --- a/pkg/tcpip/link/tun/tun_state_autogen.go +++ b/pkg/tcpip/link/tun/tun_state_autogen.go @@ -3,3 +3,27 @@ // +build linux package tun + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (x *Device) save(m state.Map) { + x.beforeSave() + m.Save("Queue", &x.Queue) + m.Save("endpoint", &x.endpoint) + m.Save("notifyHandle", &x.notifyHandle) + m.Save("flags", &x.flags) +} + +func (x *Device) afterLoad() {} +func (x *Device) load(m state.Map) { + m.Load("Queue", &x.Queue) + m.Load("endpoint", &x.endpoint) + m.Load("notifyHandle", &x.notifyHandle) + m.Load("flags", &x.flags) +} + +func init() { + state.Register("pkg/tcpip/link/tun.Device", (*Device)(nil), state.Fns{Save: (*Device).save, Load: (*Device).load}) +} |