github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/vxlan/vxlan.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.4.0-dev 4 // VPP: 23.02-rc0~189-g57127b32a 5 // source: /usr/share/vpp/api/core/vxlan.api.json 6 7 // Package vxlan contains generated bindings for API file vxlan.api. 8 // 9 // Contents: 10 // 14 messages 11 // 12 package vxlan 13 14 import ( 15 api "git.fd.io/govpp.git/api" 16 codec "git.fd.io/govpp.git/codec" 17 interface_types "github.com/edwarnicke/govpp/binapi/interface_types" 18 ip_types "github.com/edwarnicke/govpp/binapi/ip_types" 19 ) 20 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 26 27 const ( 28 APIFile = "vxlan" 29 APIVersion = "2.1.0" 30 VersionCrc = 0x95381587 31 ) 32 33 // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'. 34 type SwInterfaceSetVxlanBypass 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"` 38 } 39 40 func (m *SwInterfaceSetVxlanBypass) Reset() { *m = SwInterfaceSetVxlanBypass{} } 41 func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" } 42 func (*SwInterfaceSetVxlanBypass) GetCrcString() string { return "65247409" } 43 func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType { 44 return api.RequestMessage 45 } 46 47 func (m *SwInterfaceSetVxlanBypass) Size() (size int) { 48 if m == nil { 49 return 0 50 } 51 size += 4 // m.SwIfIndex 52 size += 1 // m.IsIPv6 53 size += 1 // m.Enable 54 return size 55 } 56 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) { 57 if b == nil { 58 b = make([]byte, m.Size()) 59 } 60 buf := codec.NewBuffer(b) 61 buf.EncodeUint32(uint32(m.SwIfIndex)) 62 buf.EncodeBool(m.IsIPv6) 63 buf.EncodeBool(m.Enable) 64 return buf.Bytes(), nil 65 } 66 func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error { 67 buf := codec.NewBuffer(b) 68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 69 m.IsIPv6 = buf.DecodeBool() 70 m.Enable = buf.DecodeBool() 71 return nil 72 } 73 74 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'. 75 type SwInterfaceSetVxlanBypassReply struct { 76 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 77 } 78 79 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} } 80 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string { 81 return "sw_interface_set_vxlan_bypass_reply" 82 } 83 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" } 84 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType { 85 return api.ReplyMessage 86 } 87 88 func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) { 89 if m == nil { 90 return 0 91 } 92 size += 4 // m.Retval 93 return size 94 } 95 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) { 96 if b == nil { 97 b = make([]byte, m.Size()) 98 } 99 buf := codec.NewBuffer(b) 100 buf.EncodeInt32(m.Retval) 101 return buf.Bytes(), nil 102 } 103 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error { 104 buf := codec.NewBuffer(b) 105 m.Retval = buf.DecodeInt32() 106 return nil 107 } 108 109 // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'. 110 type VxlanAddDelTunnel struct { 111 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 112 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` 113 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 114 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,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 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 118 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 119 } 120 121 func (m *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} } 122 func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" } 123 func (*VxlanAddDelTunnel) GetCrcString() string { return "0c09dc80" } 124 func (*VxlanAddDelTunnel) GetMessageType() api.MessageType { 125 return api.RequestMessage 126 } 127 128 func (m *VxlanAddDelTunnel) Size() (size int) { 129 if m == nil { 130 return 0 131 } 132 size += 1 // m.IsAdd 133 size += 4 // m.Instance 134 size += 1 // m.SrcAddress.Af 135 size += 1 * 16 // m.SrcAddress.Un 136 size += 1 // m.DstAddress.Af 137 size += 1 * 16 // m.DstAddress.Un 138 size += 4 // m.McastSwIfIndex 139 size += 4 // m.EncapVrfID 140 size += 4 // m.DecapNextIndex 141 size += 4 // m.Vni 142 return size 143 } 144 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) { 145 if b == nil { 146 b = make([]byte, m.Size()) 147 } 148 buf := codec.NewBuffer(b) 149 buf.EncodeBool(m.IsAdd) 150 buf.EncodeUint32(m.Instance) 151 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 152 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 153 buf.EncodeUint8(uint8(m.DstAddress.Af)) 154 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 155 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 156 buf.EncodeUint32(m.EncapVrfID) 157 buf.EncodeUint32(m.DecapNextIndex) 158 buf.EncodeUint32(m.Vni) 159 return buf.Bytes(), nil 160 } 161 func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error { 162 buf := codec.NewBuffer(b) 163 m.IsAdd = buf.DecodeBool() 164 m.Instance = buf.DecodeUint32() 165 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 166 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 167 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 168 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 169 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 170 m.EncapVrfID = buf.DecodeUint32() 171 m.DecapNextIndex = buf.DecodeUint32() 172 m.Vni = buf.DecodeUint32() 173 return nil 174 } 175 176 // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'. 177 type VxlanAddDelTunnelReply struct { 178 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 179 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 180 } 181 182 func (m *VxlanAddDelTunnelReply) Reset() { *m = VxlanAddDelTunnelReply{} } 183 func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" } 184 func (*VxlanAddDelTunnelReply) GetCrcString() string { return "5383d31f" } 185 func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType { 186 return api.ReplyMessage 187 } 188 189 func (m *VxlanAddDelTunnelReply) Size() (size int) { 190 if m == nil { 191 return 0 192 } 193 size += 4 // m.Retval 194 size += 4 // m.SwIfIndex 195 return size 196 } 197 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) { 198 if b == nil { 199 b = make([]byte, m.Size()) 200 } 201 buf := codec.NewBuffer(b) 202 buf.EncodeInt32(m.Retval) 203 buf.EncodeUint32(uint32(m.SwIfIndex)) 204 return buf.Bytes(), nil 205 } 206 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error { 207 buf := codec.NewBuffer(b) 208 m.Retval = buf.DecodeInt32() 209 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 210 return nil 211 } 212 213 // VxlanAddDelTunnelV2 defines message 'vxlan_add_del_tunnel_v2'. 214 type VxlanAddDelTunnelV2 struct { 215 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 216 Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"` 217 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 218 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 219 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` 220 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"` 221 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 222 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 223 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 224 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 225 } 226 227 func (m *VxlanAddDelTunnelV2) Reset() { *m = VxlanAddDelTunnelV2{} } 228 func (*VxlanAddDelTunnelV2) GetMessageName() string { return "vxlan_add_del_tunnel_v2" } 229 func (*VxlanAddDelTunnelV2) GetCrcString() string { return "4f223f40" } 230 func (*VxlanAddDelTunnelV2) GetMessageType() api.MessageType { 231 return api.RequestMessage 232 } 233 234 func (m *VxlanAddDelTunnelV2) Size() (size int) { 235 if m == nil { 236 return 0 237 } 238 size += 1 // m.IsAdd 239 size += 4 // m.Instance 240 size += 1 // m.SrcAddress.Af 241 size += 1 * 16 // m.SrcAddress.Un 242 size += 1 // m.DstAddress.Af 243 size += 1 * 16 // m.DstAddress.Un 244 size += 2 // m.SrcPort 245 size += 2 // m.DstPort 246 size += 4 // m.McastSwIfIndex 247 size += 4 // m.EncapVrfID 248 size += 4 // m.DecapNextIndex 249 size += 4 // m.Vni 250 return size 251 } 252 func (m *VxlanAddDelTunnelV2) Marshal(b []byte) ([]byte, error) { 253 if b == nil { 254 b = make([]byte, m.Size()) 255 } 256 buf := codec.NewBuffer(b) 257 buf.EncodeBool(m.IsAdd) 258 buf.EncodeUint32(m.Instance) 259 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 260 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 261 buf.EncodeUint8(uint8(m.DstAddress.Af)) 262 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 263 buf.EncodeUint16(m.SrcPort) 264 buf.EncodeUint16(m.DstPort) 265 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 266 buf.EncodeUint32(m.EncapVrfID) 267 buf.EncodeUint32(m.DecapNextIndex) 268 buf.EncodeUint32(m.Vni) 269 return buf.Bytes(), nil 270 } 271 func (m *VxlanAddDelTunnelV2) Unmarshal(b []byte) error { 272 buf := codec.NewBuffer(b) 273 m.IsAdd = buf.DecodeBool() 274 m.Instance = buf.DecodeUint32() 275 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 276 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 277 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 278 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 279 m.SrcPort = buf.DecodeUint16() 280 m.DstPort = buf.DecodeUint16() 281 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 282 m.EncapVrfID = buf.DecodeUint32() 283 m.DecapNextIndex = buf.DecodeUint32() 284 m.Vni = buf.DecodeUint32() 285 return nil 286 } 287 288 // VxlanAddDelTunnelV2Reply defines message 'vxlan_add_del_tunnel_v2_reply'. 289 type VxlanAddDelTunnelV2Reply struct { 290 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 291 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 292 } 293 294 func (m *VxlanAddDelTunnelV2Reply) Reset() { *m = VxlanAddDelTunnelV2Reply{} } 295 func (*VxlanAddDelTunnelV2Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v2_reply" } 296 func (*VxlanAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" } 297 func (*VxlanAddDelTunnelV2Reply) GetMessageType() api.MessageType { 298 return api.ReplyMessage 299 } 300 301 func (m *VxlanAddDelTunnelV2Reply) Size() (size int) { 302 if m == nil { 303 return 0 304 } 305 size += 4 // m.Retval 306 size += 4 // m.SwIfIndex 307 return size 308 } 309 func (m *VxlanAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) { 310 if b == nil { 311 b = make([]byte, m.Size()) 312 } 313 buf := codec.NewBuffer(b) 314 buf.EncodeInt32(m.Retval) 315 buf.EncodeUint32(uint32(m.SwIfIndex)) 316 return buf.Bytes(), nil 317 } 318 func (m *VxlanAddDelTunnelV2Reply) Unmarshal(b []byte) error { 319 buf := codec.NewBuffer(b) 320 m.Retval = buf.DecodeInt32() 321 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 322 return nil 323 } 324 325 // VxlanAddDelTunnelV3 defines message 'vxlan_add_del_tunnel_v3'. 326 type VxlanAddDelTunnelV3 struct { 327 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 328 Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"` 329 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 330 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 331 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` 332 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"` 333 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 334 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 335 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 336 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 337 IsL3 bool `binapi:"bool,name=is_l3,default=false" json:"is_l3,omitempty"` 338 } 339 340 func (m *VxlanAddDelTunnelV3) Reset() { *m = VxlanAddDelTunnelV3{} } 341 func (*VxlanAddDelTunnelV3) GetMessageName() string { return "vxlan_add_del_tunnel_v3" } 342 func (*VxlanAddDelTunnelV3) GetCrcString() string { return "0072b037" } 343 func (*VxlanAddDelTunnelV3) GetMessageType() api.MessageType { 344 return api.RequestMessage 345 } 346 347 func (m *VxlanAddDelTunnelV3) Size() (size int) { 348 if m == nil { 349 return 0 350 } 351 size += 1 // m.IsAdd 352 size += 4 // m.Instance 353 size += 1 // m.SrcAddress.Af 354 size += 1 * 16 // m.SrcAddress.Un 355 size += 1 // m.DstAddress.Af 356 size += 1 * 16 // m.DstAddress.Un 357 size += 2 // m.SrcPort 358 size += 2 // m.DstPort 359 size += 4 // m.McastSwIfIndex 360 size += 4 // m.EncapVrfID 361 size += 4 // m.DecapNextIndex 362 size += 4 // m.Vni 363 size += 1 // m.IsL3 364 return size 365 } 366 func (m *VxlanAddDelTunnelV3) Marshal(b []byte) ([]byte, error) { 367 if b == nil { 368 b = make([]byte, m.Size()) 369 } 370 buf := codec.NewBuffer(b) 371 buf.EncodeBool(m.IsAdd) 372 buf.EncodeUint32(m.Instance) 373 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 374 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 375 buf.EncodeUint8(uint8(m.DstAddress.Af)) 376 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 377 buf.EncodeUint16(m.SrcPort) 378 buf.EncodeUint16(m.DstPort) 379 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 380 buf.EncodeUint32(m.EncapVrfID) 381 buf.EncodeUint32(m.DecapNextIndex) 382 buf.EncodeUint32(m.Vni) 383 buf.EncodeBool(m.IsL3) 384 return buf.Bytes(), nil 385 } 386 func (m *VxlanAddDelTunnelV3) Unmarshal(b []byte) error { 387 buf := codec.NewBuffer(b) 388 m.IsAdd = buf.DecodeBool() 389 m.Instance = buf.DecodeUint32() 390 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 391 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 392 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 393 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 394 m.SrcPort = buf.DecodeUint16() 395 m.DstPort = buf.DecodeUint16() 396 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 397 m.EncapVrfID = buf.DecodeUint32() 398 m.DecapNextIndex = buf.DecodeUint32() 399 m.Vni = buf.DecodeUint32() 400 m.IsL3 = buf.DecodeBool() 401 return nil 402 } 403 404 // VxlanAddDelTunnelV3Reply defines message 'vxlan_add_del_tunnel_v3_reply'. 405 type VxlanAddDelTunnelV3Reply struct { 406 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 407 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 408 } 409 410 func (m *VxlanAddDelTunnelV3Reply) Reset() { *m = VxlanAddDelTunnelV3Reply{} } 411 func (*VxlanAddDelTunnelV3Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v3_reply" } 412 func (*VxlanAddDelTunnelV3Reply) GetCrcString() string { return "5383d31f" } 413 func (*VxlanAddDelTunnelV3Reply) GetMessageType() api.MessageType { 414 return api.ReplyMessage 415 } 416 417 func (m *VxlanAddDelTunnelV3Reply) Size() (size int) { 418 if m == nil { 419 return 0 420 } 421 size += 4 // m.Retval 422 size += 4 // m.SwIfIndex 423 return size 424 } 425 func (m *VxlanAddDelTunnelV3Reply) Marshal(b []byte) ([]byte, error) { 426 if b == nil { 427 b = make([]byte, m.Size()) 428 } 429 buf := codec.NewBuffer(b) 430 buf.EncodeInt32(m.Retval) 431 buf.EncodeUint32(uint32(m.SwIfIndex)) 432 return buf.Bytes(), nil 433 } 434 func (m *VxlanAddDelTunnelV3Reply) Unmarshal(b []byte) error { 435 buf := codec.NewBuffer(b) 436 m.Retval = buf.DecodeInt32() 437 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 438 return nil 439 } 440 441 // VxlanOffloadRx defines message 'vxlan_offload_rx'. 442 type VxlanOffloadRx struct { 443 HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"` 444 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 445 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` 446 } 447 448 func (m *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} } 449 func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" } 450 func (*VxlanOffloadRx) GetCrcString() string { return "9cc95087" } 451 func (*VxlanOffloadRx) GetMessageType() api.MessageType { 452 return api.RequestMessage 453 } 454 455 func (m *VxlanOffloadRx) Size() (size int) { 456 if m == nil { 457 return 0 458 } 459 size += 4 // m.HwIfIndex 460 size += 4 // m.SwIfIndex 461 size += 1 // m.Enable 462 return size 463 } 464 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) { 465 if b == nil { 466 b = make([]byte, m.Size()) 467 } 468 buf := codec.NewBuffer(b) 469 buf.EncodeUint32(uint32(m.HwIfIndex)) 470 buf.EncodeUint32(uint32(m.SwIfIndex)) 471 buf.EncodeBool(m.Enable) 472 return buf.Bytes(), nil 473 } 474 func (m *VxlanOffloadRx) Unmarshal(b []byte) error { 475 buf := codec.NewBuffer(b) 476 m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 477 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 478 m.Enable = buf.DecodeBool() 479 return nil 480 } 481 482 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'. 483 type VxlanOffloadRxReply struct { 484 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 485 } 486 487 func (m *VxlanOffloadRxReply) Reset() { *m = VxlanOffloadRxReply{} } 488 func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" } 489 func (*VxlanOffloadRxReply) GetCrcString() string { return "e8d4e804" } 490 func (*VxlanOffloadRxReply) GetMessageType() api.MessageType { 491 return api.ReplyMessage 492 } 493 494 func (m *VxlanOffloadRxReply) Size() (size int) { 495 if m == nil { 496 return 0 497 } 498 size += 4 // m.Retval 499 return size 500 } 501 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) { 502 if b == nil { 503 b = make([]byte, m.Size()) 504 } 505 buf := codec.NewBuffer(b) 506 buf.EncodeInt32(m.Retval) 507 return buf.Bytes(), nil 508 } 509 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error { 510 buf := codec.NewBuffer(b) 511 m.Retval = buf.DecodeInt32() 512 return nil 513 } 514 515 // VxlanTunnelDetails defines message 'vxlan_tunnel_details'. 516 type VxlanTunnelDetails struct { 517 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 518 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` 519 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 520 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 521 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 522 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 523 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 524 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 525 } 526 527 func (m *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} } 528 func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" } 529 func (*VxlanTunnelDetails) GetCrcString() string { return "c3916cb1" } 530 func (*VxlanTunnelDetails) GetMessageType() api.MessageType { 531 return api.ReplyMessage 532 } 533 534 func (m *VxlanTunnelDetails) Size() (size int) { 535 if m == nil { 536 return 0 537 } 538 size += 4 // m.SwIfIndex 539 size += 4 // m.Instance 540 size += 1 // m.SrcAddress.Af 541 size += 1 * 16 // m.SrcAddress.Un 542 size += 1 // m.DstAddress.Af 543 size += 1 * 16 // m.DstAddress.Un 544 size += 4 // m.McastSwIfIndex 545 size += 4 // m.EncapVrfID 546 size += 4 // m.DecapNextIndex 547 size += 4 // m.Vni 548 return size 549 } 550 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) { 551 if b == nil { 552 b = make([]byte, m.Size()) 553 } 554 buf := codec.NewBuffer(b) 555 buf.EncodeUint32(uint32(m.SwIfIndex)) 556 buf.EncodeUint32(m.Instance) 557 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 558 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 559 buf.EncodeUint8(uint8(m.DstAddress.Af)) 560 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 561 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 562 buf.EncodeUint32(m.EncapVrfID) 563 buf.EncodeUint32(m.DecapNextIndex) 564 buf.EncodeUint32(m.Vni) 565 return buf.Bytes(), nil 566 } 567 func (m *VxlanTunnelDetails) Unmarshal(b []byte) error { 568 buf := codec.NewBuffer(b) 569 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 570 m.Instance = buf.DecodeUint32() 571 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 572 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 573 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 574 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 575 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 576 m.EncapVrfID = buf.DecodeUint32() 577 m.DecapNextIndex = buf.DecodeUint32() 578 m.Vni = buf.DecodeUint32() 579 return nil 580 } 581 582 // VxlanTunnelDump defines message 'vxlan_tunnel_dump'. 583 type VxlanTunnelDump struct { 584 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 585 } 586 587 func (m *VxlanTunnelDump) Reset() { *m = VxlanTunnelDump{} } 588 func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" } 589 func (*VxlanTunnelDump) GetCrcString() string { return "f9e6675e" } 590 func (*VxlanTunnelDump) GetMessageType() api.MessageType { 591 return api.RequestMessage 592 } 593 594 func (m *VxlanTunnelDump) Size() (size int) { 595 if m == nil { 596 return 0 597 } 598 size += 4 // m.SwIfIndex 599 return size 600 } 601 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) { 602 if b == nil { 603 b = make([]byte, m.Size()) 604 } 605 buf := codec.NewBuffer(b) 606 buf.EncodeUint32(uint32(m.SwIfIndex)) 607 return buf.Bytes(), nil 608 } 609 func (m *VxlanTunnelDump) Unmarshal(b []byte) error { 610 buf := codec.NewBuffer(b) 611 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 612 return nil 613 } 614 615 // VxlanTunnelV2Details defines message 'vxlan_tunnel_v2_details'. 616 type VxlanTunnelV2Details struct { 617 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 618 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` 619 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"` 620 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` 621 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` 622 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"` 623 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 624 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 625 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"` 626 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 627 } 628 629 func (m *VxlanTunnelV2Details) Reset() { *m = VxlanTunnelV2Details{} } 630 func (*VxlanTunnelV2Details) GetMessageName() string { return "vxlan_tunnel_v2_details" } 631 func (*VxlanTunnelV2Details) GetCrcString() string { return "d3bdd4d9" } 632 func (*VxlanTunnelV2Details) GetMessageType() api.MessageType { 633 return api.ReplyMessage 634 } 635 636 func (m *VxlanTunnelV2Details) Size() (size int) { 637 if m == nil { 638 return 0 639 } 640 size += 4 // m.SwIfIndex 641 size += 4 // m.Instance 642 size += 1 // m.SrcAddress.Af 643 size += 1 * 16 // m.SrcAddress.Un 644 size += 1 // m.DstAddress.Af 645 size += 1 * 16 // m.DstAddress.Un 646 size += 2 // m.SrcPort 647 size += 2 // m.DstPort 648 size += 4 // m.McastSwIfIndex 649 size += 4 // m.EncapVrfID 650 size += 4 // m.DecapNextIndex 651 size += 4 // m.Vni 652 return size 653 } 654 func (m *VxlanTunnelV2Details) Marshal(b []byte) ([]byte, error) { 655 if b == nil { 656 b = make([]byte, m.Size()) 657 } 658 buf := codec.NewBuffer(b) 659 buf.EncodeUint32(uint32(m.SwIfIndex)) 660 buf.EncodeUint32(m.Instance) 661 buf.EncodeUint8(uint8(m.SrcAddress.Af)) 662 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16) 663 buf.EncodeUint8(uint8(m.DstAddress.Af)) 664 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16) 665 buf.EncodeUint16(m.SrcPort) 666 buf.EncodeUint16(m.DstPort) 667 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 668 buf.EncodeUint32(m.EncapVrfID) 669 buf.EncodeUint32(m.DecapNextIndex) 670 buf.EncodeUint32(m.Vni) 671 return buf.Bytes(), nil 672 } 673 func (m *VxlanTunnelV2Details) Unmarshal(b []byte) error { 674 buf := codec.NewBuffer(b) 675 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 676 m.Instance = buf.DecodeUint32() 677 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 678 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 679 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) 680 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 681 m.SrcPort = buf.DecodeUint16() 682 m.DstPort = buf.DecodeUint16() 683 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 684 m.EncapVrfID = buf.DecodeUint32() 685 m.DecapNextIndex = buf.DecodeUint32() 686 m.Vni = buf.DecodeUint32() 687 return nil 688 } 689 690 // VxlanTunnelV2Dump defines message 'vxlan_tunnel_v2_dump'. 691 type VxlanTunnelV2Dump struct { 692 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 693 } 694 695 func (m *VxlanTunnelV2Dump) Reset() { *m = VxlanTunnelV2Dump{} } 696 func (*VxlanTunnelV2Dump) GetMessageName() string { return "vxlan_tunnel_v2_dump" } 697 func (*VxlanTunnelV2Dump) GetCrcString() string { return "f9e6675e" } 698 func (*VxlanTunnelV2Dump) GetMessageType() api.MessageType { 699 return api.RequestMessage 700 } 701 702 func (m *VxlanTunnelV2Dump) Size() (size int) { 703 if m == nil { 704 return 0 705 } 706 size += 4 // m.SwIfIndex 707 return size 708 } 709 func (m *VxlanTunnelV2Dump) Marshal(b []byte) ([]byte, error) { 710 if b == nil { 711 b = make([]byte, m.Size()) 712 } 713 buf := codec.NewBuffer(b) 714 buf.EncodeUint32(uint32(m.SwIfIndex)) 715 return buf.Bytes(), nil 716 } 717 func (m *VxlanTunnelV2Dump) Unmarshal(b []byte) error { 718 buf := codec.NewBuffer(b) 719 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 720 return nil 721 } 722 723 func init() { file_vxlan_binapi_init() } 724 func file_vxlan_binapi_init() { 725 api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409") 726 api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804") 727 api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_0c09dc80") 728 api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f") 729 api.RegisterMessage((*VxlanAddDelTunnelV2)(nil), "vxlan_add_del_tunnel_v2_4f223f40") 730 api.RegisterMessage((*VxlanAddDelTunnelV2Reply)(nil), "vxlan_add_del_tunnel_v2_reply_5383d31f") 731 api.RegisterMessage((*VxlanAddDelTunnelV3)(nil), "vxlan_add_del_tunnel_v3_0072b037") 732 api.RegisterMessage((*VxlanAddDelTunnelV3Reply)(nil), "vxlan_add_del_tunnel_v3_reply_5383d31f") 733 api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_9cc95087") 734 api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804") 735 api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_c3916cb1") 736 api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e") 737 api.RegisterMessage((*VxlanTunnelV2Details)(nil), "vxlan_tunnel_v2_details_d3bdd4d9") 738 api.RegisterMessage((*VxlanTunnelV2Dump)(nil), "vxlan_tunnel_v2_dump_f9e6675e") 739 } 740 741 // Messages returns list of all messages in this module. 742 func AllMessages() []api.Message { 743 return []api.Message{ 744 (*SwInterfaceSetVxlanBypass)(nil), 745 (*SwInterfaceSetVxlanBypassReply)(nil), 746 (*VxlanAddDelTunnel)(nil), 747 (*VxlanAddDelTunnelReply)(nil), 748 (*VxlanAddDelTunnelV2)(nil), 749 (*VxlanAddDelTunnelV2Reply)(nil), 750 (*VxlanAddDelTunnelV3)(nil), 751 (*VxlanAddDelTunnelV3Reply)(nil), 752 (*VxlanOffloadRx)(nil), 753 (*VxlanOffloadRxReply)(nil), 754 (*VxlanTunnelDetails)(nil), 755 (*VxlanTunnelDump)(nil), 756 (*VxlanTunnelV2Details)(nil), 757 (*VxlanTunnelV2Dump)(nil), 758 } 759 }