1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
4 // VPP: 20.05.1-release
5 // source: /usr/share/vpp/api/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 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 ip_types "git.fd.io/govpp.git/binapi/ip_types"
18 codec "git.fd.io/govpp.git/codec"
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
30 VersionCrc = 0x8295f28f
33 // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
34 type SwInterfaceSetVxlanGpeBypass struct {
35 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
36 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
37 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
40 func (m *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
41 func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
42 return "sw_interface_set_vxlan_gpe_bypass"
44 func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "65247409" }
45 func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
46 return api.RequestMessage
49 func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
53 size += 4 // m.SwIfIndex
58 func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
60 b = make([]byte, m.Size())
62 buf := codec.NewBuffer(b)
63 buf.EncodeUint32(uint32(m.SwIfIndex))
64 buf.EncodeBool(m.IsIPv6)
65 buf.EncodeBool(m.Enable)
66 return buf.Bytes(), nil
68 func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
69 buf := codec.NewBuffer(b)
70 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
71 m.IsIPv6 = buf.DecodeBool()
72 m.Enable = buf.DecodeBool()
76 // SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
77 type SwInterfaceSetVxlanGpeBypassReply struct {
78 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
81 func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
82 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
83 return "sw_interface_set_vxlan_gpe_bypass_reply"
85 func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
86 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
87 return api.ReplyMessage
90 func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
97 func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) {
99 b = make([]byte, m.Size())
101 buf := codec.NewBuffer(b)
102 buf.EncodeInt32(m.Retval)
103 return buf.Bytes(), nil
105 func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
106 buf := codec.NewBuffer(b)
107 m.Retval = buf.DecodeInt32()
111 // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
112 type VxlanGpeAddDelTunnel struct {
113 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"`
114 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"`
115 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
116 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
117 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
118 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
119 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
120 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
123 func (m *VxlanGpeAddDelTunnel) Reset() { *m = VxlanGpeAddDelTunnel{} }
124 func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
125 func (*VxlanGpeAddDelTunnel) GetCrcString() string { return "7c6da6ae" }
126 func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
127 return api.RequestMessage
130 func (m *VxlanGpeAddDelTunnel) Size() (size int) {
134 size += 1 // m.Local.Af
135 size += 1 * 16 // m.Local.Un
136 size += 1 // m.Remote.Af
137 size += 1 * 16 // m.Remote.Un
138 size += 4 // m.McastSwIfIndex
139 size += 4 // m.EncapVrfID
140 size += 4 // m.DecapVrfID
141 size += 1 // m.Protocol
146 func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
148 b = make([]byte, m.Size())
150 buf := codec.NewBuffer(b)
151 buf.EncodeUint8(uint8(m.Local.Af))
152 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
153 buf.EncodeUint8(uint8(m.Remote.Af))
154 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
155 buf.EncodeUint32(uint32(m.McastSwIfIndex))
156 buf.EncodeUint32(m.EncapVrfID)
157 buf.EncodeUint32(m.DecapVrfID)
158 buf.EncodeUint8(uint8(m.Protocol))
159 buf.EncodeUint32(m.Vni)
160 buf.EncodeBool(m.IsAdd)
161 return buf.Bytes(), nil
163 func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
164 buf := codec.NewBuffer(b)
165 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
166 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
167 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
168 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
169 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
170 m.EncapVrfID = buf.DecodeUint32()
171 m.DecapVrfID = buf.DecodeUint32()
172 m.Protocol = ip_types.IPProto(buf.DecodeUint8())
173 m.Vni = buf.DecodeUint32()
174 m.IsAdd = buf.DecodeBool()
178 // VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
179 type VxlanGpeAddDelTunnelReply struct {
180 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
181 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
184 func (m *VxlanGpeAddDelTunnelReply) Reset() { *m = VxlanGpeAddDelTunnelReply{} }
185 func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
186 func (*VxlanGpeAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
187 func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
188 return api.ReplyMessage
191 func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
195 size += 4 // m.Retval
196 size += 4 // m.SwIfIndex
199 func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
201 b = make([]byte, m.Size())
203 buf := codec.NewBuffer(b)
204 buf.EncodeInt32(m.Retval)
205 buf.EncodeUint32(uint32(m.SwIfIndex))
206 return buf.Bytes(), nil
208 func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
209 buf := codec.NewBuffer(b)
210 m.Retval = buf.DecodeInt32()
211 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
215 // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
216 type VxlanGpeTunnelDetails struct {
217 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
218 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"`
219 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"`
220 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
221 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
222 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
223 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
224 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
225 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
228 func (m *VxlanGpeTunnelDetails) Reset() { *m = VxlanGpeTunnelDetails{} }
229 func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
230 func (*VxlanGpeTunnelDetails) GetCrcString() string { return "57712346" }
231 func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
232 return api.ReplyMessage
235 func (m *VxlanGpeTunnelDetails) Size() (size int) {
239 size += 4 // m.SwIfIndex
240 size += 1 // m.Local.Af
241 size += 1 * 16 // m.Local.Un
242 size += 1 // m.Remote.Af
243 size += 1 * 16 // m.Remote.Un
245 size += 1 // m.Protocol
246 size += 4 // m.McastSwIfIndex
247 size += 4 // m.EncapVrfID
248 size += 4 // m.DecapVrfID
249 size += 1 // m.IsIPv6
252 func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
254 b = make([]byte, m.Size())
256 buf := codec.NewBuffer(b)
257 buf.EncodeUint32(uint32(m.SwIfIndex))
258 buf.EncodeUint8(uint8(m.Local.Af))
259 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
260 buf.EncodeUint8(uint8(m.Remote.Af))
261 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
262 buf.EncodeUint32(m.Vni)
263 buf.EncodeUint8(uint8(m.Protocol))
264 buf.EncodeUint32(uint32(m.McastSwIfIndex))
265 buf.EncodeUint32(m.EncapVrfID)
266 buf.EncodeUint32(m.DecapVrfID)
267 buf.EncodeBool(m.IsIPv6)
268 return buf.Bytes(), nil
270 func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
271 buf := codec.NewBuffer(b)
272 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
273 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
274 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
275 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
276 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
277 m.Vni = buf.DecodeUint32()
278 m.Protocol = ip_types.IPProto(buf.DecodeUint8())
279 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
280 m.EncapVrfID = buf.DecodeUint32()
281 m.DecapVrfID = buf.DecodeUint32()
282 m.IsIPv6 = buf.DecodeBool()
286 // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
287 type VxlanGpeTunnelDump struct {
288 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
291 func (m *VxlanGpeTunnelDump) Reset() { *m = VxlanGpeTunnelDump{} }
292 func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
293 func (*VxlanGpeTunnelDump) GetCrcString() string { return "f9e6675e" }
294 func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
295 return api.RequestMessage
298 func (m *VxlanGpeTunnelDump) Size() (size int) {
302 size += 4 // m.SwIfIndex
305 func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
307 b = make([]byte, m.Size())
309 buf := codec.NewBuffer(b)
310 buf.EncodeUint32(uint32(m.SwIfIndex))
311 return buf.Bytes(), nil
313 func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
314 buf := codec.NewBuffer(b)
315 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
319 func init() { file_vxlan_gpe_binapi_init() }
320 func file_vxlan_gpe_binapi_init() {
321 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409")
322 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
323 api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_7c6da6ae")
324 api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f")
325 api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_57712346")
326 api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e")
329 // Messages returns list of all messages in this module.
330 func AllMessages() []api.Message {
331 return []api.Message{
332 (*SwInterfaceSetVxlanGpeBypass)(nil),
333 (*SwInterfaceSetVxlanGpeBypassReply)(nil),
334 (*VxlanGpeAddDelTunnel)(nil),
335 (*VxlanGpeAddDelTunnelReply)(nil),
336 (*VxlanGpeTunnelDetails)(nil),
337 (*VxlanGpeTunnelDump)(nil),