1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/vxlan_gbp.api.json
7 // Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
34 VersionCrc = 0xb40203a1
37 // VxlanGbpAPITunnelMode defines enum 'vxlan_gbp_api_tunnel_mode'.
38 type VxlanGbpAPITunnelMode uint32
41 VXLAN_GBP_API_TUNNEL_MODE_L2 VxlanGbpAPITunnelMode = 1
42 VXLAN_GBP_API_TUNNEL_MODE_L3 VxlanGbpAPITunnelMode = 2
46 VxlanGbpAPITunnelMode_name = map[uint32]string{
47 1: "VXLAN_GBP_API_TUNNEL_MODE_L2",
48 2: "VXLAN_GBP_API_TUNNEL_MODE_L3",
50 VxlanGbpAPITunnelMode_value = map[string]uint32{
51 "VXLAN_GBP_API_TUNNEL_MODE_L2": 1,
52 "VXLAN_GBP_API_TUNNEL_MODE_L3": 2,
56 func (x VxlanGbpAPITunnelMode) String() string {
57 s, ok := VxlanGbpAPITunnelMode_name[uint32(x)]
61 return "VxlanGbpAPITunnelMode(" + strconv.Itoa(int(x)) + ")"
64 // VxlanGbpTunnel defines type 'vxlan_gbp_tunnel'.
65 type VxlanGbpTunnel struct {
66 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
67 Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
68 Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
69 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
70 EncapTableID uint32 `binapi:"u32,name=encap_table_id" json:"encap_table_id,omitempty"`
71 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
72 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
73 Mode VxlanGbpAPITunnelMode `binapi:"vxlan_gbp_api_tunnel_mode,name=mode" json:"mode,omitempty"`
76 // SwInterfaceSetVxlanGbpBypass defines message 'sw_interface_set_vxlan_gbp_bypass'.
77 // InProgress: the message form may change in the future versions
78 type SwInterfaceSetVxlanGbpBypass struct {
79 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
80 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
81 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
84 func (m *SwInterfaceSetVxlanGbpBypass) Reset() { *m = SwInterfaceSetVxlanGbpBypass{} }
85 func (*SwInterfaceSetVxlanGbpBypass) GetMessageName() string {
86 return "sw_interface_set_vxlan_gbp_bypass"
88 func (*SwInterfaceSetVxlanGbpBypass) GetCrcString() string { return "65247409" }
89 func (*SwInterfaceSetVxlanGbpBypass) GetMessageType() api.MessageType {
90 return api.RequestMessage
93 func (m *SwInterfaceSetVxlanGbpBypass) Size() (size int) {
97 size += 4 // m.SwIfIndex
102 func (m *SwInterfaceSetVxlanGbpBypass) Marshal(b []byte) ([]byte, error) {
104 b = make([]byte, m.Size())
106 buf := codec.NewBuffer(b)
107 buf.EncodeUint32(uint32(m.SwIfIndex))
108 buf.EncodeBool(m.IsIPv6)
109 buf.EncodeBool(m.Enable)
110 return buf.Bytes(), nil
112 func (m *SwInterfaceSetVxlanGbpBypass) Unmarshal(b []byte) error {
113 buf := codec.NewBuffer(b)
114 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
115 m.IsIPv6 = buf.DecodeBool()
116 m.Enable = buf.DecodeBool()
120 // SwInterfaceSetVxlanGbpBypassReply defines message 'sw_interface_set_vxlan_gbp_bypass_reply'.
121 // InProgress: the message form may change in the future versions
122 type SwInterfaceSetVxlanGbpBypassReply struct {
123 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
126 func (m *SwInterfaceSetVxlanGbpBypassReply) Reset() { *m = SwInterfaceSetVxlanGbpBypassReply{} }
127 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageName() string {
128 return "sw_interface_set_vxlan_gbp_bypass_reply"
130 func (*SwInterfaceSetVxlanGbpBypassReply) GetCrcString() string { return "e8d4e804" }
131 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageType() api.MessageType {
132 return api.ReplyMessage
135 func (m *SwInterfaceSetVxlanGbpBypassReply) Size() (size int) {
139 size += 4 // m.Retval
142 func (m *SwInterfaceSetVxlanGbpBypassReply) Marshal(b []byte) ([]byte, error) {
144 b = make([]byte, m.Size())
146 buf := codec.NewBuffer(b)
147 buf.EncodeInt32(m.Retval)
148 return buf.Bytes(), nil
150 func (m *SwInterfaceSetVxlanGbpBypassReply) Unmarshal(b []byte) error {
151 buf := codec.NewBuffer(b)
152 m.Retval = buf.DecodeInt32()
156 // VxlanGbpTunnelAddDel defines message 'vxlan_gbp_tunnel_add_del'.
157 // InProgress: the message form may change in the future versions
158 type VxlanGbpTunnelAddDel struct {
159 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
160 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
163 func (m *VxlanGbpTunnelAddDel) Reset() { *m = VxlanGbpTunnelAddDel{} }
164 func (*VxlanGbpTunnelAddDel) GetMessageName() string { return "vxlan_gbp_tunnel_add_del" }
165 func (*VxlanGbpTunnelAddDel) GetCrcString() string { return "6c743427" }
166 func (*VxlanGbpTunnelAddDel) GetMessageType() api.MessageType {
167 return api.RequestMessage
170 func (m *VxlanGbpTunnelAddDel) Size() (size int) {
175 size += 4 // m.Tunnel.Instance
176 size += 1 // m.Tunnel.Src.Af
177 size += 1 * 16 // m.Tunnel.Src.Un
178 size += 1 // m.Tunnel.Dst.Af
179 size += 1 * 16 // m.Tunnel.Dst.Un
180 size += 4 // m.Tunnel.McastSwIfIndex
181 size += 4 // m.Tunnel.EncapTableID
182 size += 4 // m.Tunnel.Vni
183 size += 4 // m.Tunnel.SwIfIndex
184 size += 4 // m.Tunnel.Mode
187 func (m *VxlanGbpTunnelAddDel) Marshal(b []byte) ([]byte, error) {
189 b = make([]byte, m.Size())
191 buf := codec.NewBuffer(b)
192 buf.EncodeBool(m.IsAdd)
193 buf.EncodeUint32(m.Tunnel.Instance)
194 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
195 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
196 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
197 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
198 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
199 buf.EncodeUint32(m.Tunnel.EncapTableID)
200 buf.EncodeUint32(m.Tunnel.Vni)
201 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
202 buf.EncodeUint32(uint32(m.Tunnel.Mode))
203 return buf.Bytes(), nil
205 func (m *VxlanGbpTunnelAddDel) Unmarshal(b []byte) error {
206 buf := codec.NewBuffer(b)
207 m.IsAdd = buf.DecodeBool()
208 m.Tunnel.Instance = buf.DecodeUint32()
209 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
210 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
211 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
212 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
213 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
214 m.Tunnel.EncapTableID = buf.DecodeUint32()
215 m.Tunnel.Vni = buf.DecodeUint32()
216 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
217 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
221 // VxlanGbpTunnelAddDelReply defines message 'vxlan_gbp_tunnel_add_del_reply'.
222 // InProgress: the message form may change in the future versions
223 type VxlanGbpTunnelAddDelReply struct {
224 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
225 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
228 func (m *VxlanGbpTunnelAddDelReply) Reset() { *m = VxlanGbpTunnelAddDelReply{} }
229 func (*VxlanGbpTunnelAddDelReply) GetMessageName() string { return "vxlan_gbp_tunnel_add_del_reply" }
230 func (*VxlanGbpTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
231 func (*VxlanGbpTunnelAddDelReply) GetMessageType() api.MessageType {
232 return api.ReplyMessage
235 func (m *VxlanGbpTunnelAddDelReply) Size() (size int) {
239 size += 4 // m.Retval
240 size += 4 // m.SwIfIndex
243 func (m *VxlanGbpTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
245 b = make([]byte, m.Size())
247 buf := codec.NewBuffer(b)
248 buf.EncodeInt32(m.Retval)
249 buf.EncodeUint32(uint32(m.SwIfIndex))
250 return buf.Bytes(), nil
252 func (m *VxlanGbpTunnelAddDelReply) Unmarshal(b []byte) error {
253 buf := codec.NewBuffer(b)
254 m.Retval = buf.DecodeInt32()
255 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
259 // VxlanGbpTunnelDetails defines message 'vxlan_gbp_tunnel_details'.
260 // InProgress: the message form may change in the future versions
261 type VxlanGbpTunnelDetails struct {
262 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
265 func (m *VxlanGbpTunnelDetails) Reset() { *m = VxlanGbpTunnelDetails{} }
266 func (*VxlanGbpTunnelDetails) GetMessageName() string { return "vxlan_gbp_tunnel_details" }
267 func (*VxlanGbpTunnelDetails) GetCrcString() string { return "66e94a89" }
268 func (*VxlanGbpTunnelDetails) GetMessageType() api.MessageType {
269 return api.ReplyMessage
272 func (m *VxlanGbpTunnelDetails) Size() (size int) {
276 size += 4 // m.Tunnel.Instance
277 size += 1 // m.Tunnel.Src.Af
278 size += 1 * 16 // m.Tunnel.Src.Un
279 size += 1 // m.Tunnel.Dst.Af
280 size += 1 * 16 // m.Tunnel.Dst.Un
281 size += 4 // m.Tunnel.McastSwIfIndex
282 size += 4 // m.Tunnel.EncapTableID
283 size += 4 // m.Tunnel.Vni
284 size += 4 // m.Tunnel.SwIfIndex
285 size += 4 // m.Tunnel.Mode
288 func (m *VxlanGbpTunnelDetails) Marshal(b []byte) ([]byte, error) {
290 b = make([]byte, m.Size())
292 buf := codec.NewBuffer(b)
293 buf.EncodeUint32(m.Tunnel.Instance)
294 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
295 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
296 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
297 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
298 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
299 buf.EncodeUint32(m.Tunnel.EncapTableID)
300 buf.EncodeUint32(m.Tunnel.Vni)
301 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
302 buf.EncodeUint32(uint32(m.Tunnel.Mode))
303 return buf.Bytes(), nil
305 func (m *VxlanGbpTunnelDetails) Unmarshal(b []byte) error {
306 buf := codec.NewBuffer(b)
307 m.Tunnel.Instance = buf.DecodeUint32()
308 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
309 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
310 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
311 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
312 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
313 m.Tunnel.EncapTableID = buf.DecodeUint32()
314 m.Tunnel.Vni = buf.DecodeUint32()
315 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
316 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
320 // VxlanGbpTunnelDump defines message 'vxlan_gbp_tunnel_dump'.
321 // InProgress: the message form may change in the future versions
322 type VxlanGbpTunnelDump struct {
323 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
326 func (m *VxlanGbpTunnelDump) Reset() { *m = VxlanGbpTunnelDump{} }
327 func (*VxlanGbpTunnelDump) GetMessageName() string { return "vxlan_gbp_tunnel_dump" }
328 func (*VxlanGbpTunnelDump) GetCrcString() string { return "f9e6675e" }
329 func (*VxlanGbpTunnelDump) GetMessageType() api.MessageType {
330 return api.RequestMessage
333 func (m *VxlanGbpTunnelDump) Size() (size int) {
337 size += 4 // m.SwIfIndex
340 func (m *VxlanGbpTunnelDump) Marshal(b []byte) ([]byte, error) {
342 b = make([]byte, m.Size())
344 buf := codec.NewBuffer(b)
345 buf.EncodeUint32(uint32(m.SwIfIndex))
346 return buf.Bytes(), nil
348 func (m *VxlanGbpTunnelDump) Unmarshal(b []byte) error {
349 buf := codec.NewBuffer(b)
350 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
354 func init() { file_vxlan_gbp_binapi_init() }
355 func file_vxlan_gbp_binapi_init() {
356 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypass)(nil), "sw_interface_set_vxlan_gbp_bypass_65247409")
357 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypassReply)(nil), "sw_interface_set_vxlan_gbp_bypass_reply_e8d4e804")
358 api.RegisterMessage((*VxlanGbpTunnelAddDel)(nil), "vxlan_gbp_tunnel_add_del_6c743427")
359 api.RegisterMessage((*VxlanGbpTunnelAddDelReply)(nil), "vxlan_gbp_tunnel_add_del_reply_5383d31f")
360 api.RegisterMessage((*VxlanGbpTunnelDetails)(nil), "vxlan_gbp_tunnel_details_66e94a89")
361 api.RegisterMessage((*VxlanGbpTunnelDump)(nil), "vxlan_gbp_tunnel_dump_f9e6675e")
364 // Messages returns list of all messages in this module.
365 func AllMessages() []api.Message {
366 return []api.Message{
367 (*SwInterfaceSetVxlanGbpBypass)(nil),
368 (*SwInterfaceSetVxlanGbpBypassReply)(nil),
369 (*VxlanGbpTunnelAddDel)(nil),
370 (*VxlanGbpTunnelAddDelReply)(nil),
371 (*VxlanGbpTunnelDetails)(nil),
372 (*VxlanGbpTunnelDump)(nil),