| 1 |
|
| 2 |
|
| 3 |
package channel |
| 4 |
|
| 5 |
import ( |
| 6 |
"inet.af/netstack/state" |
| 7 |
) |
| 8 |
|
| 9 |
func (n *NotificationHandle) StateTypeName() string { |
| 10 |
return "pkg/tcpip/link/channel.NotificationHandle" |
| 11 |
} |
| 12 |
|
| 13 |
func (n *NotificationHandle) StateFields() []string { |
| 14 |
return []string{ |
| 15 |
"n", |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
func (n *NotificationHandle) beforeSave() {} |
| 20 |
|
| 21 |
|
| 22 |
func (n *NotificationHandle) StateSave(stateSinkObject state.Sink) { |
| 23 |
n.beforeSave() |
| 24 |
stateSinkObject.Save(0, &n.n) |
| 25 |
} |
| 26 |
|
| 27 |
func (n *NotificationHandle) afterLoad() {} |
| 28 |
|
| 29 |
|
| 30 |
func (n *NotificationHandle) StateLoad(stateSourceObject state.Source) { |
| 31 |
stateSourceObject.Load(0, &n.n) |
| 32 |
} |
| 33 |
|
| 34 |
func init() { |
| 35 |
state.Register((*NotificationHandle)(nil)) |
| 36 |
} |