1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
18 api "git.fd.io/govpp.git/api"
19 interface_types "git.fd.io/govpp.git/binapi/interface_types"
20 ip_types "git.fd.io/govpp.git/binapi/ip_types"
21 codec "git.fd.io/govpp.git/codec"
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
33 VersionCrc = 0xfa8aff54
36 // VxlanGbpAPITunnelMode defines enum 'vxlan_gbp_api_tunnel_mode'.
37 type VxlanGbpAPITunnelMode uint32
40 VXLAN_GBP_API_TUNNEL_MODE_L2 VxlanGbpAPITunnelMode = 1
41 VXLAN_GBP_API_TUNNEL_MODE_L3 VxlanGbpAPITunnelMode = 2
45 VxlanGbpAPITunnelMode_name = map[uint32]string{
46 1: "VXLAN_GBP_API_TUNNEL_MODE_L2",
47 2: "VXLAN_GBP_API_TUNNEL_MODE_L3",
49 VxlanGbpAPITunnelMode_value = map[string]uint32{
50 "VXLAN_GBP_API_TUNNEL_MODE_L2": 1,
51 "VXLAN_GBP_API_TUNNEL_MODE_L3": 2,
55 func (x VxlanGbpAPITunnelMode) String() string {
56 s, ok := VxlanGbpAPITunnelMode_name[uint32(x)]
60 return "VxlanGbpAPITunnelMode(" + strconv.Itoa(int(x)) + ")"
63 // VxlanGbpTunnel defines type 'vxlan_gbp_tunnel'.
64 type VxlanGbpTunnel struct {
65 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
66 Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
67 Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
68 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
69 EncapTableID uint32 `binapi:"u32,name=encap_table_id" json:"encap_table_id,omitempty"`
70 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
71 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
72 Mode VxlanGbpAPITunnelMode `binapi:"vxlan_gbp_api_tunnel_mode,name=mode" json:"mode,omitempty"`
75 // SwInterfaceSetVxlanGbpBypass defines message 'sw_interface_set_vxlan_gbp_bypass'.
76 type SwInterfaceSetVxlanGbpBypass struct {
77 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
78 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
79 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
82 func (m *SwInterfaceSetVxlanGbpBypass) Reset() { *m = SwInterfaceSetVxlanGbpBypass{} }
83 func (*SwInterfaceSetVxlanGbpBypass) GetMessageName() string {
84 return "sw_interface_set_vxlan_gbp_bypass"
86 func (*SwInterfaceSetVxlanGbpBypass) GetCrcString() string { return "65247409" }
87 func (*SwInterfaceSetVxlanGbpBypass) GetMessageType() api.MessageType {
88 return api.RequestMessage
91 func (m *SwInterfaceSetVxlanGbpBypass) Size() (size int) {
95 size += 4 // m.SwIfIndex
100 func (m *SwInterfaceSetVxlanGbpBypass) Marshal(b []byte) ([]byte, error) {
102 b = make([]byte, m.Size())
104 buf := codec.NewBuffer(b)
105 buf.EncodeUint32(uint32(m.SwIfIndex))
106 buf.EncodeBool(m.IsIPv6)
107 buf.EncodeBool(m.Enable)
108 return buf.Bytes(), nil
110 func (m *SwInterfaceSetVxlanGbpBypass) Unmarshal(b []byte) error {
111 buf := codec.NewBuffer(b)
112 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
113 m.IsIPv6 = buf.DecodeBool()
114 m.Enable = buf.DecodeBool()
118 // SwInterfaceSetVxlanGbpBypassReply defines message 'sw_interface_set_vxlan_gbp_bypass_reply'.
119 type SwInterfaceSetVxlanGbpBypassReply struct {
120 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
123 func (m *SwInterfaceSetVxlanGbpBypassReply) Reset() { *m = SwInterfaceSetVxlanGbpBypassReply{} }
124 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageName() string {
125 return "sw_interface_set_vxlan_gbp_bypass_reply"
127 func (*SwInterfaceSetVxlanGbpBypassReply) GetCrcString() string { return "e8d4e804" }
128 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageType() api.MessageType {
129 return api.ReplyMessage
132 func (m *SwInterfaceSetVxlanGbpBypassReply) Size() (size int) {
136 size += 4 // m.Retval
139 func (m *SwInterfaceSetVxlanGbpBypassReply) Marshal(b []byte) ([]byte, error) {
141 b = make([]byte, m.Size())
143 buf := codec.NewBuffer(b)
144 buf.EncodeInt32(m.Retval)
145 return buf.Bytes(), nil
147 func (m *SwInterfaceSetVxlanGbpBypassReply) Unmarshal(b []byte) error {
148 buf := codec.NewBuffer(b)
149 m.Retval = buf.DecodeInt32()
153 // VxlanGbpTunnelAddDel defines message 'vxlan_gbp_tunnel_add_del'.
154 type VxlanGbpTunnelAddDel struct {
155 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
156 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
159 func (m *VxlanGbpTunnelAddDel) Reset() { *m = VxlanGbpTunnelAddDel{} }
160 func (*VxlanGbpTunnelAddDel) GetMessageName() string { return "vxlan_gbp_tunnel_add_del" }
161 func (*VxlanGbpTunnelAddDel) GetCrcString() string { return "8c819166" }
162 func (*VxlanGbpTunnelAddDel) GetMessageType() api.MessageType {
163 return api.RequestMessage
166 func (m *VxlanGbpTunnelAddDel) Size() (size int) {
171 size += 4 // m.Tunnel.Instance
172 size += 1 // m.Tunnel.Src.Af
173 size += 1 * 16 // m.Tunnel.Src.Un
174 size += 1 // m.Tunnel.Dst.Af
175 size += 1 * 16 // m.Tunnel.Dst.Un
176 size += 4 // m.Tunnel.McastSwIfIndex
177 size += 4 // m.Tunnel.EncapTableID
178 size += 4 // m.Tunnel.Vni
179 size += 4 // m.Tunnel.SwIfIndex
180 size += 4 // m.Tunnel.Mode
183 func (m *VxlanGbpTunnelAddDel) Marshal(b []byte) ([]byte, error) {
185 b = make([]byte, m.Size())
187 buf := codec.NewBuffer(b)
188 buf.EncodeBool(m.IsAdd)
189 buf.EncodeUint32(m.Tunnel.Instance)
190 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
191 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
192 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
193 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
194 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
195 buf.EncodeUint32(m.Tunnel.EncapTableID)
196 buf.EncodeUint32(m.Tunnel.Vni)
197 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
198 buf.EncodeUint32(uint32(m.Tunnel.Mode))
199 return buf.Bytes(), nil
201 func (m *VxlanGbpTunnelAddDel) Unmarshal(b []byte) error {
202 buf := codec.NewBuffer(b)
203 m.IsAdd = buf.DecodeBool()
204 m.Tunnel.Instance = buf.DecodeUint32()
205 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
206 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
207 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
208 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
209 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
210 m.Tunnel.EncapTableID = buf.DecodeUint32()
211 m.Tunnel.Vni = buf.DecodeUint32()
212 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
213 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
217 // VxlanGbpTunnelAddDelReply defines message 'vxlan_gbp_tunnel_add_del_reply'.
218 type VxlanGbpTunnelAddDelReply struct {
219 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
220 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
223 func (m *VxlanGbpTunnelAddDelReply) Reset() { *m = VxlanGbpTunnelAddDelReply{} }
224 func (*VxlanGbpTunnelAddDelReply) GetMessageName() string { return "vxlan_gbp_tunnel_add_del_reply" }
225 func (*VxlanGbpTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
226 func (*VxlanGbpTunnelAddDelReply) GetMessageType() api.MessageType {
227 return api.ReplyMessage
230 func (m *VxlanGbpTunnelAddDelReply) Size() (size int) {
234 size += 4 // m.Retval
235 size += 4 // m.SwIfIndex
238 func (m *VxlanGbpTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
240 b = make([]byte, m.Size())
242 buf := codec.NewBuffer(b)
243 buf.EncodeInt32(m.Retval)
244 buf.EncodeUint32(uint32(m.SwIfIndex))
245 return buf.Bytes(), nil
247 func (m *VxlanGbpTunnelAddDelReply) Unmarshal(b []byte) error {
248 buf := codec.NewBuffer(b)
249 m.Retval = buf.DecodeInt32()
250 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
254 // VxlanGbpTunnelDetails defines message 'vxlan_gbp_tunnel_details'.
255 type VxlanGbpTunnelDetails struct {
256 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
259 func (m *VxlanGbpTunnelDetails) Reset() { *m = VxlanGbpTunnelDetails{} }
260 func (*VxlanGbpTunnelDetails) GetMessageName() string { return "vxlan_gbp_tunnel_details" }
261 func (*VxlanGbpTunnelDetails) GetCrcString() string { return "1da24016" }
262 func (*VxlanGbpTunnelDetails) GetMessageType() api.MessageType {
263 return api.ReplyMessage
266 func (m *VxlanGbpTunnelDetails) Size() (size int) {
270 size += 4 // m.Tunnel.Instance
271 size += 1 // m.Tunnel.Src.Af
272 size += 1 * 16 // m.Tunnel.Src.Un
273 size += 1 // m.Tunnel.Dst.Af
274 size += 1 * 16 // m.Tunnel.Dst.Un
275 size += 4 // m.Tunnel.McastSwIfIndex
276 size += 4 // m.Tunnel.EncapTableID
277 size += 4 // m.Tunnel.Vni
278 size += 4 // m.Tunnel.SwIfIndex
279 size += 4 // m.Tunnel.Mode
282 func (m *VxlanGbpTunnelDetails) Marshal(b []byte) ([]byte, error) {
284 b = make([]byte, m.Size())
286 buf := codec.NewBuffer(b)
287 buf.EncodeUint32(m.Tunnel.Instance)
288 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
289 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
290 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
291 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
292 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
293 buf.EncodeUint32(m.Tunnel.EncapTableID)
294 buf.EncodeUint32(m.Tunnel.Vni)
295 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
296 buf.EncodeUint32(uint32(m.Tunnel.Mode))
297 return buf.Bytes(), nil
299 func (m *VxlanGbpTunnelDetails) Unmarshal(b []byte) error {
300 buf := codec.NewBuffer(b)
301 m.Tunnel.Instance = buf.DecodeUint32()
302 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
303 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
304 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
305 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
306 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
307 m.Tunnel.EncapTableID = buf.DecodeUint32()
308 m.Tunnel.Vni = buf.DecodeUint32()
309 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
310 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
314 // VxlanGbpTunnelDump defines message 'vxlan_gbp_tunnel_dump'.
315 type VxlanGbpTunnelDump struct {
316 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
319 func (m *VxlanGbpTunnelDump) Reset() { *m = VxlanGbpTunnelDump{} }
320 func (*VxlanGbpTunnelDump) GetMessageName() string { return "vxlan_gbp_tunnel_dump" }
321 func (*VxlanGbpTunnelDump) GetCrcString() string { return "f9e6675e" }
322 func (*VxlanGbpTunnelDump) GetMessageType() api.MessageType {
323 return api.RequestMessage
326 func (m *VxlanGbpTunnelDump) Size() (size int) {
330 size += 4 // m.SwIfIndex
333 func (m *VxlanGbpTunnelDump) Marshal(b []byte) ([]byte, error) {
335 b = make([]byte, m.Size())
337 buf := codec.NewBuffer(b)
338 buf.EncodeUint32(uint32(m.SwIfIndex))
339 return buf.Bytes(), nil
341 func (m *VxlanGbpTunnelDump) Unmarshal(b []byte) error {
342 buf := codec.NewBuffer(b)
343 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
347 func init() { file_vxlan_gbp_binapi_init() }
348 func file_vxlan_gbp_binapi_init() {
349 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypass)(nil), "sw_interface_set_vxlan_gbp_bypass_65247409")
350 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypassReply)(nil), "sw_interface_set_vxlan_gbp_bypass_reply_e8d4e804")
351 api.RegisterMessage((*VxlanGbpTunnelAddDel)(nil), "vxlan_gbp_tunnel_add_del_8c819166")
352 api.RegisterMessage((*VxlanGbpTunnelAddDelReply)(nil), "vxlan_gbp_tunnel_add_del_reply_5383d31f")
353 api.RegisterMessage((*VxlanGbpTunnelDetails)(nil), "vxlan_gbp_tunnel_details_1da24016")
354 api.RegisterMessage((*VxlanGbpTunnelDump)(nil), "vxlan_gbp_tunnel_dump_f9e6675e")
357 // Messages returns list of all messages in this module.
358 func AllMessages() []api.Message {
359 return []api.Message{
360 (*SwInterfaceSetVxlanGbpBypass)(nil),
361 (*SwInterfaceSetVxlanGbpBypassReply)(nil),
362 (*VxlanGbpTunnelAddDel)(nil),
363 (*VxlanGbpTunnelAddDelReply)(nil),
364 (*VxlanGbpTunnelDetails)(nil),
365 (*VxlanGbpTunnelDump)(nil),