go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2202/vxlan_gpe/vxlan_gpe.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api. 4 // 5 // Contents: 6 // - 10 messages 7 package vxlan_gpe 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/vpp2202/interface_types" 13 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/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_gpe" 24 APIVersion = "2.1.0" 25 VersionCrc = 0x3bc06278 26 ) 27 28 // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'. 29 type SwInterfaceSetVxlanGpeBypass 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 *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} } 36 func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string { 37 return "sw_interface_set_vxlan_gpe_bypass" 38 } 39 func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "65247409" } 40 func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType { 41 return api.RequestMessage 42 } 43 44 func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) { 45 if m == nil { 46 return 0 47 } 48 size += 4 // m.SwIfIndex 49 size += 1 // m.IsIPv6 50 size += 1 // m.Enable 51 return size 52 } 53 func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) { 54 if b == nil { 55 b = make([]byte, m.Size()) 56 } 57 buf := codec.NewBuffer(b) 58 buf.EncodeUint32(uint32(m.SwIfIndex)) 59 buf.EncodeBool(m.IsIPv6) 60 buf.EncodeBool(m.Enable) 61 return buf.Bytes(), nil 62 } 63 func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error { 64 buf := codec.NewBuffer(b) 65 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 66 m.IsIPv6 = buf.DecodeBool() 67 m.Enable = buf.DecodeBool() 68 return nil 69 } 70 71 // SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'. 72 type SwInterfaceSetVxlanGpeBypassReply struct { 73 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 74 } 75 76 func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} } 77 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string { 78 return "sw_interface_set_vxlan_gpe_bypass_reply" 79 } 80 func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" } 81 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType { 82 return api.ReplyMessage 83 } 84 85 func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) { 86 if m == nil { 87 return 0 88 } 89 size += 4 // m.Retval 90 return size 91 } 92 func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) { 93 if b == nil { 94 b = make([]byte, m.Size()) 95 } 96 buf := codec.NewBuffer(b) 97 buf.EncodeInt32(m.Retval) 98 return buf.Bytes(), nil 99 } 100 func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error { 101 buf := codec.NewBuffer(b) 102 m.Retval = buf.DecodeInt32() 103 return nil 104 } 105 106 // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'. 107 type VxlanGpeAddDelTunnel struct { 108 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` 109 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,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 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` 113 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` 114 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 115 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 116 } 117 118 func (m *VxlanGpeAddDelTunnel) Reset() { *m = VxlanGpeAddDelTunnel{} } 119 func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" } 120 func (*VxlanGpeAddDelTunnel) GetCrcString() string { return "a645b2b0" } 121 func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType { 122 return api.RequestMessage 123 } 124 125 func (m *VxlanGpeAddDelTunnel) Size() (size int) { 126 if m == nil { 127 return 0 128 } 129 size += 1 // m.Local.Af 130 size += 1 * 16 // m.Local.Un 131 size += 1 // m.Remote.Af 132 size += 1 * 16 // m.Remote.Un 133 size += 4 // m.McastSwIfIndex 134 size += 4 // m.EncapVrfID 135 size += 4 // m.DecapVrfID 136 size += 1 // m.Protocol 137 size += 4 // m.Vni 138 size += 1 // m.IsAdd 139 return size 140 } 141 func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) { 142 if b == nil { 143 b = make([]byte, m.Size()) 144 } 145 buf := codec.NewBuffer(b) 146 buf.EncodeUint8(uint8(m.Local.Af)) 147 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) 148 buf.EncodeUint8(uint8(m.Remote.Af)) 149 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) 150 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 151 buf.EncodeUint32(m.EncapVrfID) 152 buf.EncodeUint32(m.DecapVrfID) 153 buf.EncodeUint8(uint8(m.Protocol)) 154 buf.EncodeUint32(m.Vni) 155 buf.EncodeBool(m.IsAdd) 156 return buf.Bytes(), nil 157 } 158 func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error { 159 buf := codec.NewBuffer(b) 160 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) 161 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 162 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) 163 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 164 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 165 m.EncapVrfID = buf.DecodeUint32() 166 m.DecapVrfID = buf.DecodeUint32() 167 m.Protocol = ip_types.IPProto(buf.DecodeUint8()) 168 m.Vni = buf.DecodeUint32() 169 m.IsAdd = buf.DecodeBool() 170 return nil 171 } 172 173 // VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'. 174 type VxlanGpeAddDelTunnelReply struct { 175 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 176 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 177 } 178 179 func (m *VxlanGpeAddDelTunnelReply) Reset() { *m = VxlanGpeAddDelTunnelReply{} } 180 func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" } 181 func (*VxlanGpeAddDelTunnelReply) GetCrcString() string { return "5383d31f" } 182 func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType { 183 return api.ReplyMessage 184 } 185 186 func (m *VxlanGpeAddDelTunnelReply) Size() (size int) { 187 if m == nil { 188 return 0 189 } 190 size += 4 // m.Retval 191 size += 4 // m.SwIfIndex 192 return size 193 } 194 func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) { 195 if b == nil { 196 b = make([]byte, m.Size()) 197 } 198 buf := codec.NewBuffer(b) 199 buf.EncodeInt32(m.Retval) 200 buf.EncodeUint32(uint32(m.SwIfIndex)) 201 return buf.Bytes(), nil 202 } 203 func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error { 204 buf := codec.NewBuffer(b) 205 m.Retval = buf.DecodeInt32() 206 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 207 return nil 208 } 209 210 // VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'. 211 type VxlanGpeAddDelTunnelV2 struct { 212 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` 213 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` 214 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 215 RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"` 216 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 217 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 218 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` 219 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` 220 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 221 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 222 } 223 224 func (m *VxlanGpeAddDelTunnelV2) Reset() { *m = VxlanGpeAddDelTunnelV2{} } 225 func (*VxlanGpeAddDelTunnelV2) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_v2" } 226 func (*VxlanGpeAddDelTunnelV2) GetCrcString() string { return "d62fdb35" } 227 func (*VxlanGpeAddDelTunnelV2) GetMessageType() api.MessageType { 228 return api.RequestMessage 229 } 230 231 func (m *VxlanGpeAddDelTunnelV2) Size() (size int) { 232 if m == nil { 233 return 0 234 } 235 size += 1 // m.Local.Af 236 size += 1 * 16 // m.Local.Un 237 size += 1 // m.Remote.Af 238 size += 1 * 16 // m.Remote.Un 239 size += 2 // m.LocalPort 240 size += 2 // m.RemotePort 241 size += 4 // m.McastSwIfIndex 242 size += 4 // m.EncapVrfID 243 size += 4 // m.DecapVrfID 244 size += 1 // m.Protocol 245 size += 4 // m.Vni 246 size += 1 // m.IsAdd 247 return size 248 } 249 func (m *VxlanGpeAddDelTunnelV2) Marshal(b []byte) ([]byte, error) { 250 if b == nil { 251 b = make([]byte, m.Size()) 252 } 253 buf := codec.NewBuffer(b) 254 buf.EncodeUint8(uint8(m.Local.Af)) 255 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) 256 buf.EncodeUint8(uint8(m.Remote.Af)) 257 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) 258 buf.EncodeUint16(m.LocalPort) 259 buf.EncodeUint16(m.RemotePort) 260 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 261 buf.EncodeUint32(m.EncapVrfID) 262 buf.EncodeUint32(m.DecapVrfID) 263 buf.EncodeUint8(uint8(m.Protocol)) 264 buf.EncodeUint32(m.Vni) 265 buf.EncodeBool(m.IsAdd) 266 return buf.Bytes(), nil 267 } 268 func (m *VxlanGpeAddDelTunnelV2) Unmarshal(b []byte) error { 269 buf := codec.NewBuffer(b) 270 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) 271 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 272 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) 273 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 274 m.LocalPort = buf.DecodeUint16() 275 m.RemotePort = buf.DecodeUint16() 276 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 277 m.EncapVrfID = buf.DecodeUint32() 278 m.DecapVrfID = buf.DecodeUint32() 279 m.Protocol = ip_types.IPProto(buf.DecodeUint8()) 280 m.Vni = buf.DecodeUint32() 281 m.IsAdd = buf.DecodeBool() 282 return nil 283 } 284 285 // VxlanGpeAddDelTunnelV2Reply defines message 'vxlan_gpe_add_del_tunnel_v2_reply'. 286 type VxlanGpeAddDelTunnelV2Reply struct { 287 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 288 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 289 } 290 291 func (m *VxlanGpeAddDelTunnelV2Reply) Reset() { *m = VxlanGpeAddDelTunnelV2Reply{} } 292 func (*VxlanGpeAddDelTunnelV2Reply) GetMessageName() string { 293 return "vxlan_gpe_add_del_tunnel_v2_reply" 294 } 295 func (*VxlanGpeAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" } 296 func (*VxlanGpeAddDelTunnelV2Reply) GetMessageType() api.MessageType { 297 return api.ReplyMessage 298 } 299 300 func (m *VxlanGpeAddDelTunnelV2Reply) Size() (size int) { 301 if m == nil { 302 return 0 303 } 304 size += 4 // m.Retval 305 size += 4 // m.SwIfIndex 306 return size 307 } 308 func (m *VxlanGpeAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) { 309 if b == nil { 310 b = make([]byte, m.Size()) 311 } 312 buf := codec.NewBuffer(b) 313 buf.EncodeInt32(m.Retval) 314 buf.EncodeUint32(uint32(m.SwIfIndex)) 315 return buf.Bytes(), nil 316 } 317 func (m *VxlanGpeAddDelTunnelV2Reply) Unmarshal(b []byte) error { 318 buf := codec.NewBuffer(b) 319 m.Retval = buf.DecodeInt32() 320 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 321 return nil 322 } 323 324 // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'. 325 type VxlanGpeTunnelDetails struct { 326 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 327 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` 328 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` 329 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 330 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` 331 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 332 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 333 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` 334 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 335 } 336 337 func (m *VxlanGpeTunnelDetails) Reset() { *m = VxlanGpeTunnelDetails{} } 338 func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" } 339 func (*VxlanGpeTunnelDetails) GetCrcString() string { return "0968fc8b" } 340 func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType { 341 return api.ReplyMessage 342 } 343 344 func (m *VxlanGpeTunnelDetails) Size() (size int) { 345 if m == nil { 346 return 0 347 } 348 size += 4 // m.SwIfIndex 349 size += 1 // m.Local.Af 350 size += 1 * 16 // m.Local.Un 351 size += 1 // m.Remote.Af 352 size += 1 * 16 // m.Remote.Un 353 size += 4 // m.Vni 354 size += 1 // m.Protocol 355 size += 4 // m.McastSwIfIndex 356 size += 4 // m.EncapVrfID 357 size += 4 // m.DecapVrfID 358 size += 1 // m.IsIPv6 359 return size 360 } 361 func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) { 362 if b == nil { 363 b = make([]byte, m.Size()) 364 } 365 buf := codec.NewBuffer(b) 366 buf.EncodeUint32(uint32(m.SwIfIndex)) 367 buf.EncodeUint8(uint8(m.Local.Af)) 368 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) 369 buf.EncodeUint8(uint8(m.Remote.Af)) 370 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) 371 buf.EncodeUint32(m.Vni) 372 buf.EncodeUint8(uint8(m.Protocol)) 373 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 374 buf.EncodeUint32(m.EncapVrfID) 375 buf.EncodeUint32(m.DecapVrfID) 376 buf.EncodeBool(m.IsIPv6) 377 return buf.Bytes(), nil 378 } 379 func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error { 380 buf := codec.NewBuffer(b) 381 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 382 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) 383 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 384 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) 385 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 386 m.Vni = buf.DecodeUint32() 387 m.Protocol = ip_types.IPProto(buf.DecodeUint8()) 388 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 389 m.EncapVrfID = buf.DecodeUint32() 390 m.DecapVrfID = buf.DecodeUint32() 391 m.IsIPv6 = buf.DecodeBool() 392 return nil 393 } 394 395 // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'. 396 type VxlanGpeTunnelDump struct { 397 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 398 } 399 400 func (m *VxlanGpeTunnelDump) Reset() { *m = VxlanGpeTunnelDump{} } 401 func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" } 402 func (*VxlanGpeTunnelDump) GetCrcString() string { return "f9e6675e" } 403 func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType { 404 return api.RequestMessage 405 } 406 407 func (m *VxlanGpeTunnelDump) Size() (size int) { 408 if m == nil { 409 return 0 410 } 411 size += 4 // m.SwIfIndex 412 return size 413 } 414 func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) { 415 if b == nil { 416 b = make([]byte, m.Size()) 417 } 418 buf := codec.NewBuffer(b) 419 buf.EncodeUint32(uint32(m.SwIfIndex)) 420 return buf.Bytes(), nil 421 } 422 func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error { 423 buf := codec.NewBuffer(b) 424 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 425 return nil 426 } 427 428 // VxlanGpeTunnelV2Details defines message 'vxlan_gpe_tunnel_v2_details'. 429 type VxlanGpeTunnelV2Details struct { 430 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 431 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` 432 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` 433 LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` 434 RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"` 435 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 436 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` 437 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 438 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 439 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` 440 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 441 } 442 443 func (m *VxlanGpeTunnelV2Details) Reset() { *m = VxlanGpeTunnelV2Details{} } 444 func (*VxlanGpeTunnelV2Details) GetMessageName() string { return "vxlan_gpe_tunnel_v2_details" } 445 func (*VxlanGpeTunnelV2Details) GetCrcString() string { return "06be4870" } 446 func (*VxlanGpeTunnelV2Details) GetMessageType() api.MessageType { 447 return api.ReplyMessage 448 } 449 450 func (m *VxlanGpeTunnelV2Details) Size() (size int) { 451 if m == nil { 452 return 0 453 } 454 size += 4 // m.SwIfIndex 455 size += 1 // m.Local.Af 456 size += 1 * 16 // m.Local.Un 457 size += 1 // m.Remote.Af 458 size += 1 * 16 // m.Remote.Un 459 size += 2 // m.LocalPort 460 size += 2 // m.RemotePort 461 size += 4 // m.Vni 462 size += 1 // m.Protocol 463 size += 4 // m.McastSwIfIndex 464 size += 4 // m.EncapVrfID 465 size += 4 // m.DecapVrfID 466 size += 1 // m.IsIPv6 467 return size 468 } 469 func (m *VxlanGpeTunnelV2Details) Marshal(b []byte) ([]byte, error) { 470 if b == nil { 471 b = make([]byte, m.Size()) 472 } 473 buf := codec.NewBuffer(b) 474 buf.EncodeUint32(uint32(m.SwIfIndex)) 475 buf.EncodeUint8(uint8(m.Local.Af)) 476 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) 477 buf.EncodeUint8(uint8(m.Remote.Af)) 478 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) 479 buf.EncodeUint16(m.LocalPort) 480 buf.EncodeUint16(m.RemotePort) 481 buf.EncodeUint32(m.Vni) 482 buf.EncodeUint8(uint8(m.Protocol)) 483 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 484 buf.EncodeUint32(m.EncapVrfID) 485 buf.EncodeUint32(m.DecapVrfID) 486 buf.EncodeBool(m.IsIPv6) 487 return buf.Bytes(), nil 488 } 489 func (m *VxlanGpeTunnelV2Details) Unmarshal(b []byte) error { 490 buf := codec.NewBuffer(b) 491 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 492 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) 493 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 494 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) 495 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 496 m.LocalPort = buf.DecodeUint16() 497 m.RemotePort = buf.DecodeUint16() 498 m.Vni = buf.DecodeUint32() 499 m.Protocol = ip_types.IPProto(buf.DecodeUint8()) 500 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 501 m.EncapVrfID = buf.DecodeUint32() 502 m.DecapVrfID = buf.DecodeUint32() 503 m.IsIPv6 = buf.DecodeBool() 504 return nil 505 } 506 507 // VxlanGpeTunnelV2Dump defines message 'vxlan_gpe_tunnel_v2_dump'. 508 type VxlanGpeTunnelV2Dump struct { 509 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 510 } 511 512 func (m *VxlanGpeTunnelV2Dump) Reset() { *m = VxlanGpeTunnelV2Dump{} } 513 func (*VxlanGpeTunnelV2Dump) GetMessageName() string { return "vxlan_gpe_tunnel_v2_dump" } 514 func (*VxlanGpeTunnelV2Dump) GetCrcString() string { return "f9e6675e" } 515 func (*VxlanGpeTunnelV2Dump) GetMessageType() api.MessageType { 516 return api.RequestMessage 517 } 518 519 func (m *VxlanGpeTunnelV2Dump) Size() (size int) { 520 if m == nil { 521 return 0 522 } 523 size += 4 // m.SwIfIndex 524 return size 525 } 526 func (m *VxlanGpeTunnelV2Dump) Marshal(b []byte) ([]byte, error) { 527 if b == nil { 528 b = make([]byte, m.Size()) 529 } 530 buf := codec.NewBuffer(b) 531 buf.EncodeUint32(uint32(m.SwIfIndex)) 532 return buf.Bytes(), nil 533 } 534 func (m *VxlanGpeTunnelV2Dump) Unmarshal(b []byte) error { 535 buf := codec.NewBuffer(b) 536 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 537 return nil 538 } 539 540 func init() { file_vxlan_gpe_binapi_init() } 541 func file_vxlan_gpe_binapi_init() { 542 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409") 543 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804") 544 api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0") 545 api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f") 546 api.RegisterMessage((*VxlanGpeAddDelTunnelV2)(nil), "vxlan_gpe_add_del_tunnel_v2_d62fdb35") 547 api.RegisterMessage((*VxlanGpeAddDelTunnelV2Reply)(nil), "vxlan_gpe_add_del_tunnel_v2_reply_5383d31f") 548 api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b") 549 api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e") 550 api.RegisterMessage((*VxlanGpeTunnelV2Details)(nil), "vxlan_gpe_tunnel_v2_details_06be4870") 551 api.RegisterMessage((*VxlanGpeTunnelV2Dump)(nil), "vxlan_gpe_tunnel_v2_dump_f9e6675e") 552 } 553 554 // Messages returns list of all messages in this module. 555 func AllMessages() []api.Message { 556 return []api.Message{ 557 (*SwInterfaceSetVxlanGpeBypass)(nil), 558 (*SwInterfaceSetVxlanGpeBypassReply)(nil), 559 (*VxlanGpeAddDelTunnel)(nil), 560 (*VxlanGpeAddDelTunnelReply)(nil), 561 (*VxlanGpeAddDelTunnelV2)(nil), 562 (*VxlanGpeAddDelTunnelV2Reply)(nil), 563 (*VxlanGpeTunnelDetails)(nil), 564 (*VxlanGpeTunnelDump)(nil), 565 (*VxlanGpeTunnelV2Details)(nil), 566 (*VxlanGpeTunnelV2Dump)(nil), 567 } 568 }