1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/vxlan_gpe.api.json
7 // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
15 api "git.fd.io/govpp.git/api"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
28 VersionCrc = 0x25bfb55d
31 // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
32 type SwInterfaceSetVxlanGpeBypass struct {
33 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
34 IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
35 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
38 func (m *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
39 func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
40 return "sw_interface_set_vxlan_gpe_bypass"
42 func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "e74ca095" }
43 func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
44 return api.RequestMessage
47 func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
51 size += 4 // m.SwIfIndex
56 func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
58 b = make([]byte, m.Size())
60 buf := codec.NewBuffer(b)
61 buf.EncodeUint32(m.SwIfIndex)
62 buf.EncodeUint8(m.IsIPv6)
63 buf.EncodeUint8(m.Enable)
64 return buf.Bytes(), nil
66 func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
67 buf := codec.NewBuffer(b)
68 m.SwIfIndex = buf.DecodeUint32()
69 m.IsIPv6 = buf.DecodeUint8()
70 m.Enable = buf.DecodeUint8()
74 // SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
75 type SwInterfaceSetVxlanGpeBypassReply struct {
76 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
79 func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
80 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
81 return "sw_interface_set_vxlan_gpe_bypass_reply"
83 func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
84 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
85 return api.ReplyMessage
88 func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
95 func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) {
97 b = make([]byte, m.Size())
99 buf := codec.NewBuffer(b)
100 buf.EncodeInt32(m.Retval)
101 return buf.Bytes(), nil
103 func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
104 buf := codec.NewBuffer(b)
105 m.Retval = buf.DecodeInt32()
109 // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
110 type VxlanGpeAddDelTunnel struct {
111 IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
112 Local []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
113 Remote []byte `binapi:"u8[16],name=remote" json:"remote,omitempty"`
114 McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
115 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
116 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
117 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
118 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
119 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
122 func (m *VxlanGpeAddDelTunnel) Reset() { *m = VxlanGpeAddDelTunnel{} }
123 func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
124 func (*VxlanGpeAddDelTunnel) GetCrcString() string { return "d15850ba" }
125 func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
126 return api.RequestMessage
129 func (m *VxlanGpeAddDelTunnel) Size() (size int) {
133 size += 1 // m.IsIPv6
134 size += 1 * 16 // m.Local
135 size += 1 * 16 // m.Remote
136 size += 4 // m.McastSwIfIndex
137 size += 4 // m.EncapVrfID
138 size += 4 // m.DecapVrfID
139 size += 1 // m.Protocol
144 func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
146 b = make([]byte, m.Size())
148 buf := codec.NewBuffer(b)
149 buf.EncodeUint8(m.IsIPv6)
150 buf.EncodeBytes(m.Local, 16)
151 buf.EncodeBytes(m.Remote, 16)
152 buf.EncodeUint32(m.McastSwIfIndex)
153 buf.EncodeUint32(m.EncapVrfID)
154 buf.EncodeUint32(m.DecapVrfID)
155 buf.EncodeUint8(m.Protocol)
156 buf.EncodeUint32(m.Vni)
157 buf.EncodeUint8(m.IsAdd)
158 return buf.Bytes(), nil
160 func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
161 buf := codec.NewBuffer(b)
162 m.IsIPv6 = buf.DecodeUint8()
163 m.Local = make([]byte, 16)
164 copy(m.Local, buf.DecodeBytes(len(m.Local)))
165 m.Remote = make([]byte, 16)
166 copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
167 m.McastSwIfIndex = buf.DecodeUint32()
168 m.EncapVrfID = buf.DecodeUint32()
169 m.DecapVrfID = buf.DecodeUint32()
170 m.Protocol = buf.DecodeUint8()
171 m.Vni = buf.DecodeUint32()
172 m.IsAdd = buf.DecodeUint8()
176 // VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
177 type VxlanGpeAddDelTunnelReply struct {
178 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
179 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
182 func (m *VxlanGpeAddDelTunnelReply) Reset() { *m = VxlanGpeAddDelTunnelReply{} }
183 func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
184 func (*VxlanGpeAddDelTunnelReply) GetCrcString() string { return "fda5941f" }
185 func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
186 return api.ReplyMessage
189 func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
193 size += 4 // m.Retval
194 size += 4 // m.SwIfIndex
197 func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
199 b = make([]byte, m.Size())
201 buf := codec.NewBuffer(b)
202 buf.EncodeInt32(m.Retval)
203 buf.EncodeUint32(m.SwIfIndex)
204 return buf.Bytes(), nil
206 func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
207 buf := codec.NewBuffer(b)
208 m.Retval = buf.DecodeInt32()
209 m.SwIfIndex = buf.DecodeUint32()
213 // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
214 type VxlanGpeTunnelDetails struct {
215 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
216 Local []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
217 Remote []byte `binapi:"u8[16],name=remote" json:"remote,omitempty"`
218 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
219 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
220 McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
221 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
222 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
223 IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
226 func (m *VxlanGpeTunnelDetails) Reset() { *m = VxlanGpeTunnelDetails{} }
227 func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
228 func (*VxlanGpeTunnelDetails) GetCrcString() string { return "2673fbfa" }
229 func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
230 return api.ReplyMessage
233 func (m *VxlanGpeTunnelDetails) Size() (size int) {
237 size += 4 // m.SwIfIndex
238 size += 1 * 16 // m.Local
239 size += 1 * 16 // m.Remote
241 size += 1 // m.Protocol
242 size += 4 // m.McastSwIfIndex
243 size += 4 // m.EncapVrfID
244 size += 4 // m.DecapVrfID
245 size += 1 // m.IsIPv6
248 func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
250 b = make([]byte, m.Size())
252 buf := codec.NewBuffer(b)
253 buf.EncodeUint32(m.SwIfIndex)
254 buf.EncodeBytes(m.Local, 16)
255 buf.EncodeBytes(m.Remote, 16)
256 buf.EncodeUint32(m.Vni)
257 buf.EncodeUint8(m.Protocol)
258 buf.EncodeUint32(m.McastSwIfIndex)
259 buf.EncodeUint32(m.EncapVrfID)
260 buf.EncodeUint32(m.DecapVrfID)
261 buf.EncodeUint8(m.IsIPv6)
262 return buf.Bytes(), nil
264 func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
265 buf := codec.NewBuffer(b)
266 m.SwIfIndex = buf.DecodeUint32()
267 m.Local = make([]byte, 16)
268 copy(m.Local, buf.DecodeBytes(len(m.Local)))
269 m.Remote = make([]byte, 16)
270 copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
271 m.Vni = buf.DecodeUint32()
272 m.Protocol = buf.DecodeUint8()
273 m.McastSwIfIndex = buf.DecodeUint32()
274 m.EncapVrfID = buf.DecodeUint32()
275 m.DecapVrfID = buf.DecodeUint32()
276 m.IsIPv6 = buf.DecodeUint8()
280 // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
281 type VxlanGpeTunnelDump struct {
282 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
285 func (m *VxlanGpeTunnelDump) Reset() { *m = VxlanGpeTunnelDump{} }
286 func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
287 func (*VxlanGpeTunnelDump) GetCrcString() string { return "529cb13f" }
288 func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
289 return api.RequestMessage
292 func (m *VxlanGpeTunnelDump) Size() (size int) {
296 size += 4 // m.SwIfIndex
299 func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
301 b = make([]byte, m.Size())
303 buf := codec.NewBuffer(b)
304 buf.EncodeUint32(m.SwIfIndex)
305 return buf.Bytes(), nil
307 func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
308 buf := codec.NewBuffer(b)
309 m.SwIfIndex = buf.DecodeUint32()
313 func init() { file_vxlan_gpe_binapi_init() }
314 func file_vxlan_gpe_binapi_init() {
315 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_e74ca095")
316 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
317 api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_d15850ba")
318 api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_fda5941f")
319 api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_2673fbfa")
320 api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_529cb13f")
323 // Messages returns list of all messages in this module.
324 func AllMessages() []api.Message {
325 return []api.Message{
326 (*SwInterfaceSetVxlanGpeBypass)(nil),
327 (*SwInterfaceSetVxlanGpeBypassReply)(nil),
328 (*VxlanGpeAddDelTunnel)(nil),
329 (*VxlanGpeAddDelTunnelReply)(nil),
330 (*VxlanGpeTunnelDetails)(nil),
331 (*VxlanGpeTunnelDump)(nil),