summaryrefslogtreecommitdiffstats
path: root/core/control_ping.go
blob: b39fd3ff3e084be3f182dcbaffd74e399430cf1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package core

import (
	"git.fd.io/govpp.git/api"
)

var (
	msgControlPing      api.Message = new(ControlPing)
	msgControlPingReply api.Message = new(ControlPingReply)
)

// SetControlPing sets the control ping message used by core.
func SetControlPing(m api.Message) {
	msgControlPing = m
}

// SetControlPingReply sets the control ping reply message used by core.
func SetControlPingReply(m api.Message) {
	msgControlPingReply = m
}

type ControlPing struct{}

func (*ControlPing) GetMessageName() string {
	return "control_ping"
}
func (*ControlPing) GetCrcString() string {
	return "51077d14"
}
func (*ControlPing) GetMessageType() api.MessageType {
	return api.RequestMessage
}

type ControlPingReply struct {
	Retval      int32
	ClientIndex uint32
	VpePID      uint32
}

func (*ControlPingReply) GetMessageName() string {
	return "control_ping_reply"
}
func (*ControlPingReply) GetCrcString() string {
	return "f6b0b8ca"
}
func (*ControlPingReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func init() {
	api.RegisterMessage((*ControlPing)(nil), "ControlPing")
	api.RegisterMessage((*ControlPingReply)(nil), "ControlPingReply")
}