go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2101/vxlan/vxlan.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package vxlan contains generated bindings for API file vxlan.api. 4 // 5 // Contents: 6 // - 8 messages 7 package vxlan 8 9 import ( 10 api "go.fd.io/govpp/api" 11 codec "go.fd.io/govpp/codec" 12 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types" 13 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_types" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the GoVPP api package it is being compiled against. 18 // A compilation error at this line likely means your copy of the 19 // GoVPP api package needs to be updated. 20 const _ = api.GoVppAPIPackageIsVersion2 21 22 const ( 23 APIFile = "vxlan" 24 APIVersion = "2.0.0" 25 VersionCrc = 0x392d0a82 26 ) 27 28 // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'. 29 type SwInterfaceSetVxlanBypass struct { 30 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 31 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 32 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` 33 } 34 35 func (m *SwInterfaceSetVxlanBypass) Reset() { *m = SwInterfaceSetVxlanBypass{} } 36 func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" } 37 func (*SwInterfaceSetVxlanBypass) GetCrcString() string { return "65247409" } 38 func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType { 39 return api.RequestMessage 40 } 41 42 func (m *SwInterfaceSetVxlanBypass) Size() (size int) { 43 if m == nil { 44 return 0 45 } 46 size += 4 // m.SwIfIndex 47 size += 1 // m.IsIPv6 48 size += 1 // m.Enable 49 return size 50 } 51 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) { 52 if b == nil { 53 b = make([]byte, m.Size()) 54 } 55 buf := codec.NewBuffer(b) 56 buf.EncodeUint32(uint32(m.SwIfIndex)) 57 buf.EncodeBool(m.IsIPv6) 58 buf.EncodeBool(m.Enable) 59 return buf.Bytes(), nil 60 } 61 func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error { 62 buf := codec.NewBuffer(b) 63 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 64 m.IsIPv6 = buf.DecodeBool() 65 m.Enable = buf.DecodeBool() 66 return nil 67 } 68 69 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'. 70 type SwInterfaceSetVxlanBypassReply struct { 71 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 72 } 73 74 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} } 75 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string { 76 return "sw_interface_set_vxlan_bypass_reply" 77 } 78 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" } 79 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType { 80 return api.ReplyMessage 81 } 82 83 func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) { 84 if m == nil { 85 return 0 86 } 87 size += 4 // m.Retval 88 return size 89 } 90 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) { 91 if b == nil { 92 b = make([]byte, m.Size()) 93 } 94 buf := codec.NewBuffer(b) 95 buf.EncodeInt32(m.Retval) 96 return buf.Bytes(), nil 97 } 98 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error { 99 buf := codec.NewBuffer(b) 100 m.Retval = buf.DecodeInt32() 101 return nil 102 } 103 104 // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'. 105 type VxlanAddDelTunnel struct { 106 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 107 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` 108 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 109 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 110 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 111 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 112 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 113 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 114 } 115 116 func (m *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} } 117 func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" } 118 func (*VxlanAddDelTunnel) GetCrcString() string { return "a35dc8f5" } 119 func (*VxlanAddDelTunnel) GetMessageType() api.MessageType { 120 return api.RequestMessage 121 } 122 123 func (m *VxlanAddDelTunnel) Size() (size int) { 124 if m == nil { 125 return 0 126 } 127 size += 1 // m.IsAdd 128 size += 4 // m.Instance 129 size += 1 // m.SrcAddress.Af 130 size += 1 * 16 // m.SrcAddress.Un 131 size += 1 // m.DstAddress.Af 132 size += 1 * 16 // m.DstAddress.Un 133 size += 4 // m.McastSwIfIndex 134 size += 4 // m.EncapVrfID 135 size += 4 // m.DecapNextIndex 136 size += 4 // m.Vni 137 return size 138 } 139 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) { 140 if b == nil { 141 b = make([]byte, m.Size()) 142 } 143 buf := codec.NewBuffer(b) 144 buf.EncodeBool(m.IsAdd) 145 buf.EncodeUint32(m.Instance) 146 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 147 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 148 buf.EncodeUint8(uint8(m.DstAddress.Af)) 149 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 150 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 151 buf.EncodeUint32(m.EncapVrfID) 152 buf.EncodeUint32(m.DecapNextIndex) 153 buf.EncodeUint32(m.Vni) 154 return buf.Bytes(), nil 155 } 156 func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error { 157 buf := codec.NewBuffer(b) 158 m.IsAdd = buf.DecodeBool() 159 m.Instance = buf.DecodeUint32() 160 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 161 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 162 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 163 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 164 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 165 m.EncapVrfID = buf.DecodeUint32() 166 m.DecapNextIndex = buf.DecodeUint32() 167 m.Vni = buf.DecodeUint32() 168 return nil 169 } 170 171 // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'. 172 type VxlanAddDelTunnelReply struct { 173 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 174 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 175 } 176 177 func (m *VxlanAddDelTunnelReply) Reset() { *m = VxlanAddDelTunnelReply{} } 178 func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" } 179 func (*VxlanAddDelTunnelReply) GetCrcString() string { return "5383d31f" } 180 func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType { 181 return api.ReplyMessage 182 } 183 184 func (m *VxlanAddDelTunnelReply) Size() (size int) { 185 if m == nil { 186 return 0 187 } 188 size += 4 // m.Retval 189 size += 4 // m.SwIfIndex 190 return size 191 } 192 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) { 193 if b == nil { 194 b = make([]byte, m.Size()) 195 } 196 buf := codec.NewBuffer(b) 197 buf.EncodeInt32(m.Retval) 198 buf.EncodeUint32(uint32(m.SwIfIndex)) 199 return buf.Bytes(), nil 200 } 201 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error { 202 buf := codec.NewBuffer(b) 203 m.Retval = buf.DecodeInt32() 204 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 205 return nil 206 } 207 208 // VxlanOffloadRx defines message 'vxlan_offload_rx'. 209 type VxlanOffloadRx struct { 210 HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"` 211 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 212 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` 213 } 214 215 func (m *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} } 216 func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" } 217 func (*VxlanOffloadRx) GetCrcString() string { return "89a1564b" } 218 func (*VxlanOffloadRx) GetMessageType() api.MessageType { 219 return api.RequestMessage 220 } 221 222 func (m *VxlanOffloadRx) Size() (size int) { 223 if m == nil { 224 return 0 225 } 226 size += 4 // m.HwIfIndex 227 size += 4 // m.SwIfIndex 228 size += 1 // m.Enable 229 return size 230 } 231 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) { 232 if b == nil { 233 b = make([]byte, m.Size()) 234 } 235 buf := codec.NewBuffer(b) 236 buf.EncodeUint32(uint32(m.HwIfIndex)) 237 buf.EncodeUint32(uint32(m.SwIfIndex)) 238 buf.EncodeBool(m.Enable) 239 return buf.Bytes(), nil 240 } 241 func (m *VxlanOffloadRx) Unmarshal(b []byte) error { 242 buf := codec.NewBuffer(b) 243 m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 244 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 245 m.Enable = buf.DecodeBool() 246 return nil 247 } 248 249 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'. 250 type VxlanOffloadRxReply struct { 251 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 252 } 253 254 func (m *VxlanOffloadRxReply) Reset() { *m = VxlanOffloadRxReply{} } 255 func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" } 256 func (*VxlanOffloadRxReply) GetCrcString() string { return "e8d4e804" } 257 func (*VxlanOffloadRxReply) GetMessageType() api.MessageType { 258 return api.ReplyMessage 259 } 260 261 func (m *VxlanOffloadRxReply) Size() (size int) { 262 if m == nil { 263 return 0 264 } 265 size += 4 // m.Retval 266 return size 267 } 268 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) { 269 if b == nil { 270 b = make([]byte, m.Size()) 271 } 272 buf := codec.NewBuffer(b) 273 buf.EncodeInt32(m.Retval) 274 return buf.Bytes(), nil 275 } 276 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error { 277 buf := codec.NewBuffer(b) 278 m.Retval = buf.DecodeInt32() 279 return nil 280 } 281 282 // VxlanTunnelDetails defines message 'vxlan_tunnel_details'. 283 type VxlanTunnelDetails struct { 284 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 285 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` 286 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 287 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 288 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 289 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 290 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 291 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 292 } 293 294 func (m *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} } 295 func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" } 296 func (*VxlanTunnelDetails) GetCrcString() string { return "e782f70f" } 297 func (*VxlanTunnelDetails) GetMessageType() api.MessageType { 298 return api.ReplyMessage 299 } 300 301 func (m *VxlanTunnelDetails) Size() (size int) { 302 if m == nil { 303 return 0 304 } 305 size += 4 // m.SwIfIndex 306 size += 4 // m.Instance 307 size += 1 // m.SrcAddress.Af 308 size += 1 * 16 // m.SrcAddress.Un 309 size += 1 // m.DstAddress.Af 310 size += 1 * 16 // m.DstAddress.Un 311 size += 4 // m.McastSwIfIndex 312 size += 4 // m.EncapVrfID 313 size += 4 // m.DecapNextIndex 314 size += 4 // m.Vni 315 return size 316 } 317 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) { 318 if b == nil { 319 b = make([]byte, m.Size()) 320 } 321 buf := codec.NewBuffer(b) 322 buf.EncodeUint32(uint32(m.SwIfIndex)) 323 buf.EncodeUint32(m.Instance) 324 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 325 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 326 buf.EncodeUint8(uint8(m.DstAddress.Af)) 327 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 328 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 329 buf.EncodeUint32(m.EncapVrfID) 330 buf.EncodeUint32(m.DecapNextIndex) 331 buf.EncodeUint32(m.Vni) 332 return buf.Bytes(), nil 333 } 334 func (m *VxlanTunnelDetails) Unmarshal(b []byte) error { 335 buf := codec.NewBuffer(b) 336 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 337 m.Instance = buf.DecodeUint32() 338 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 339 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 340 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 341 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 342 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 343 m.EncapVrfID = buf.DecodeUint32() 344 m.DecapNextIndex = buf.DecodeUint32() 345 m.Vni = buf.DecodeUint32() 346 return nil 347 } 348 349 // VxlanTunnelDump defines message 'vxlan_tunnel_dump'. 350 type VxlanTunnelDump struct { 351 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 352 } 353 354 func (m *VxlanTunnelDump) Reset() { *m = VxlanTunnelDump{} } 355 func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" } 356 func (*VxlanTunnelDump) GetCrcString() string { return "f9e6675e" } 357 func (*VxlanTunnelDump) GetMessageType() api.MessageType { 358 return api.RequestMessage 359 } 360 361 func (m *VxlanTunnelDump) Size() (size int) { 362 if m == nil { 363 return 0 364 } 365 size += 4 // m.SwIfIndex 366 return size 367 } 368 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) { 369 if b == nil { 370 b = make([]byte, m.Size()) 371 } 372 buf := codec.NewBuffer(b) 373 buf.EncodeUint32(uint32(m.SwIfIndex)) 374 return buf.Bytes(), nil 375 } 376 func (m *VxlanTunnelDump) Unmarshal(b []byte) error { 377 buf := codec.NewBuffer(b) 378 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 379 return nil 380 } 381 382 func init() { file_vxlan_binapi_init() } 383 func file_vxlan_binapi_init() { 384 api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409") 385 api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804") 386 api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_a35dc8f5") 387 api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f") 388 api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_89a1564b") 389 api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804") 390 api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_e782f70f") 391 api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e") 392 } 393 394 // Messages returns list of all messages in this module. 395 func AllMessages() []api.Message { 396 return []api.Message{ 397 (*SwInterfaceSetVxlanBypass)(nil), 398 (*SwInterfaceSetVxlanBypassReply)(nil), 399 (*VxlanAddDelTunnel)(nil), 400 (*VxlanAddDelTunnelReply)(nil), 401 (*VxlanOffloadRx)(nil), 402 (*VxlanOffloadRxReply)(nil), 403 (*VxlanTunnelDetails)(nil), 404 (*VxlanTunnelDump)(nil), 405 } 406 }