/
vxlan_gpe.ba.go
230 lines (201 loc) · 6.75 KB
/
vxlan_gpe.ba.go
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// source: /usr/share/vpp/api/core/vxlan_gpe.api.json
/*
Package vxlan_gpe is a generated VPP binary API for 'vxlan_gpe' module.
It consists of:
6 messages
3 services
*/
package vxlan_gpe
import (
bytes "bytes"
context "context"
api "git.fd.io/govpp.git/api"
struc "github.com/lunixbochs/struc"
io "io"
strconv "strconv"
)
const (
// ModuleName is the name of this module.
ModuleName = "vxlan_gpe"
// VersionCrc is the CRC of this module.
VersionCrc = 0x25bfb55d
)
// SwInterfaceSetVxlanGpeBypass represents VPP binary API message 'sw_interface_set_vxlan_gpe_bypass'.
type SwInterfaceSetVxlanGpeBypass struct {
SwIfIndex uint32
IsIPv6 uint8
Enable uint8
}
func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
return "sw_interface_set_vxlan_gpe_bypass"
}
func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string {
return "e74ca095"
}
func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
return api.RequestMessage
}
// SwInterfaceSetVxlanGpeBypassReply represents VPP binary API message 'sw_interface_set_vxlan_gpe_bypass_reply'.
type SwInterfaceSetVxlanGpeBypassReply struct {
Retval int32
}
func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
return "sw_interface_set_vxlan_gpe_bypass_reply"
}
func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string {
return "e8d4e804"
}
func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// VxlanGpeAddDelTunnel represents VPP binary API message 'vxlan_gpe_add_del_tunnel'.
type VxlanGpeAddDelTunnel struct {
IsIPv6 uint8
Local []byte `struc:"[16]byte"`
Remote []byte `struc:"[16]byte"`
McastSwIfIndex uint32
EncapVrfID uint32
DecapVrfID uint32
Protocol uint8
Vni uint32
IsAdd uint8
}
func (*VxlanGpeAddDelTunnel) GetMessageName() string {
return "vxlan_gpe_add_del_tunnel"
}
func (*VxlanGpeAddDelTunnel) GetCrcString() string {
return "d15850ba"
}
func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
return api.RequestMessage
}
// VxlanGpeAddDelTunnelReply represents VPP binary API message 'vxlan_gpe_add_del_tunnel_reply'.
type VxlanGpeAddDelTunnelReply struct {
Retval int32
SwIfIndex uint32
}
func (*VxlanGpeAddDelTunnelReply) GetMessageName() string {
return "vxlan_gpe_add_del_tunnel_reply"
}
func (*VxlanGpeAddDelTunnelReply) GetCrcString() string {
return "fda5941f"
}
func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// VxlanGpeTunnelDetails represents VPP binary API message 'vxlan_gpe_tunnel_details'.
type VxlanGpeTunnelDetails struct {
SwIfIndex uint32
Local []byte `struc:"[16]byte"`
Remote []byte `struc:"[16]byte"`
Vni uint32
Protocol uint8
McastSwIfIndex uint32
EncapVrfID uint32
DecapVrfID uint32
IsIPv6 uint8
}
func (*VxlanGpeTunnelDetails) GetMessageName() string {
return "vxlan_gpe_tunnel_details"
}
func (*VxlanGpeTunnelDetails) GetCrcString() string {
return "2673fbfa"
}
func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// VxlanGpeTunnelDump represents VPP binary API message 'vxlan_gpe_tunnel_dump'.
type VxlanGpeTunnelDump struct {
SwIfIndex uint32
}
func (*VxlanGpeTunnelDump) GetMessageName() string {
return "vxlan_gpe_tunnel_dump"
}
func (*VxlanGpeTunnelDump) GetCrcString() string {
return "529cb13f"
}
func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
func init() {
api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "vxlan_gpe.SwInterfaceSetVxlanGpeBypass")
api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "vxlan_gpe.SwInterfaceSetVxlanGpeBypassReply")
api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe.VxlanGpeAddDelTunnel")
api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe.VxlanGpeAddDelTunnelReply")
api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe.VxlanGpeTunnelDetails")
api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe.VxlanGpeTunnelDump")
}
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
(*SwInterfaceSetVxlanGpeBypass)(nil),
(*SwInterfaceSetVxlanGpeBypassReply)(nil),
(*VxlanGpeAddDelTunnel)(nil),
(*VxlanGpeAddDelTunnelReply)(nil),
(*VxlanGpeTunnelDetails)(nil),
(*VxlanGpeTunnelDump)(nil),
}
}
// RPCService represents RPC service API for vxlan_gpe module.
type RPCService interface {
DumpVxlanGpeTunnel(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_DumpVxlanGpeTunnelClient, error)
SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error)
VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error)
}
type serviceClient struct {
ch api.Channel
}
func NewServiceClient(ch api.Channel) RPCService {
return &serviceClient{ch}
}
func (c *serviceClient) DumpVxlanGpeTunnel(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_DumpVxlanGpeTunnelClient, error) {
stream := c.ch.SendMultiRequest(in)
x := &serviceClient_DumpVxlanGpeTunnelClient{stream}
return x, nil
}
type RPCService_DumpVxlanGpeTunnelClient interface {
Recv() (*VxlanGpeTunnelDetails, error)
}
type serviceClient_DumpVxlanGpeTunnelClient struct {
api.MultiRequestCtx
}
func (c *serviceClient_DumpVxlanGpeTunnelClient) Recv() (*VxlanGpeTunnelDetails, error) {
m := new(VxlanGpeTunnelDetails)
stop, err := c.MultiRequestCtx.ReceiveReply(m)
if err != nil {
return nil, err
}
if stop {
return nil, io.EOF
}
return m, nil
}
func (c *serviceClient) SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error) {
out := new(SwInterfaceSetVxlanGpeBypassReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceClient) VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error) {
out := new(VxlanGpeAddDelTunnelReply)
err := c.ch.SendRequest(in).ReceiveReply(out)
if err != nil {
return nil, err
}
return out, nil
}
// This is a compile-time assertion to ensure that this generated file
// is compatible with the GoVPP api package it is being compiled against.
// A compilation error at this line likely means your copy of the
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
var _ = bytes.NewBuffer
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
var _ = struc.Pack