b39fd3ff3e084be3f182dcbaffd74e399430cf1a
[govpp.git] / core / control_ping.go
1 package core
2
3 import (
4         "git.fd.io/govpp.git/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 {
25         return "control_ping"
26 }
27 func (*ControlPing) GetCrcString() string {
28         return "51077d14"
29 }
30 func (*ControlPing) GetMessageType() api.MessageType {
31         return api.RequestMessage
32 }
33
34 type ControlPingReply struct {
35         Retval      int32
36         ClientIndex uint32
37         VpePID      uint32
38 }
39
40 func (*ControlPingReply) GetMessageName() string {
41         return "control_ping_reply"
42 }
43 func (*ControlPingReply) GetCrcString() string {
44         return "f6b0b8ca"
45 }
46 func (*ControlPingReply) GetMessageType() api.MessageType {
47         return api.ReplyMessage
48 }
49
50 func init() {
51         api.RegisterMessage((*ControlPing)(nil), "ControlPing")
52         api.RegisterMessage((*ControlPingReply)(nil), "ControlPingReply")
53 }