go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/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 // - 6 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/vpp2106/interface_types" 13 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/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.0.0" 25 VersionCrc = 0x7a970d0b 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 // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'. 211 type VxlanGpeTunnelDetails struct { 212 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 213 Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` 214 Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` 215 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 216 Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` 217 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` 218 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` 219 DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` 220 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 221 } 222 223 func (m *VxlanGpeTunnelDetails) Reset() { *m = VxlanGpeTunnelDetails{} } 224 func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" } 225 func (*VxlanGpeTunnelDetails) GetCrcString() string { return "0968fc8b" } 226 func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType { 227 return api.ReplyMessage 228 } 229 230 func (m *VxlanGpeTunnelDetails) Size() (size int) { 231 if m == nil { 232 return 0 233 } 234 size += 4 // m.SwIfIndex 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 += 4 // m.Vni 240 size += 1 // m.Protocol 241 size += 4 // m.McastSwIfIndex 242 size += 4 // m.EncapVrfID 243 size += 4 // m.DecapVrfID 244 size += 1 // m.IsIPv6 245 return size 246 } 247 func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) { 248 if b == nil { 249 b = make([]byte, m.Size()) 250 } 251 buf := codec.NewBuffer(b) 252 buf.EncodeUint32(uint32(m.SwIfIndex)) 253 buf.EncodeUint8(uint8(m.Local.Af)) 254 buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) 255 buf.EncodeUint8(uint8(m.Remote.Af)) 256 buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) 257 buf.EncodeUint32(m.Vni) 258 buf.EncodeUint8(uint8(m.Protocol)) 259 buf.EncodeUint32(uint32(m.McastSwIfIndex)) 260 buf.EncodeUint32(m.EncapVrfID) 261 buf.EncodeUint32(m.DecapVrfID) 262 buf.EncodeBool(m.IsIPv6) 263 return buf.Bytes(), nil 264 } 265 func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error { 266 buf := codec.NewBuffer(b) 267 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 268 m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) 269 copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 270 m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) 271 copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 272 m.Vni = buf.DecodeUint32() 273 m.Protocol = ip_types.IPProto(buf.DecodeUint8()) 274 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 275 m.EncapVrfID = buf.DecodeUint32() 276 m.DecapVrfID = buf.DecodeUint32() 277 m.IsIPv6 = buf.DecodeBool() 278 return nil 279 } 280 281 // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'. 282 type VxlanGpeTunnelDump struct { 283 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 284 } 285 286 func (m *VxlanGpeTunnelDump) Reset() { *m = VxlanGpeTunnelDump{} } 287 func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" } 288 func (*VxlanGpeTunnelDump) GetCrcString() string { return "f9e6675e" } 289 func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType { 290 return api.RequestMessage 291 } 292 293 func (m *VxlanGpeTunnelDump) Size() (size int) { 294 if m == nil { 295 return 0 296 } 297 size += 4 // m.SwIfIndex 298 return size 299 } 300 func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) { 301 if b == nil { 302 b = make([]byte, m.Size()) 303 } 304 buf := codec.NewBuffer(b) 305 buf.EncodeUint32(uint32(m.SwIfIndex)) 306 return buf.Bytes(), nil 307 } 308 func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error { 309 buf := codec.NewBuffer(b) 310 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 311 return nil 312 } 313 314 func init() { file_vxlan_gpe_binapi_init() } 315 func file_vxlan_gpe_binapi_init() { 316 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409") 317 api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804") 318 api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0") 319 api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f") 320 api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b") 321 api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e") 322 } 323 324 // Messages returns list of all messages in this module. 325 func AllMessages() []api.Message { 326 return []api.Message{ 327 (*SwInterfaceSetVxlanGpeBypass)(nil), 328 (*SwInterfaceSetVxlanGpeBypassReply)(nil), 329 (*VxlanGpeAddDelTunnel)(nil), 330 (*VxlanGpeAddDelTunnelReply)(nil), 331 (*VxlanGpeTunnelDetails)(nil), 332 (*VxlanGpeTunnelDump)(nil), 333 } 334 }