Change module name to go.fd.io/govpp
[govpp.git] / core / control_ping.go
1 package core
2
3 import (
4         "go.fd.io/govpp/api"
5 )
6
7 var (
8         msgControlPing      api.Message = new(ControlPing)
9         msgControlPingReply api.Message = new(ControlPingReply)
10 )
11
12 // SetControlPing sets the control ping message used by core.
13 func SetControlPing(m api.Message) {
14         msgControlPing = m
15 }
16
17 // SetControlPingReply sets the control ping reply message used by core.
18 func SetControlPingReply(m api.Message) {
19         msgControlPingReply = m
20 }
21
22 type ControlPing struct{}
23
24 func (*ControlPing) GetMessageName() string          { return "control_ping" }
25 func (*ControlPing) GetCrcString() string            { return "51077d14" }
26 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
27
28 type ControlPingReply struct {
29         Retval      int32
30         ClientIndex uint32
31         VpePID      uint32
32 }
33
34 func (*ControlPingReply) GetMessageName() string          { return "control_ping_reply" }
35 func (*ControlPingReply) GetCrcString() string            { return "f6b0b8ca" }
36 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
37
38 func init() {
39         api.RegisterMessage((*ControlPing)(nil), "ControlPing")
40         api.RegisterMessage((*ControlPingReply)(nil), "ControlPingReply")
41 }