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