1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: /usr/share/vpp/api/plugins/gbp.api.json
7 // Package gbp contains generated bindings for API file gbp.api.
20 api "git.fd.io/govpp.git/api"
21 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
22 interface_types "git.fd.io/govpp.git/binapi/interface_types"
23 ip_types "git.fd.io/govpp.git/binapi/ip_types"
24 codec "git.fd.io/govpp.git/codec"
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
39 // GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
40 type GbpBridgeDomainFlags uint32
43 GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
44 GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
45 GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
46 GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
47 GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
51 GbpBridgeDomainFlags_name = map[uint32]string{
52 0: "GBP_BD_API_FLAG_NONE",
53 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
54 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
55 4: "GBP_BD_API_FLAG_MCAST_DROP",
56 8: "GBP_BD_API_FLAG_UCAST_ARP",
58 GbpBridgeDomainFlags_value = map[string]uint32{
59 "GBP_BD_API_FLAG_NONE": 0,
60 "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
61 "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
62 "GBP_BD_API_FLAG_MCAST_DROP": 4,
63 "GBP_BD_API_FLAG_UCAST_ARP": 8,
67 func (x GbpBridgeDomainFlags) String() string {
68 s, ok := GbpBridgeDomainFlags_name[uint32(x)]
72 str := func(n uint32) string {
73 s, ok := GbpBridgeDomainFlags_name[uint32(n)]
77 return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
79 for i := uint32(0); i <= 32; i++ {
94 // GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
95 type GbpEndpointFlags uint32
98 GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
99 GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
100 GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
101 GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
102 GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
106 GbpEndpointFlags_name = map[uint32]string{
107 0: "GBP_API_ENDPOINT_FLAG_NONE",
108 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
109 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
110 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
111 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
113 GbpEndpointFlags_value = map[string]uint32{
114 "GBP_API_ENDPOINT_FLAG_NONE": 0,
115 "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
116 "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
117 "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
118 "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
122 func (x GbpEndpointFlags) String() string {
123 s, ok := GbpEndpointFlags_name[uint32(x)]
127 str := func(n uint32) string {
128 s, ok := GbpEndpointFlags_name[uint32(n)]
132 return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
134 for i := uint32(0); i <= 32; i++ {
144 return str(uint32(x))
149 // GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
150 type GbpExtItfFlags uint32
153 GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
154 GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
158 GbpExtItfFlags_name = map[uint32]string{
159 0: "GBP_API_EXT_ITF_F_NONE",
160 1: "GBP_API_EXT_ITF_F_ANON",
162 GbpExtItfFlags_value = map[string]uint32{
163 "GBP_API_EXT_ITF_F_NONE": 0,
164 "GBP_API_EXT_ITF_F_ANON": 1,
168 func (x GbpExtItfFlags) String() string {
169 s, ok := GbpExtItfFlags_name[uint32(x)]
173 str := func(n uint32) string {
174 s, ok := GbpExtItfFlags_name[uint32(n)]
178 return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
180 for i := uint32(0); i <= 32; i++ {
190 return str(uint32(x))
195 // GbpHashMode defines enum 'gbp_hash_mode'.
196 type GbpHashMode uint32
199 GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
200 GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
201 GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
205 GbpHashMode_name = map[uint32]string{
206 1: "GBP_API_HASH_MODE_SRC_IP",
207 2: "GBP_API_HASH_MODE_DST_IP",
208 3: "GBP_API_HASH_MODE_SYMMETRIC",
210 GbpHashMode_value = map[string]uint32{
211 "GBP_API_HASH_MODE_SRC_IP": 1,
212 "GBP_API_HASH_MODE_DST_IP": 2,
213 "GBP_API_HASH_MODE_SYMMETRIC": 3,
217 func (x GbpHashMode) String() string {
218 s, ok := GbpHashMode_name[uint32(x)]
222 return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
225 // GbpRuleAction defines enum 'gbp_rule_action'.
226 type GbpRuleAction uint32
229 GBP_API_RULE_PERMIT GbpRuleAction = 1
230 GBP_API_RULE_DENY GbpRuleAction = 2
231 GBP_API_RULE_REDIRECT GbpRuleAction = 3
235 GbpRuleAction_name = map[uint32]string{
236 1: "GBP_API_RULE_PERMIT",
237 2: "GBP_API_RULE_DENY",
238 3: "GBP_API_RULE_REDIRECT",
240 GbpRuleAction_value = map[string]uint32{
241 "GBP_API_RULE_PERMIT": 1,
242 "GBP_API_RULE_DENY": 2,
243 "GBP_API_RULE_REDIRECT": 3,
247 func (x GbpRuleAction) String() string {
248 s, ok := GbpRuleAction_name[uint32(x)]
252 return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
255 // GbpSubnetType defines enum 'gbp_subnet_type'.
256 type GbpSubnetType uint32
259 GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
260 GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
261 GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
262 GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
263 GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
267 GbpSubnetType_name = map[uint32]string{
268 1: "GBP_API_SUBNET_TRANSPORT",
269 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
270 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
271 4: "GBP_API_SUBNET_L3_OUT",
272 5: "GBP_API_SUBNET_ANON_L3_OUT",
274 GbpSubnetType_value = map[string]uint32{
275 "GBP_API_SUBNET_TRANSPORT": 1,
276 "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
277 "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
278 "GBP_API_SUBNET_L3_OUT": 4,
279 "GBP_API_SUBNET_ANON_L3_OUT": 5,
283 func (x GbpSubnetType) String() string {
284 s, ok := GbpSubnetType_name[uint32(x)]
288 return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
291 // GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
292 type GbpVxlanTunnelMode uint32
295 GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
296 GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
300 GbpVxlanTunnelMode_name = map[uint32]string{
301 1: "GBP_VXLAN_TUNNEL_MODE_L2",
302 2: "GBP_VXLAN_TUNNEL_MODE_L3",
304 GbpVxlanTunnelMode_value = map[string]uint32{
305 "GBP_VXLAN_TUNNEL_MODE_L2": 1,
306 "GBP_VXLAN_TUNNEL_MODE_L3": 2,
310 func (x GbpVxlanTunnelMode) String() string {
311 s, ok := GbpVxlanTunnelMode_name[uint32(x)]
315 return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
318 // GbpScope defines alias 'gbp_scope'.
321 // GbpBridgeDomain defines type 'gbp_bridge_domain'.
322 type GbpBridgeDomain struct {
323 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
324 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
325 Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
326 BviSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
327 UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
328 BmFloodSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
331 // GbpContract defines type 'gbp_contract'.
332 type GbpContract struct {
333 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
334 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
335 Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
336 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
337 NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
338 AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
339 NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
340 Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
343 // GbpEndpoint defines type 'gbp_endpoint'.
344 type GbpEndpoint struct {
345 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
346 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
347 Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
348 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
349 Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
350 NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
351 Ips []ip_types.Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
354 // GbpEndpointGroup defines type 'gbp_endpoint_group'.
355 type GbpEndpointGroup struct {
356 Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
357 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
358 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
359 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
360 UplinkSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
361 Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
364 // GbpEndpointRetention defines type 'gbp_endpoint_retention'.
365 type GbpEndpointRetention struct {
366 RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
369 // GbpEndpointTun defines type 'gbp_endpoint_tun'.
370 type GbpEndpointTun struct {
371 Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
372 Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
375 // GbpExtItf defines type 'gbp_ext_itf'.
376 type GbpExtItf struct {
377 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
378 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
379 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
380 Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
383 // GbpNextHop defines type 'gbp_next_hop'.
384 type GbpNextHop struct {
385 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
386 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
387 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
388 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
391 // GbpNextHopSet defines type 'gbp_next_hop_set'.
392 type GbpNextHopSet struct {
393 HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
394 NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
395 Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
398 // GbpRecirc defines type 'gbp_recirc'.
399 type GbpRecirc struct {
400 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
401 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
402 IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
405 // GbpRouteDomain defines type 'gbp_route_domain'.
406 type GbpRouteDomain struct {
407 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
408 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
409 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
410 IP4UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
411 IP6UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
412 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
415 // GbpRule defines type 'gbp_rule'.
416 type GbpRule struct {
417 Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
418 NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
421 // GbpSubnet defines type 'gbp_subnet'.
422 type GbpSubnet struct {
423 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
424 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
425 Sclass uint16 `binapi:"u16,name=sclass,default=4294967295" json:"sclass,omitempty"`
426 Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
427 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
430 // GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
431 type GbpVxlanTunnel struct {
432 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
433 Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
434 BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
435 Src ip_types.IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
438 // GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
439 // InProgress: the message form may change in the future versions
440 type GbpBridgeDomainAdd struct {
441 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
444 func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
445 func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
446 func (*GbpBridgeDomainAdd) GetCrcString() string { return "918e8c01" }
447 func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
448 return api.RequestMessage
451 func (m *GbpBridgeDomainAdd) Size() (size int) {
455 size += 4 // m.Bd.BdID
456 size += 4 // m.Bd.RdID
457 size += 4 // m.Bd.Flags
458 size += 4 // m.Bd.BviSwIfIndex
459 size += 4 // m.Bd.UuFwdSwIfIndex
460 size += 4 // m.Bd.BmFloodSwIfIndex
463 func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
465 b = make([]byte, m.Size())
467 buf := codec.NewBuffer(b)
468 buf.EncodeUint32(m.Bd.BdID)
469 buf.EncodeUint32(m.Bd.RdID)
470 buf.EncodeUint32(uint32(m.Bd.Flags))
471 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
472 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
473 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
474 return buf.Bytes(), nil
476 func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
477 buf := codec.NewBuffer(b)
478 m.Bd.BdID = buf.DecodeUint32()
479 m.Bd.RdID = buf.DecodeUint32()
480 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
481 m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
482 m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
483 m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
487 // GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
488 // InProgress: the message form may change in the future versions
489 type GbpBridgeDomainAddReply struct {
490 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
493 func (m *GbpBridgeDomainAddReply) Reset() { *m = GbpBridgeDomainAddReply{} }
494 func (*GbpBridgeDomainAddReply) GetMessageName() string { return "gbp_bridge_domain_add_reply" }
495 func (*GbpBridgeDomainAddReply) GetCrcString() string { return "e8d4e804" }
496 func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType {
497 return api.ReplyMessage
500 func (m *GbpBridgeDomainAddReply) Size() (size int) {
504 size += 4 // m.Retval
507 func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) {
509 b = make([]byte, m.Size())
511 buf := codec.NewBuffer(b)
512 buf.EncodeInt32(m.Retval)
513 return buf.Bytes(), nil
515 func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
516 buf := codec.NewBuffer(b)
517 m.Retval = buf.DecodeInt32()
521 // GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
522 // InProgress: the message form may change in the future versions
523 type GbpBridgeDomainDel struct {
524 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
527 func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
528 func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
529 func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
530 func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
531 return api.RequestMessage
534 func (m *GbpBridgeDomainDel) Size() (size int) {
541 func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
543 b = make([]byte, m.Size())
545 buf := codec.NewBuffer(b)
546 buf.EncodeUint32(m.BdID)
547 return buf.Bytes(), nil
549 func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
550 buf := codec.NewBuffer(b)
551 m.BdID = buf.DecodeUint32()
555 // GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
556 // InProgress: the message form may change in the future versions
557 type GbpBridgeDomainDelReply struct {
558 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
561 func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
562 func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
563 func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
564 func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
565 return api.ReplyMessage
568 func (m *GbpBridgeDomainDelReply) Size() (size int) {
572 size += 4 // m.Retval
575 func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) {
577 b = make([]byte, m.Size())
579 buf := codec.NewBuffer(b)
580 buf.EncodeInt32(m.Retval)
581 return buf.Bytes(), nil
583 func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
584 buf := codec.NewBuffer(b)
585 m.Retval = buf.DecodeInt32()
589 // GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
590 // InProgress: the message form may change in the future versions
591 type GbpBridgeDomainDetails struct {
592 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
595 func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
596 func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
597 func (*GbpBridgeDomainDetails) GetCrcString() string { return "51d51be9" }
598 func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
599 return api.ReplyMessage
602 func (m *GbpBridgeDomainDetails) Size() (size int) {
606 size += 4 // m.Bd.BdID
607 size += 4 // m.Bd.RdID
608 size += 4 // m.Bd.Flags
609 size += 4 // m.Bd.BviSwIfIndex
610 size += 4 // m.Bd.UuFwdSwIfIndex
611 size += 4 // m.Bd.BmFloodSwIfIndex
614 func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
616 b = make([]byte, m.Size())
618 buf := codec.NewBuffer(b)
619 buf.EncodeUint32(m.Bd.BdID)
620 buf.EncodeUint32(m.Bd.RdID)
621 buf.EncodeUint32(uint32(m.Bd.Flags))
622 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
623 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
624 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
625 return buf.Bytes(), nil
627 func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
628 buf := codec.NewBuffer(b)
629 m.Bd.BdID = buf.DecodeUint32()
630 m.Bd.RdID = buf.DecodeUint32()
631 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
632 m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
633 m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
634 m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
638 // GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
639 // InProgress: the message form may change in the future versions
640 type GbpBridgeDomainDump struct{}
642 func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
643 func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
644 func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
645 func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
646 return api.RequestMessage
649 func (m *GbpBridgeDomainDump) Size() (size int) {
655 func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
657 b = make([]byte, m.Size())
659 buf := codec.NewBuffer(b)
660 return buf.Bytes(), nil
662 func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
666 // GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
667 // InProgress: the message form may change in the future versions
668 type GbpBridgeDomainDumpReply struct {
669 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
672 func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
673 func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
674 func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
675 func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
676 return api.ReplyMessage
679 func (m *GbpBridgeDomainDumpReply) Size() (size int) {
683 size += 4 // m.Retval
686 func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) {
688 b = make([]byte, m.Size())
690 buf := codec.NewBuffer(b)
691 buf.EncodeInt32(m.Retval)
692 return buf.Bytes(), nil
694 func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
695 buf := codec.NewBuffer(b)
696 m.Retval = buf.DecodeInt32()
700 // GbpContractAddDel defines message 'gbp_contract_add_del'.
701 // InProgress: the message form may change in the future versions
702 type GbpContractAddDel struct {
703 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
704 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
707 func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
708 func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
709 func (*GbpContractAddDel) GetCrcString() string { return "aa8d652d" }
710 func (*GbpContractAddDel) GetMessageType() api.MessageType {
711 return api.RequestMessage
714 func (m *GbpContractAddDel) Size() (size int) {
719 size += 2 // m.Contract.Scope
720 size += 2 // m.Contract.Sclass
721 size += 2 // m.Contract.Dclass
722 size += 4 // m.Contract.ACLIndex
723 size += 1 // m.Contract.NEtherTypes
724 size += 2 * 16 // m.Contract.AllowedEthertypes
725 size += 1 // m.Contract.NRules
726 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
729 if j2 < len(m.Contract.Rules) {
730 s2 = m.Contract.Rules[j2]
732 size += 4 // s2.Action
733 size += 4 // s2.NhSet.HashMode
734 size += 1 // s2.NhSet.NNhs
735 for j4 := 0; j4 < 8; j4++ {
736 size += 1 // s2.NhSet.Nhs[j4].IP.Af
737 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
738 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
739 size += 4 // s2.NhSet.Nhs[j4].BdID
740 size += 4 // s2.NhSet.Nhs[j4].RdID
745 func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
747 b = make([]byte, m.Size())
749 buf := codec.NewBuffer(b)
750 buf.EncodeBool(m.IsAdd)
751 buf.EncodeUint16(uint16(m.Contract.Scope))
752 buf.EncodeUint16(m.Contract.Sclass)
753 buf.EncodeUint16(m.Contract.Dclass)
754 buf.EncodeUint32(m.Contract.ACLIndex)
755 buf.EncodeUint8(m.Contract.NEtherTypes)
756 for i := 0; i < 16; i++ {
758 if i < len(m.Contract.AllowedEthertypes) {
759 x = uint16(m.Contract.AllowedEthertypes[i])
763 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
764 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
765 var v1 GbpRule // Rules
766 if j1 < len(m.Contract.Rules) {
767 v1 = m.Contract.Rules[j1]
769 buf.EncodeUint32(uint32(v1.Action))
770 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
771 buf.EncodeUint8(v1.NhSet.NNhs)
772 for j3 := 0; j3 < 8; j3++ {
773 buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af))
774 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
775 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
776 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
777 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
780 return buf.Bytes(), nil
782 func (m *GbpContractAddDel) Unmarshal(b []byte) error {
783 buf := codec.NewBuffer(b)
784 m.IsAdd = buf.DecodeBool()
785 m.Contract.Scope = GbpScope(buf.DecodeUint16())
786 m.Contract.Sclass = buf.DecodeUint16()
787 m.Contract.Dclass = buf.DecodeUint16()
788 m.Contract.ACLIndex = buf.DecodeUint32()
789 m.Contract.NEtherTypes = buf.DecodeUint8()
790 m.Contract.AllowedEthertypes = make([]uint16, 16)
791 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
792 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
794 m.Contract.NRules = buf.DecodeUint8()
795 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
796 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
797 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
798 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
799 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
800 for j3 := 0; j3 < 8; j3++ {
801 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
802 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
803 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
804 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
805 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
811 // GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
812 // InProgress: the message form may change in the future versions
813 type GbpContractAddDelReply struct {
814 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
815 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
818 func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
819 func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
820 func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
821 func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
822 return api.ReplyMessage
825 func (m *GbpContractAddDelReply) Size() (size int) {
829 size += 4 // m.Retval
830 size += 4 // m.StatsIndex
833 func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
835 b = make([]byte, m.Size())
837 buf := codec.NewBuffer(b)
838 buf.EncodeInt32(m.Retval)
839 buf.EncodeUint32(m.StatsIndex)
840 return buf.Bytes(), nil
842 func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
843 buf := codec.NewBuffer(b)
844 m.Retval = buf.DecodeInt32()
845 m.StatsIndex = buf.DecodeUint32()
849 // GbpContractDetails defines message 'gbp_contract_details'.
850 // InProgress: the message form may change in the future versions
851 type GbpContractDetails struct {
852 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
855 func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
856 func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
857 func (*GbpContractDetails) GetCrcString() string { return "65dec325" }
858 func (*GbpContractDetails) GetMessageType() api.MessageType {
859 return api.ReplyMessage
862 func (m *GbpContractDetails) Size() (size int) {
866 size += 2 // m.Contract.Scope
867 size += 2 // m.Contract.Sclass
868 size += 2 // m.Contract.Dclass
869 size += 4 // m.Contract.ACLIndex
870 size += 1 // m.Contract.NEtherTypes
871 size += 2 * 16 // m.Contract.AllowedEthertypes
872 size += 1 // m.Contract.NRules
873 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
876 if j2 < len(m.Contract.Rules) {
877 s2 = m.Contract.Rules[j2]
879 size += 4 // s2.Action
880 size += 4 // s2.NhSet.HashMode
881 size += 1 // s2.NhSet.NNhs
882 for j4 := 0; j4 < 8; j4++ {
883 size += 1 // s2.NhSet.Nhs[j4].IP.Af
884 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
885 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
886 size += 4 // s2.NhSet.Nhs[j4].BdID
887 size += 4 // s2.NhSet.Nhs[j4].RdID
892 func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
894 b = make([]byte, m.Size())
896 buf := codec.NewBuffer(b)
897 buf.EncodeUint16(uint16(m.Contract.Scope))
898 buf.EncodeUint16(m.Contract.Sclass)
899 buf.EncodeUint16(m.Contract.Dclass)
900 buf.EncodeUint32(m.Contract.ACLIndex)
901 buf.EncodeUint8(m.Contract.NEtherTypes)
902 for i := 0; i < 16; i++ {
904 if i < len(m.Contract.AllowedEthertypes) {
905 x = uint16(m.Contract.AllowedEthertypes[i])
909 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
910 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
911 var v1 GbpRule // Rules
912 if j1 < len(m.Contract.Rules) {
913 v1 = m.Contract.Rules[j1]
915 buf.EncodeUint32(uint32(v1.Action))
916 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
917 buf.EncodeUint8(v1.NhSet.NNhs)
918 for j3 := 0; j3 < 8; j3++ {
919 buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af))
920 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
921 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
922 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
923 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
926 return buf.Bytes(), nil
928 func (m *GbpContractDetails) Unmarshal(b []byte) error {
929 buf := codec.NewBuffer(b)
930 m.Contract.Scope = GbpScope(buf.DecodeUint16())
931 m.Contract.Sclass = buf.DecodeUint16()
932 m.Contract.Dclass = buf.DecodeUint16()
933 m.Contract.ACLIndex = buf.DecodeUint32()
934 m.Contract.NEtherTypes = buf.DecodeUint8()
935 m.Contract.AllowedEthertypes = make([]uint16, 16)
936 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
937 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
939 m.Contract.NRules = buf.DecodeUint8()
940 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
941 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
942 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
943 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
944 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
945 for j3 := 0; j3 < 8; j3++ {
946 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
947 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
948 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
949 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
950 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
956 // GbpContractDump defines message 'gbp_contract_dump'.
957 // InProgress: the message form may change in the future versions
958 type GbpContractDump struct{}
960 func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
961 func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
962 func (*GbpContractDump) GetCrcString() string { return "51077d14" }
963 func (*GbpContractDump) GetMessageType() api.MessageType {
964 return api.RequestMessage
967 func (m *GbpContractDump) Size() (size int) {
973 func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
975 b = make([]byte, m.Size())
977 buf := codec.NewBuffer(b)
978 return buf.Bytes(), nil
980 func (m *GbpContractDump) Unmarshal(b []byte) error {
984 // GbpEndpointAdd defines message 'gbp_endpoint_add'.
985 // InProgress: the message form may change in the future versions
986 type GbpEndpointAdd struct {
987 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
990 func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
991 func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
992 func (*GbpEndpointAdd) GetCrcString() string { return "7b3af7de" }
993 func (*GbpEndpointAdd) GetMessageType() api.MessageType {
994 return api.RequestMessage
997 func (m *GbpEndpointAdd) Size() (size int) {
1001 size += 4 // m.Endpoint.SwIfIndex
1002 size += 2 // m.Endpoint.Sclass
1003 size += 4 // m.Endpoint.Flags
1004 size += 1 * 6 // m.Endpoint.Mac
1005 size += 1 // m.Endpoint.Tun.Src.Af
1006 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1007 size += 1 // m.Endpoint.Tun.Dst.Af
1008 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1009 size += 1 // m.Endpoint.NIps
1010 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1011 var s2 ip_types.Address
1013 if j2 < len(m.Endpoint.Ips) {
1014 s2 = m.Endpoint.Ips[j2]
1017 size += 1 * 16 // s2.Un
1021 func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
1023 b = make([]byte, m.Size())
1025 buf := codec.NewBuffer(b)
1026 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1027 buf.EncodeUint16(m.Endpoint.Sclass)
1028 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1029 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1030 buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
1031 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
1032 buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
1033 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
1034 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1035 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1036 var v1 ip_types.Address // Ips
1037 if j1 < len(m.Endpoint.Ips) {
1038 v1 = m.Endpoint.Ips[j1]
1040 buf.EncodeUint8(uint8(v1.Af))
1041 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
1043 return buf.Bytes(), nil
1045 func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
1046 buf := codec.NewBuffer(b)
1047 m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1048 m.Endpoint.Sclass = buf.DecodeUint16()
1049 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1050 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1051 m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1052 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1053 m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1054 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1055 m.Endpoint.NIps = buf.DecodeUint8()
1056 m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps)
1057 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1058 m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
1059 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1064 // GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
1065 // InProgress: the message form may change in the future versions
1066 type GbpEndpointAddReply struct {
1067 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1068 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1071 func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
1072 func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
1073 func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
1074 func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
1075 return api.ReplyMessage
1078 func (m *GbpEndpointAddReply) Size() (size int) {
1082 size += 4 // m.Retval
1083 size += 4 // m.Handle
1086 func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
1088 b = make([]byte, m.Size())
1090 buf := codec.NewBuffer(b)
1091 buf.EncodeInt32(m.Retval)
1092 buf.EncodeUint32(m.Handle)
1093 return buf.Bytes(), nil
1095 func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
1096 buf := codec.NewBuffer(b)
1097 m.Retval = buf.DecodeInt32()
1098 m.Handle = buf.DecodeUint32()
1102 // GbpEndpointDel defines message 'gbp_endpoint_del'.
1103 // InProgress: the message form may change in the future versions
1104 type GbpEndpointDel struct {
1105 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1108 func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
1109 func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
1110 func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
1111 func (*GbpEndpointDel) GetMessageType() api.MessageType {
1112 return api.RequestMessage
1115 func (m *GbpEndpointDel) Size() (size int) {
1119 size += 4 // m.Handle
1122 func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
1124 b = make([]byte, m.Size())
1126 buf := codec.NewBuffer(b)
1127 buf.EncodeUint32(m.Handle)
1128 return buf.Bytes(), nil
1130 func (m *GbpEndpointDel) Unmarshal(b []byte) error {
1131 buf := codec.NewBuffer(b)
1132 m.Handle = buf.DecodeUint32()
1136 // GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
1137 // InProgress: the message form may change in the future versions
1138 type GbpEndpointDelReply struct {
1139 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1142 func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
1143 func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
1144 func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
1145 func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
1146 return api.ReplyMessage
1149 func (m *GbpEndpointDelReply) Size() (size int) {
1153 size += 4 // m.Retval
1156 func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) {
1158 b = make([]byte, m.Size())
1160 buf := codec.NewBuffer(b)
1161 buf.EncodeInt32(m.Retval)
1162 return buf.Bytes(), nil
1164 func (m *GbpEndpointDelReply) Unmarshal(b []byte) error {
1165 buf := codec.NewBuffer(b)
1166 m.Retval = buf.DecodeInt32()
1170 // GbpEndpointDetails defines message 'gbp_endpoint_details'.
1171 // InProgress: the message form may change in the future versions
1172 type GbpEndpointDetails struct {
1173 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
1174 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1175 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
1178 func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
1179 func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
1180 func (*GbpEndpointDetails) GetCrcString() string { return "8dd8fbd3" }
1181 func (*GbpEndpointDetails) GetMessageType() api.MessageType {
1182 return api.ReplyMessage
1185 func (m *GbpEndpointDetails) Size() (size int) {
1190 size += 4 // m.Handle
1191 size += 4 // m.Endpoint.SwIfIndex
1192 size += 2 // m.Endpoint.Sclass
1193 size += 4 // m.Endpoint.Flags
1194 size += 1 * 6 // m.Endpoint.Mac
1195 size += 1 // m.Endpoint.Tun.Src.Af
1196 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1197 size += 1 // m.Endpoint.Tun.Dst.Af
1198 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1199 size += 1 // m.Endpoint.NIps
1200 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1201 var s2 ip_types.Address
1203 if j2 < len(m.Endpoint.Ips) {
1204 s2 = m.Endpoint.Ips[j2]
1207 size += 1 * 16 // s2.Un
1211 func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
1213 b = make([]byte, m.Size())
1215 buf := codec.NewBuffer(b)
1216 buf.EncodeFloat64(m.Age)
1217 buf.EncodeUint32(m.Handle)
1218 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1219 buf.EncodeUint16(m.Endpoint.Sclass)
1220 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1221 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1222 buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
1223 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
1224 buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
1225 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
1226 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1227 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1228 var v1 ip_types.Address // Ips
1229 if j1 < len(m.Endpoint.Ips) {
1230 v1 = m.Endpoint.Ips[j1]
1232 buf.EncodeUint8(uint8(v1.Af))
1233 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
1235 return buf.Bytes(), nil
1237 func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
1238 buf := codec.NewBuffer(b)
1239 m.Age = buf.DecodeFloat64()
1240 m.Handle = buf.DecodeUint32()
1241 m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1242 m.Endpoint.Sclass = buf.DecodeUint16()
1243 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1244 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1245 m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1246 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1247 m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1248 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1249 m.Endpoint.NIps = buf.DecodeUint8()
1250 m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps)
1251 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1252 m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
1253 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1258 // GbpEndpointDump defines message 'gbp_endpoint_dump'.
1259 // InProgress: the message form may change in the future versions
1260 type GbpEndpointDump struct{}
1262 func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
1263 func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
1264 func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
1265 func (*GbpEndpointDump) GetMessageType() api.MessageType {
1266 return api.RequestMessage
1269 func (m *GbpEndpointDump) Size() (size int) {
1275 func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
1277 b = make([]byte, m.Size())
1279 buf := codec.NewBuffer(b)
1280 return buf.Bytes(), nil
1282 func (m *GbpEndpointDump) Unmarshal(b []byte) error {
1286 // GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
1287 // InProgress: the message form may change in the future versions
1288 type GbpEndpointGroupAdd struct {
1289 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
1292 func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
1293 func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
1294 func (*GbpEndpointGroupAdd) GetCrcString() string { return "301ddf15" }
1295 func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
1296 return api.RequestMessage
1299 func (m *GbpEndpointGroupAdd) Size() (size int) {
1303 size += 4 // m.Epg.Vnid
1304 size += 2 // m.Epg.Sclass
1305 size += 4 // m.Epg.BdID
1306 size += 4 // m.Epg.RdID
1307 size += 4 // m.Epg.UplinkSwIfIndex
1308 size += 4 // m.Epg.Retention.RemoteEpTimeout
1311 func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
1313 b = make([]byte, m.Size())
1315 buf := codec.NewBuffer(b)
1316 buf.EncodeUint32(m.Epg.Vnid)
1317 buf.EncodeUint16(m.Epg.Sclass)
1318 buf.EncodeUint32(m.Epg.BdID)
1319 buf.EncodeUint32(m.Epg.RdID)
1320 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
1321 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
1322 return buf.Bytes(), nil
1324 func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
1325 buf := codec.NewBuffer(b)
1326 m.Epg.Vnid = buf.DecodeUint32()
1327 m.Epg.Sclass = buf.DecodeUint16()
1328 m.Epg.BdID = buf.DecodeUint32()
1329 m.Epg.RdID = buf.DecodeUint32()
1330 m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1331 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
1335 // GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
1336 // InProgress: the message form may change in the future versions
1337 type GbpEndpointGroupAddReply struct {
1338 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1341 func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
1342 func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
1343 func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
1344 func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
1345 return api.ReplyMessage
1348 func (m *GbpEndpointGroupAddReply) Size() (size int) {
1352 size += 4 // m.Retval
1355 func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) {
1357 b = make([]byte, m.Size())
1359 buf := codec.NewBuffer(b)
1360 buf.EncodeInt32(m.Retval)
1361 return buf.Bytes(), nil
1363 func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
1364 buf := codec.NewBuffer(b)
1365 m.Retval = buf.DecodeInt32()
1369 // GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
1370 // InProgress: the message form may change in the future versions
1371 type GbpEndpointGroupDel struct {
1372 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1375 func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
1376 func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
1377 func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
1378 func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
1379 return api.RequestMessage
1382 func (m *GbpEndpointGroupDel) Size() (size int) {
1386 size += 2 // m.Sclass
1389 func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
1391 b = make([]byte, m.Size())
1393 buf := codec.NewBuffer(b)
1394 buf.EncodeUint16(m.Sclass)
1395 return buf.Bytes(), nil
1397 func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
1398 buf := codec.NewBuffer(b)
1399 m.Sclass = buf.DecodeUint16()
1403 // GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
1404 // InProgress: the message form may change in the future versions
1405 type GbpEndpointGroupDelReply struct {
1406 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1409 func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
1410 func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
1411 func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
1412 func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
1413 return api.ReplyMessage
1416 func (m *GbpEndpointGroupDelReply) Size() (size int) {
1420 size += 4 // m.Retval
1423 func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) {
1425 b = make([]byte, m.Size())
1427 buf := codec.NewBuffer(b)
1428 buf.EncodeInt32(m.Retval)
1429 return buf.Bytes(), nil
1431 func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
1432 buf := codec.NewBuffer(b)
1433 m.Retval = buf.DecodeInt32()
1437 // GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
1438 // InProgress: the message form may change in the future versions
1439 type GbpEndpointGroupDetails struct {
1440 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
1443 func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
1444 func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
1445 func (*GbpEndpointGroupDetails) GetCrcString() string { return "ab71d723" }
1446 func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
1447 return api.ReplyMessage
1450 func (m *GbpEndpointGroupDetails) Size() (size int) {
1454 size += 4 // m.Epg.Vnid
1455 size += 2 // m.Epg.Sclass
1456 size += 4 // m.Epg.BdID
1457 size += 4 // m.Epg.RdID
1458 size += 4 // m.Epg.UplinkSwIfIndex
1459 size += 4 // m.Epg.Retention.RemoteEpTimeout
1462 func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
1464 b = make([]byte, m.Size())
1466 buf := codec.NewBuffer(b)
1467 buf.EncodeUint32(m.Epg.Vnid)
1468 buf.EncodeUint16(m.Epg.Sclass)
1469 buf.EncodeUint32(m.Epg.BdID)
1470 buf.EncodeUint32(m.Epg.RdID)
1471 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
1472 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
1473 return buf.Bytes(), nil
1475 func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
1476 buf := codec.NewBuffer(b)
1477 m.Epg.Vnid = buf.DecodeUint32()
1478 m.Epg.Sclass = buf.DecodeUint16()
1479 m.Epg.BdID = buf.DecodeUint32()
1480 m.Epg.RdID = buf.DecodeUint32()
1481 m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1482 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
1486 // GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
1487 // InProgress: the message form may change in the future versions
1488 type GbpEndpointGroupDump struct{}
1490 func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
1491 func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
1492 func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
1493 func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
1494 return api.RequestMessage
1497 func (m *GbpEndpointGroupDump) Size() (size int) {
1503 func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
1505 b = make([]byte, m.Size())
1507 buf := codec.NewBuffer(b)
1508 return buf.Bytes(), nil
1510 func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
1514 // GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
1515 // InProgress: the message form may change in the future versions
1516 type GbpExtItfAddDel struct {
1517 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1518 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
1521 func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
1522 func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
1523 func (*GbpExtItfAddDel) GetCrcString() string { return "7606d0e1" }
1524 func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
1525 return api.RequestMessage
1528 func (m *GbpExtItfAddDel) Size() (size int) {
1532 size += 1 // m.IsAdd
1533 size += 4 // m.ExtItf.SwIfIndex
1534 size += 4 // m.ExtItf.BdID
1535 size += 4 // m.ExtItf.RdID
1536 size += 4 // m.ExtItf.Flags
1539 func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) {
1541 b = make([]byte, m.Size())
1543 buf := codec.NewBuffer(b)
1544 buf.EncodeBool(m.IsAdd)
1545 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
1546 buf.EncodeUint32(m.ExtItf.BdID)
1547 buf.EncodeUint32(m.ExtItf.RdID)
1548 buf.EncodeUint32(uint32(m.ExtItf.Flags))
1549 return buf.Bytes(), nil
1551 func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
1552 buf := codec.NewBuffer(b)
1553 m.IsAdd = buf.DecodeBool()
1554 m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1555 m.ExtItf.BdID = buf.DecodeUint32()
1556 m.ExtItf.RdID = buf.DecodeUint32()
1557 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
1561 // GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
1562 // InProgress: the message form may change in the future versions
1563 type GbpExtItfAddDelReply struct {
1564 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1567 func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
1568 func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
1569 func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
1570 func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
1571 return api.ReplyMessage
1574 func (m *GbpExtItfAddDelReply) Size() (size int) {
1578 size += 4 // m.Retval
1581 func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) {
1583 b = make([]byte, m.Size())
1585 buf := codec.NewBuffer(b)
1586 buf.EncodeInt32(m.Retval)
1587 return buf.Bytes(), nil
1589 func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
1590 buf := codec.NewBuffer(b)
1591 m.Retval = buf.DecodeInt32()
1595 // GbpExtItfDetails defines message 'gbp_ext_itf_details'.
1596 // InProgress: the message form may change in the future versions
1597 type GbpExtItfDetails struct {
1598 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
1601 func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
1602 func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
1603 func (*GbpExtItfDetails) GetCrcString() string { return "519c3d3c" }
1604 func (*GbpExtItfDetails) GetMessageType() api.MessageType {
1605 return api.ReplyMessage
1608 func (m *GbpExtItfDetails) Size() (size int) {
1612 size += 4 // m.ExtItf.SwIfIndex
1613 size += 4 // m.ExtItf.BdID
1614 size += 4 // m.ExtItf.RdID
1615 size += 4 // m.ExtItf.Flags
1618 func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
1620 b = make([]byte, m.Size())
1622 buf := codec.NewBuffer(b)
1623 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
1624 buf.EncodeUint32(m.ExtItf.BdID)
1625 buf.EncodeUint32(m.ExtItf.RdID)
1626 buf.EncodeUint32(uint32(m.ExtItf.Flags))
1627 return buf.Bytes(), nil
1629 func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
1630 buf := codec.NewBuffer(b)
1631 m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1632 m.ExtItf.BdID = buf.DecodeUint32()
1633 m.ExtItf.RdID = buf.DecodeUint32()
1634 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
1638 // GbpExtItfDump defines message 'gbp_ext_itf_dump'.
1639 // InProgress: the message form may change in the future versions
1640 type GbpExtItfDump struct{}
1642 func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
1643 func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
1644 func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
1645 func (*GbpExtItfDump) GetMessageType() api.MessageType {
1646 return api.RequestMessage
1649 func (m *GbpExtItfDump) Size() (size int) {
1655 func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
1657 b = make([]byte, m.Size())
1659 buf := codec.NewBuffer(b)
1660 return buf.Bytes(), nil
1662 func (m *GbpExtItfDump) Unmarshal(b []byte) error {
1666 // GbpRecircAddDel defines message 'gbp_recirc_add_del'.
1667 // InProgress: the message form may change in the future versions
1668 type GbpRecircAddDel struct {
1669 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1670 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
1673 func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
1674 func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
1675 func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
1676 func (*GbpRecircAddDel) GetMessageType() api.MessageType {
1677 return api.RequestMessage
1680 func (m *GbpRecircAddDel) Size() (size int) {
1684 size += 1 // m.IsAdd
1685 size += 4 // m.Recirc.SwIfIndex
1686 size += 2 // m.Recirc.Sclass
1687 size += 1 // m.Recirc.IsExt
1690 func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) {
1692 b = make([]byte, m.Size())
1694 buf := codec.NewBuffer(b)
1695 buf.EncodeBool(m.IsAdd)
1696 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
1697 buf.EncodeUint16(m.Recirc.Sclass)
1698 buf.EncodeBool(m.Recirc.IsExt)
1699 return buf.Bytes(), nil
1701 func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
1702 buf := codec.NewBuffer(b)
1703 m.IsAdd = buf.DecodeBool()
1704 m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1705 m.Recirc.Sclass = buf.DecodeUint16()
1706 m.Recirc.IsExt = buf.DecodeBool()
1710 // GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
1711 // InProgress: the message form may change in the future versions
1712 type GbpRecircAddDelReply struct {
1713 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1716 func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
1717 func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
1718 func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
1719 func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
1720 return api.ReplyMessage
1723 func (m *GbpRecircAddDelReply) Size() (size int) {
1727 size += 4 // m.Retval
1730 func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) {
1732 b = make([]byte, m.Size())
1734 buf := codec.NewBuffer(b)
1735 buf.EncodeInt32(m.Retval)
1736 return buf.Bytes(), nil
1738 func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error {
1739 buf := codec.NewBuffer(b)
1740 m.Retval = buf.DecodeInt32()
1744 // GbpRecircDetails defines message 'gbp_recirc_details'.
1745 // InProgress: the message form may change in the future versions
1746 type GbpRecircDetails struct {
1747 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
1750 func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
1751 func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
1752 func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
1753 func (*GbpRecircDetails) GetMessageType() api.MessageType {
1754 return api.ReplyMessage
1757 func (m *GbpRecircDetails) Size() (size int) {
1761 size += 4 // m.Recirc.SwIfIndex
1762 size += 2 // m.Recirc.Sclass
1763 size += 1 // m.Recirc.IsExt
1766 func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
1768 b = make([]byte, m.Size())
1770 buf := codec.NewBuffer(b)
1771 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
1772 buf.EncodeUint16(m.Recirc.Sclass)
1773 buf.EncodeBool(m.Recirc.IsExt)
1774 return buf.Bytes(), nil
1776 func (m *GbpRecircDetails) Unmarshal(b []byte) error {
1777 buf := codec.NewBuffer(b)
1778 m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1779 m.Recirc.Sclass = buf.DecodeUint16()
1780 m.Recirc.IsExt = buf.DecodeBool()
1784 // GbpRecircDump defines message 'gbp_recirc_dump'.
1785 // InProgress: the message form may change in the future versions
1786 type GbpRecircDump struct{}
1788 func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
1789 func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
1790 func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
1791 func (*GbpRecircDump) GetMessageType() api.MessageType {
1792 return api.RequestMessage
1795 func (m *GbpRecircDump) Size() (size int) {
1801 func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
1803 b = make([]byte, m.Size())
1805 buf := codec.NewBuffer(b)
1806 return buf.Bytes(), nil
1808 func (m *GbpRecircDump) Unmarshal(b []byte) error {
1812 // GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
1813 // InProgress: the message form may change in the future versions
1814 type GbpRouteDomainAdd struct {
1815 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
1818 func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
1819 func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
1820 func (*GbpRouteDomainAdd) GetCrcString() string { return "204c79e1" }
1821 func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
1822 return api.RequestMessage
1825 func (m *GbpRouteDomainAdd) Size() (size int) {
1829 size += 4 // m.Rd.RdID
1830 size += 4 // m.Rd.IP4TableID
1831 size += 4 // m.Rd.IP6TableID
1832 size += 4 // m.Rd.IP4UuSwIfIndex
1833 size += 4 // m.Rd.IP6UuSwIfIndex
1834 size += 2 // m.Rd.Scope
1837 func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
1839 b = make([]byte, m.Size())
1841 buf := codec.NewBuffer(b)
1842 buf.EncodeUint32(m.Rd.RdID)
1843 buf.EncodeUint32(m.Rd.IP4TableID)
1844 buf.EncodeUint32(m.Rd.IP6TableID)
1845 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
1846 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
1847 buf.EncodeUint16(uint16(m.Rd.Scope))
1848 return buf.Bytes(), nil
1850 func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
1851 buf := codec.NewBuffer(b)
1852 m.Rd.RdID = buf.DecodeUint32()
1853 m.Rd.IP4TableID = buf.DecodeUint32()
1854 m.Rd.IP6TableID = buf.DecodeUint32()
1855 m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1856 m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1857 m.Rd.Scope = GbpScope(buf.DecodeUint16())
1861 // GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
1862 // InProgress: the message form may change in the future versions
1863 type GbpRouteDomainAddReply struct {
1864 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1867 func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
1868 func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
1869 func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
1870 func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
1871 return api.ReplyMessage
1874 func (m *GbpRouteDomainAddReply) Size() (size int) {
1878 size += 4 // m.Retval
1881 func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) {
1883 b = make([]byte, m.Size())
1885 buf := codec.NewBuffer(b)
1886 buf.EncodeInt32(m.Retval)
1887 return buf.Bytes(), nil
1889 func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
1890 buf := codec.NewBuffer(b)
1891 m.Retval = buf.DecodeInt32()
1895 // GbpRouteDomainDel defines message 'gbp_route_domain_del'.
1896 // InProgress: the message form may change in the future versions
1897 type GbpRouteDomainDel struct {
1898 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1901 func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
1902 func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
1903 func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
1904 func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
1905 return api.RequestMessage
1908 func (m *GbpRouteDomainDel) Size() (size int) {
1915 func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
1917 b = make([]byte, m.Size())
1919 buf := codec.NewBuffer(b)
1920 buf.EncodeUint32(m.RdID)
1921 return buf.Bytes(), nil
1923 func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
1924 buf := codec.NewBuffer(b)
1925 m.RdID = buf.DecodeUint32()
1929 // GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
1930 // InProgress: the message form may change in the future versions
1931 type GbpRouteDomainDelReply struct {
1932 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1935 func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
1936 func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
1937 func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
1938 func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
1939 return api.ReplyMessage
1942 func (m *GbpRouteDomainDelReply) Size() (size int) {
1946 size += 4 // m.Retval
1949 func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) {
1951 b = make([]byte, m.Size())
1953 buf := codec.NewBuffer(b)
1954 buf.EncodeInt32(m.Retval)
1955 return buf.Bytes(), nil
1957 func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
1958 buf := codec.NewBuffer(b)
1959 m.Retval = buf.DecodeInt32()
1963 // GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
1964 // InProgress: the message form may change in the future versions
1965 type GbpRouteDomainDetails struct {
1966 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
1969 func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
1970 func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
1971 func (*GbpRouteDomainDetails) GetCrcString() string { return "a78bfbca" }
1972 func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
1973 return api.ReplyMessage
1976 func (m *GbpRouteDomainDetails) Size() (size int) {
1980 size += 4 // m.Rd.RdID
1981 size += 4 // m.Rd.IP4TableID
1982 size += 4 // m.Rd.IP6TableID
1983 size += 4 // m.Rd.IP4UuSwIfIndex
1984 size += 4 // m.Rd.IP6UuSwIfIndex
1985 size += 2 // m.Rd.Scope
1988 func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
1990 b = make([]byte, m.Size())
1992 buf := codec.NewBuffer(b)
1993 buf.EncodeUint32(m.Rd.RdID)
1994 buf.EncodeUint32(m.Rd.IP4TableID)
1995 buf.EncodeUint32(m.Rd.IP6TableID)
1996 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
1997 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
1998 buf.EncodeUint16(uint16(m.Rd.Scope))
1999 return buf.Bytes(), nil
2001 func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
2002 buf := codec.NewBuffer(b)
2003 m.Rd.RdID = buf.DecodeUint32()
2004 m.Rd.IP4TableID = buf.DecodeUint32()
2005 m.Rd.IP6TableID = buf.DecodeUint32()
2006 m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2007 m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2008 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2012 // GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
2013 // InProgress: the message form may change in the future versions
2014 type GbpRouteDomainDump struct{}
2016 func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
2017 func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
2018 func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
2019 func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
2020 return api.RequestMessage
2023 func (m *GbpRouteDomainDump) Size() (size int) {
2029 func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
2031 b = make([]byte, m.Size())
2033 buf := codec.NewBuffer(b)
2034 return buf.Bytes(), nil
2036 func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
2040 // GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
2041 // InProgress: the message form may change in the future versions
2042 type GbpRouteDomainDumpReply struct {
2043 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2046 func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
2047 func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
2048 func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
2049 func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
2050 return api.ReplyMessage
2053 func (m *GbpRouteDomainDumpReply) Size() (size int) {
2057 size += 4 // m.Retval
2060 func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) {
2062 b = make([]byte, m.Size())
2064 buf := codec.NewBuffer(b)
2065 buf.EncodeInt32(m.Retval)
2066 return buf.Bytes(), nil
2068 func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
2069 buf := codec.NewBuffer(b)
2070 m.Retval = buf.DecodeInt32()
2074 // GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
2075 // InProgress: the message form may change in the future versions
2076 type GbpSubnetAddDel struct {
2077 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2078 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2081 func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
2082 func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
2083 func (*GbpSubnetAddDel) GetCrcString() string { return "a8803c80" }
2084 func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
2085 return api.RequestMessage
2088 func (m *GbpSubnetAddDel) Size() (size int) {
2092 size += 1 // m.IsAdd
2093 size += 4 // m.Subnet.RdID
2094 size += 4 // m.Subnet.SwIfIndex
2095 size += 2 // m.Subnet.Sclass
2096 size += 4 // m.Subnet.Type
2097 size += 1 // m.Subnet.Prefix.Address.Af
2098 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2099 size += 1 // m.Subnet.Prefix.Len
2102 func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
2104 b = make([]byte, m.Size())
2106 buf := codec.NewBuffer(b)
2107 buf.EncodeBool(m.IsAdd)
2108 buf.EncodeUint32(m.Subnet.RdID)
2109 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2110 buf.EncodeUint16(m.Subnet.Sclass)
2111 buf.EncodeUint32(uint32(m.Subnet.Type))
2112 buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
2113 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
2114 buf.EncodeUint8(m.Subnet.Prefix.Len)
2115 return buf.Bytes(), nil
2117 func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
2118 buf := codec.NewBuffer(b)
2119 m.IsAdd = buf.DecodeBool()
2120 m.Subnet.RdID = buf.DecodeUint32()
2121 m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2122 m.Subnet.Sclass = buf.DecodeUint16()
2123 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2124 m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2125 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2126 m.Subnet.Prefix.Len = buf.DecodeUint8()
2130 // GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
2131 // InProgress: the message form may change in the future versions
2132 type GbpSubnetAddDelReply struct {
2133 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2136 func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
2137 func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
2138 func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
2139 func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
2140 return api.ReplyMessage
2143 func (m *GbpSubnetAddDelReply) Size() (size int) {
2147 size += 4 // m.Retval
2150 func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) {
2152 b = make([]byte, m.Size())
2154 buf := codec.NewBuffer(b)
2155 buf.EncodeInt32(m.Retval)
2156 return buf.Bytes(), nil
2158 func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
2159 buf := codec.NewBuffer(b)
2160 m.Retval = buf.DecodeInt32()
2164 // GbpSubnetDetails defines message 'gbp_subnet_details'.
2165 // InProgress: the message form may change in the future versions
2166 type GbpSubnetDetails struct {
2167 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2170 func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
2171 func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
2172 func (*GbpSubnetDetails) GetCrcString() string { return "cbc5ca18" }
2173 func (*GbpSubnetDetails) GetMessageType() api.MessageType {
2174 return api.ReplyMessage
2177 func (m *GbpSubnetDetails) Size() (size int) {
2181 size += 4 // m.Subnet.RdID
2182 size += 4 // m.Subnet.SwIfIndex
2183 size += 2 // m.Subnet.Sclass
2184 size += 4 // m.Subnet.Type
2185 size += 1 // m.Subnet.Prefix.Address.Af
2186 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2187 size += 1 // m.Subnet.Prefix.Len
2190 func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
2192 b = make([]byte, m.Size())
2194 buf := codec.NewBuffer(b)
2195 buf.EncodeUint32(m.Subnet.RdID)
2196 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2197 buf.EncodeUint16(m.Subnet.Sclass)
2198 buf.EncodeUint32(uint32(m.Subnet.Type))
2199 buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
2200 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
2201 buf.EncodeUint8(m.Subnet.Prefix.Len)
2202 return buf.Bytes(), nil
2204 func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
2205 buf := codec.NewBuffer(b)
2206 m.Subnet.RdID = buf.DecodeUint32()
2207 m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2208 m.Subnet.Sclass = buf.DecodeUint16()
2209 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2210 m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2211 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2212 m.Subnet.Prefix.Len = buf.DecodeUint8()
2216 // GbpSubnetDump defines message 'gbp_subnet_dump'.
2217 // InProgress: the message form may change in the future versions
2218 type GbpSubnetDump struct{}
2220 func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
2221 func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
2222 func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
2223 func (*GbpSubnetDump) GetMessageType() api.MessageType {
2224 return api.RequestMessage
2227 func (m *GbpSubnetDump) Size() (size int) {
2233 func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
2235 b = make([]byte, m.Size())
2237 buf := codec.NewBuffer(b)
2238 return buf.Bytes(), nil
2240 func (m *GbpSubnetDump) Unmarshal(b []byte) error {
2244 // GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
2245 // InProgress: the message form may change in the future versions
2246 type GbpVxlanTunnelAdd struct {
2247 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
2250 func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
2251 func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
2252 func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
2253 func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
2254 return api.RequestMessage
2257 func (m *GbpVxlanTunnelAdd) Size() (size int) {
2261 size += 4 // m.Tunnel.Vni
2262 size += 4 // m.Tunnel.Mode
2263 size += 4 // m.Tunnel.BdRdID
2264 size += 1 * 4 // m.Tunnel.Src
2267 func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
2269 b = make([]byte, m.Size())
2271 buf := codec.NewBuffer(b)
2272 buf.EncodeUint32(m.Tunnel.Vni)
2273 buf.EncodeUint32(uint32(m.Tunnel.Mode))
2274 buf.EncodeUint32(m.Tunnel.BdRdID)
2275 buf.EncodeBytes(m.Tunnel.Src[:], 4)
2276 return buf.Bytes(), nil
2278 func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
2279 buf := codec.NewBuffer(b)
2280 m.Tunnel.Vni = buf.DecodeUint32()
2281 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
2282 m.Tunnel.BdRdID = buf.DecodeUint32()
2283 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
2287 // GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
2288 // InProgress: the message form may change in the future versions
2289 type GbpVxlanTunnelAddReply struct {
2290 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2291 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2294 func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
2295 func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
2296 func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
2297 func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
2298 return api.ReplyMessage
2301 func (m *GbpVxlanTunnelAddReply) Size() (size int) {
2305 size += 4 // m.Retval
2306 size += 4 // m.SwIfIndex
2309 func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
2311 b = make([]byte, m.Size())
2313 buf := codec.NewBuffer(b)
2314 buf.EncodeInt32(m.Retval)
2315 buf.EncodeUint32(uint32(m.SwIfIndex))
2316 return buf.Bytes(), nil
2318 func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
2319 buf := codec.NewBuffer(b)
2320 m.Retval = buf.DecodeInt32()
2321 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2325 // GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
2326 // InProgress: the message form may change in the future versions
2327 type GbpVxlanTunnelDel struct {
2328 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
2331 func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
2332 func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
2333 func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
2334 func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
2335 return api.RequestMessage
2338 func (m *GbpVxlanTunnelDel) Size() (size int) {
2345 func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
2347 b = make([]byte, m.Size())
2349 buf := codec.NewBuffer(b)
2350 buf.EncodeUint32(m.Vni)
2351 return buf.Bytes(), nil
2353 func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
2354 buf := codec.NewBuffer(b)
2355 m.Vni = buf.DecodeUint32()
2359 // GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
2360 // InProgress: the message form may change in the future versions
2361 type GbpVxlanTunnelDelReply struct {
2362 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2365 func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
2366 func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
2367 func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
2368 func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
2369 return api.ReplyMessage
2372 func (m *GbpVxlanTunnelDelReply) Size() (size int) {
2376 size += 4 // m.Retval
2379 func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) {
2381 b = make([]byte, m.Size())
2383 buf := codec.NewBuffer(b)
2384 buf.EncodeInt32(m.Retval)
2385 return buf.Bytes(), nil
2387 func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
2388 buf := codec.NewBuffer(b)
2389 m.Retval = buf.DecodeInt32()
2393 // GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
2394 // InProgress: the message form may change in the future versions
2395 type GbpVxlanTunnelDetails struct {
2396 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
2399 func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
2400 func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
2401 func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
2402 func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
2403 return api.ReplyMessage
2406 func (m *GbpVxlanTunnelDetails) Size() (size int) {
2410 size += 4 // m.Tunnel.Vni
2411 size += 4 // m.Tunnel.Mode
2412 size += 4 // m.Tunnel.BdRdID
2413 size += 1 * 4 // m.Tunnel.Src
2416 func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
2418 b = make([]byte, m.Size())
2420 buf := codec.NewBuffer(b)
2421 buf.EncodeUint32(m.Tunnel.Vni)
2422 buf.EncodeUint32(uint32(m.Tunnel.Mode))
2423 buf.EncodeUint32(m.Tunnel.BdRdID)
2424 buf.EncodeBytes(m.Tunnel.Src[:], 4)
2425 return buf.Bytes(), nil
2427 func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
2428 buf := codec.NewBuffer(b)
2429 m.Tunnel.Vni = buf.DecodeUint32()
2430 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
2431 m.Tunnel.BdRdID = buf.DecodeUint32()
2432 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
2436 // GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
2437 // InProgress: the message form may change in the future versions
2438 type GbpVxlanTunnelDump struct{}
2440 func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
2441 func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
2442 func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
2443 func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
2444 return api.RequestMessage
2447 func (m *GbpVxlanTunnelDump) Size() (size int) {
2453 func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
2455 b = make([]byte, m.Size())
2457 buf := codec.NewBuffer(b)
2458 return buf.Bytes(), nil
2460 func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
2464 func init() { file_gbp_binapi_init() }
2465 func file_gbp_binapi_init() {
2466 api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_918e8c01")
2467 api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
2468 api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
2469 api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
2470 api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_51d51be9")
2471 api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
2472 api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
2473 api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_aa8d652d")
2474 api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
2475 api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_65dec325")
2476 api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
2477 api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_7b3af7de")
2478 api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
2479 api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
2480 api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
2481 api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_8dd8fbd3")
2482 api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
2483 api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_301ddf15")
2484 api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
2485 api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
2486 api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
2487 api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_ab71d723")
2488 api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
2489 api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_7606d0e1")
2490 api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
2491 api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_519c3d3c")
2492 api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
2493 api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
2494 api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
2495 api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
2496 api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
2497 api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_204c79e1")
2498 api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
2499 api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
2500 api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
2501 api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_a78bfbca")
2502 api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
2503 api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
2504 api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_a8803c80")
2505 api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
2506 api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_cbc5ca18")
2507 api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
2508 api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
2509 api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
2510 api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
2511 api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
2512 api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
2513 api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
2516 // Messages returns list of all messages in this module.
2517 func AllMessages() []api.Message {
2518 return []api.Message{
2519 (*GbpBridgeDomainAdd)(nil),
2520 (*GbpBridgeDomainAddReply)(nil),
2521 (*GbpBridgeDomainDel)(nil),
2522 (*GbpBridgeDomainDelReply)(nil),
2523 (*GbpBridgeDomainDetails)(nil),
2524 (*GbpBridgeDomainDump)(nil),
2525 (*GbpBridgeDomainDumpReply)(nil),
2526 (*GbpContractAddDel)(nil),
2527 (*GbpContractAddDelReply)(nil),
2528 (*GbpContractDetails)(nil),
2529 (*GbpContractDump)(nil),
2530 (*GbpEndpointAdd)(nil),
2531 (*GbpEndpointAddReply)(nil),
2532 (*GbpEndpointDel)(nil),
2533 (*GbpEndpointDelReply)(nil),
2534 (*GbpEndpointDetails)(nil),
2535 (*GbpEndpointDump)(nil),
2536 (*GbpEndpointGroupAdd)(nil),
2537 (*GbpEndpointGroupAddReply)(nil),
2538 (*GbpEndpointGroupDel)(nil),
2539 (*GbpEndpointGroupDelReply)(nil),
2540 (*GbpEndpointGroupDetails)(nil),
2541 (*GbpEndpointGroupDump)(nil),
2542 (*GbpExtItfAddDel)(nil),
2543 (*GbpExtItfAddDelReply)(nil),
2544 (*GbpExtItfDetails)(nil),
2545 (*GbpExtItfDump)(nil),
2546 (*GbpRecircAddDel)(nil),
2547 (*GbpRecircAddDelReply)(nil),
2548 (*GbpRecircDetails)(nil),
2549 (*GbpRecircDump)(nil),
2550 (*GbpRouteDomainAdd)(nil),
2551 (*GbpRouteDomainAddReply)(nil),
2552 (*GbpRouteDomainDel)(nil),
2553 (*GbpRouteDomainDelReply)(nil),
2554 (*GbpRouteDomainDetails)(nil),
2555 (*GbpRouteDomainDump)(nil),
2556 (*GbpRouteDomainDumpReply)(nil),
2557 (*GbpSubnetAddDel)(nil),
2558 (*GbpSubnetAddDelReply)(nil),
2559 (*GbpSubnetDetails)(nil),
2560 (*GbpSubnetDump)(nil),
2561 (*GbpVxlanTunnelAdd)(nil),
2562 (*GbpVxlanTunnelAddReply)(nil),
2563 (*GbpVxlanTunnelDel)(nil),
2564 (*GbpVxlanTunnelDelReply)(nil),
2565 (*GbpVxlanTunnelDetails)(nil),
2566 (*GbpVxlanTunnelDump)(nil),