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