1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/gbp.api.json
7 // Package gbp contains generated bindings for API file gbp.api.
18 api "git.fd.io/govpp.git/api"
19 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 codec "git.fd.io/govpp.git/codec"
26 // This is a compile-time assertion to ensure that this generated file
27 // is compatible with the GoVPP api package it is being compiled against.
28 // A compilation error at this line likely means your copy of the
29 // GoVPP api package needs to be updated.
30 const _ = api.GoVppAPIPackageIsVersion2
35 VersionCrc = 0xa084c6b0
38 // GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
39 type GbpBridgeDomainFlags uint32
42 GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
43 GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
44 GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
45 GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
46 GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
50 GbpBridgeDomainFlags_name = map[uint32]string{
51 0: "GBP_BD_API_FLAG_NONE",
52 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
53 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
54 4: "GBP_BD_API_FLAG_MCAST_DROP",
55 8: "GBP_BD_API_FLAG_UCAST_ARP",
57 GbpBridgeDomainFlags_value = map[string]uint32{
58 "GBP_BD_API_FLAG_NONE": 0,
59 "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
60 "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
61 "GBP_BD_API_FLAG_MCAST_DROP": 4,
62 "GBP_BD_API_FLAG_UCAST_ARP": 8,
66 func (x GbpBridgeDomainFlags) String() string {
67 s, ok := GbpBridgeDomainFlags_name[uint32(x)]
71 str := func(n uint32) string {
72 s, ok := GbpBridgeDomainFlags_name[uint32(n)]
76 return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
78 for i := uint32(0); i <= 32; i++ {
93 // GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
94 type GbpEndpointFlags uint32
97 GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
98 GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
99 GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
100 GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
101 GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
105 GbpEndpointFlags_name = map[uint32]string{
106 0: "GBP_API_ENDPOINT_FLAG_NONE",
107 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
108 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
109 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
110 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
112 GbpEndpointFlags_value = map[string]uint32{
113 "GBP_API_ENDPOINT_FLAG_NONE": 0,
114 "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
115 "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
116 "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
117 "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
121 func (x GbpEndpointFlags) String() string {
122 s, ok := GbpEndpointFlags_name[uint32(x)]
126 str := func(n uint32) string {
127 s, ok := GbpEndpointFlags_name[uint32(n)]
131 return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
133 for i := uint32(0); i <= 32; i++ {
143 return str(uint32(x))
148 // GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
149 type GbpExtItfFlags uint32
152 GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
153 GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
157 GbpExtItfFlags_name = map[uint32]string{
158 0: "GBP_API_EXT_ITF_F_NONE",
159 1: "GBP_API_EXT_ITF_F_ANON",
161 GbpExtItfFlags_value = map[string]uint32{
162 "GBP_API_EXT_ITF_F_NONE": 0,
163 "GBP_API_EXT_ITF_F_ANON": 1,
167 func (x GbpExtItfFlags) String() string {
168 s, ok := GbpExtItfFlags_name[uint32(x)]
172 str := func(n uint32) string {
173 s, ok := GbpExtItfFlags_name[uint32(n)]
177 return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
179 for i := uint32(0); i <= 32; i++ {
189 return str(uint32(x))
194 // GbpHashMode defines enum 'gbp_hash_mode'.
195 type GbpHashMode uint32
198 GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
199 GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
200 GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
204 GbpHashMode_name = map[uint32]string{
205 1: "GBP_API_HASH_MODE_SRC_IP",
206 2: "GBP_API_HASH_MODE_DST_IP",
207 3: "GBP_API_HASH_MODE_SYMMETRIC",
209 GbpHashMode_value = map[string]uint32{
210 "GBP_API_HASH_MODE_SRC_IP": 1,
211 "GBP_API_HASH_MODE_DST_IP": 2,
212 "GBP_API_HASH_MODE_SYMMETRIC": 3,
216 func (x GbpHashMode) String() string {
217 s, ok := GbpHashMode_name[uint32(x)]
221 return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
224 // GbpRuleAction defines enum 'gbp_rule_action'.
225 type GbpRuleAction uint32
228 GBP_API_RULE_PERMIT GbpRuleAction = 1
229 GBP_API_RULE_DENY GbpRuleAction = 2
230 GBP_API_RULE_REDIRECT GbpRuleAction = 3
234 GbpRuleAction_name = map[uint32]string{
235 1: "GBP_API_RULE_PERMIT",
236 2: "GBP_API_RULE_DENY",
237 3: "GBP_API_RULE_REDIRECT",
239 GbpRuleAction_value = map[string]uint32{
240 "GBP_API_RULE_PERMIT": 1,
241 "GBP_API_RULE_DENY": 2,
242 "GBP_API_RULE_REDIRECT": 3,
246 func (x GbpRuleAction) String() string {
247 s, ok := GbpRuleAction_name[uint32(x)]
251 return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
254 // GbpSubnetType defines enum 'gbp_subnet_type'.
255 type GbpSubnetType uint32
258 GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
259 GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
260 GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
261 GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
262 GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
266 GbpSubnetType_name = map[uint32]string{
267 1: "GBP_API_SUBNET_TRANSPORT",
268 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
269 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
270 4: "GBP_API_SUBNET_L3_OUT",
271 5: "GBP_API_SUBNET_ANON_L3_OUT",
273 GbpSubnetType_value = map[string]uint32{
274 "GBP_API_SUBNET_TRANSPORT": 1,
275 "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
276 "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
277 "GBP_API_SUBNET_L3_OUT": 4,
278 "GBP_API_SUBNET_ANON_L3_OUT": 5,
282 func (x GbpSubnetType) String() string {
283 s, ok := GbpSubnetType_name[uint32(x)]
287 return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
290 // GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
291 type GbpVxlanTunnelMode uint32
294 GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
295 GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
299 GbpVxlanTunnelMode_name = map[uint32]string{
300 1: "GBP_VXLAN_TUNNEL_MODE_L2",
301 2: "GBP_VXLAN_TUNNEL_MODE_L3",
303 GbpVxlanTunnelMode_value = map[string]uint32{
304 "GBP_VXLAN_TUNNEL_MODE_L2": 1,
305 "GBP_VXLAN_TUNNEL_MODE_L3": 2,
309 func (x GbpVxlanTunnelMode) String() string {
310 s, ok := GbpVxlanTunnelMode_name[uint32(x)]
314 return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
317 // GbpScope defines alias 'gbp_scope'.
320 // GbpBridgeDomain defines type 'gbp_bridge_domain'.
321 type GbpBridgeDomain struct {
322 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
323 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
324 Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
325 BviSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
326 UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
327 BmFloodSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
330 // GbpContract defines type 'gbp_contract'.
331 type GbpContract struct {
332 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
333 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
334 Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
335 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
336 NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
337 AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
338 NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
339 Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
342 // GbpEndpoint defines type 'gbp_endpoint'.
343 type GbpEndpoint struct {
344 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
345 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
346 Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
347 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
348 Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
349 NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
350 Ips []ip_types.Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
353 // GbpEndpointGroup defines type 'gbp_endpoint_group'.
354 type GbpEndpointGroup struct {
355 Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
356 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
357 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
358 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
359 UplinkSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
360 Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
363 // GbpEndpointRetention defines type 'gbp_endpoint_retention'.
364 type GbpEndpointRetention struct {
365 RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
368 // GbpEndpointTun defines type 'gbp_endpoint_tun'.
369 type GbpEndpointTun struct {
370 Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
371 Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
374 // GbpExtItf defines type 'gbp_ext_itf'.
375 type GbpExtItf struct {
376 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
377 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
378 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
379 Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
382 // GbpNextHop defines type 'gbp_next_hop'.
383 type GbpNextHop struct {
384 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
385 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
386 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
387 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
390 // GbpNextHopSet defines type 'gbp_next_hop_set'.
391 type GbpNextHopSet struct {
392 HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
393 NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
394 Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
397 // GbpRecirc defines type 'gbp_recirc'.
398 type GbpRecirc struct {
399 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
400 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
401 IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
404 // GbpRouteDomain defines type 'gbp_route_domain'.
405 type GbpRouteDomain struct {
406 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
407 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
408 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
409 IP4UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
410 IP6UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
411 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
414 // GbpRule defines type 'gbp_rule'.
415 type GbpRule struct {
416 Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
417 NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
420 // GbpSubnet defines type 'gbp_subnet'.
421 type GbpSubnet struct {
422 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
423 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
424 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
425 Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
426 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
429 // GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
430 type GbpVxlanTunnel struct {
431 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
432 Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
433 BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
434 Src ip_types.IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
437 // GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
438 type GbpBridgeDomainAdd struct {
439 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
442 func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
443 func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
444 func (*GbpBridgeDomainAdd) GetCrcString() string { return "8454bfdf" }
445 func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
446 return api.RequestMessage
449 func (m *GbpBridgeDomainAdd) Size() int {
454 size += 4 // m.Bd.BdID
455 size += 4 // m.Bd.RdID
456 size += 4 // m.Bd.Flags
457 size += 4 // m.Bd.BviSwIfIndex
458 size += 4 // m.Bd.UuFwdSwIfIndex
459 size += 4 // m.Bd.BmFloodSwIfIndex
462 func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
463 var buf *codec.Buffer
465 buf = codec.NewBuffer(make([]byte, m.Size()))
467 buf = codec.NewBuffer(b)
469 buf.EncodeUint32(uint32(m.Bd.BdID))
470 buf.EncodeUint32(uint32(m.Bd.RdID))
471 buf.EncodeUint32(uint32(m.Bd.Flags))
472 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
473 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
474 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
475 return buf.Bytes(), nil
477 func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
478 buf := codec.NewBuffer(b)
479 m.Bd.BdID = buf.DecodeUint32()
480 m.Bd.RdID = buf.DecodeUint32()
481 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
482 m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
483 m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
484 m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
488 // GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
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() int {
505 size += 4 // m.Retval
508 func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) {
509 var buf *codec.Buffer
511 buf = codec.NewBuffer(make([]byte, m.Size()))
513 buf = codec.NewBuffer(b)
515 buf.EncodeUint32(uint32(m.Retval))
516 return buf.Bytes(), nil
518 func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
519 buf := codec.NewBuffer(b)
520 m.Retval = int32(buf.DecodeUint32())
524 // GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
525 type GbpBridgeDomainDel struct {
526 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
529 func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
530 func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
531 func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
532 func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
533 return api.RequestMessage
536 func (m *GbpBridgeDomainDel) Size() int {
544 func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
545 var buf *codec.Buffer
547 buf = codec.NewBuffer(make([]byte, m.Size()))
549 buf = codec.NewBuffer(b)
551 buf.EncodeUint32(uint32(m.BdID))
552 return buf.Bytes(), nil
554 func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
555 buf := codec.NewBuffer(b)
556 m.BdID = buf.DecodeUint32()
560 // GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
561 type GbpBridgeDomainDelReply struct {
562 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
565 func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
566 func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
567 func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
568 func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
569 return api.ReplyMessage
572 func (m *GbpBridgeDomainDelReply) Size() int {
577 size += 4 // m.Retval
580 func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) {
581 var buf *codec.Buffer
583 buf = codec.NewBuffer(make([]byte, m.Size()))
585 buf = codec.NewBuffer(b)
587 buf.EncodeUint32(uint32(m.Retval))
588 return buf.Bytes(), nil
590 func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
591 buf := codec.NewBuffer(b)
592 m.Retval = int32(buf.DecodeUint32())
596 // GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
597 type GbpBridgeDomainDetails struct {
598 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
601 func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
602 func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
603 func (*GbpBridgeDomainDetails) GetCrcString() string { return "2acd15f9" }
604 func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
605 return api.ReplyMessage
608 func (m *GbpBridgeDomainDetails) Size() int {
613 size += 4 // m.Bd.BdID
614 size += 4 // m.Bd.RdID
615 size += 4 // m.Bd.Flags
616 size += 4 // m.Bd.BviSwIfIndex
617 size += 4 // m.Bd.UuFwdSwIfIndex
618 size += 4 // m.Bd.BmFloodSwIfIndex
621 func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
622 var buf *codec.Buffer
624 buf = codec.NewBuffer(make([]byte, m.Size()))
626 buf = codec.NewBuffer(b)
628 buf.EncodeUint32(uint32(m.Bd.BdID))
629 buf.EncodeUint32(uint32(m.Bd.RdID))
630 buf.EncodeUint32(uint32(m.Bd.Flags))
631 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
632 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
633 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
634 return buf.Bytes(), nil
636 func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
637 buf := codec.NewBuffer(b)
638 m.Bd.BdID = buf.DecodeUint32()
639 m.Bd.RdID = buf.DecodeUint32()
640 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
641 m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
642 m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
643 m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
647 // GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
648 type GbpBridgeDomainDump struct{}
650 func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
651 func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
652 func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
653 func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
654 return api.RequestMessage
657 func (m *GbpBridgeDomainDump) Size() int {
664 func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
665 var buf *codec.Buffer
667 buf = codec.NewBuffer(make([]byte, m.Size()))
669 buf = codec.NewBuffer(b)
671 return buf.Bytes(), nil
673 func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
677 // GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
678 type GbpBridgeDomainDumpReply struct {
679 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
682 func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
683 func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
684 func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
685 func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
686 return api.ReplyMessage
689 func (m *GbpBridgeDomainDumpReply) Size() int {
694 size += 4 // m.Retval
697 func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) {
698 var buf *codec.Buffer
700 buf = codec.NewBuffer(make([]byte, m.Size()))
702 buf = codec.NewBuffer(b)
704 buf.EncodeUint32(uint32(m.Retval))
705 return buf.Bytes(), nil
707 func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
708 buf := codec.NewBuffer(b)
709 m.Retval = int32(buf.DecodeUint32())
713 // GbpContractAddDel defines message 'gbp_contract_add_del'.
714 type GbpContractAddDel struct {
715 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
716 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
719 func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
720 func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
721 func (*GbpContractAddDel) GetCrcString() string { return "553e275b" }
722 func (*GbpContractAddDel) GetMessageType() api.MessageType {
723 return api.RequestMessage
726 func (m *GbpContractAddDel) Size() int {
732 size += 2 // m.Contract.Scope
733 size += 2 // m.Contract.Sclass
734 size += 2 // m.Contract.Dclass
735 size += 4 // m.Contract.ACLIndex
736 size += 1 // m.Contract.NEtherTypes
737 size += 2 * 16 // m.Contract.AllowedEthertypes
738 size += 1 // m.Contract.NRules
739 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
742 if j2 < len(m.Contract.Rules) {
743 s2 = m.Contract.Rules[j2]
745 size += 4 // s2.Action
746 size += 4 // s2.NhSet.HashMode
747 size += 1 // s2.NhSet.NNhs
748 for j4 := 0; j4 < 8; j4++ {
751 if j4 < len(s2.NhSet.Nhs) {
752 s4 = s2.NhSet.Nhs[j4]
754 size += 1 // s4.IP.Af
755 size += 1 * 16 // s4.IP.Un
756 size += 1 * 6 // s4.Mac
763 func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
764 var buf *codec.Buffer
766 buf = codec.NewBuffer(make([]byte, m.Size()))
768 buf = codec.NewBuffer(b)
770 buf.EncodeBool(m.IsAdd)
771 buf.EncodeUint16(uint16(m.Contract.Scope))
772 buf.EncodeUint16(uint16(m.Contract.Sclass))
773 buf.EncodeUint16(uint16(m.Contract.Dclass))
774 buf.EncodeUint32(uint32(m.Contract.ACLIndex))
775 buf.EncodeUint8(uint8(m.Contract.NEtherTypes))
776 for i := 0; i < 16; i++ {
778 if i < len(m.Contract.AllowedEthertypes) {
779 x = uint16(m.Contract.AllowedEthertypes[i])
781 buf.EncodeUint16(uint16(x))
783 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
784 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
786 if j1 < len(m.Contract.Rules) {
787 v1 = m.Contract.Rules[j1]
789 buf.EncodeUint32(uint32(v1.Action))
790 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
791 buf.EncodeUint8(uint8(v1.NhSet.NNhs))
792 for j3 := 0; j3 < 8; j3++ {
794 if j3 < len(v1.NhSet.Nhs) {
795 v3 = v1.NhSet.Nhs[j3]
797 buf.EncodeUint8(uint8(v3.IP.Af))
798 buf.EncodeBytes(v3.IP.Un.XXX_UnionData[:], 0)
799 buf.EncodeBytes(v3.Mac[:], 6)
800 buf.EncodeUint32(uint32(v3.BdID))
801 buf.EncodeUint32(uint32(v3.RdID))
804 return buf.Bytes(), nil
806 func (m *GbpContractAddDel) Unmarshal(b []byte) error {
807 buf := codec.NewBuffer(b)
808 m.IsAdd = buf.DecodeBool()
809 m.Contract.Scope = GbpScope(buf.DecodeUint16())
810 m.Contract.Sclass = buf.DecodeUint16()
811 m.Contract.Dclass = buf.DecodeUint16()
812 m.Contract.ACLIndex = buf.DecodeUint32()
813 m.Contract.NEtherTypes = buf.DecodeUint8()
814 m.Contract.AllowedEthertypes = make([]uint16, 16)
815 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
816 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
818 m.Contract.NRules = buf.DecodeUint8()
819 m.Contract.Rules = make([]GbpRule, int(m.Contract.NRules))
820 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
821 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
822 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
823 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
824 for j3 := 0; j3 < 8; j3++ {
825 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
826 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
827 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
828 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
829 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
835 // GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
836 type GbpContractAddDelReply struct {
837 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
838 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
841 func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
842 func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
843 func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
844 func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
845 return api.ReplyMessage
848 func (m *GbpContractAddDelReply) Size() int {
853 size += 4 // m.Retval
854 size += 4 // m.StatsIndex
857 func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
858 var buf *codec.Buffer
860 buf = codec.NewBuffer(make([]byte, m.Size()))
862 buf = codec.NewBuffer(b)
864 buf.EncodeUint32(uint32(m.Retval))
865 buf.EncodeUint32(uint32(m.StatsIndex))
866 return buf.Bytes(), nil
868 func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
869 buf := codec.NewBuffer(b)
870 m.Retval = int32(buf.DecodeUint32())
871 m.StatsIndex = buf.DecodeUint32()
875 // GbpContractDetails defines message 'gbp_contract_details'.
876 type GbpContractDetails struct {
877 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
880 func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
881 func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
882 func (*GbpContractDetails) GetCrcString() string { return "2a18db6e" }
883 func (*GbpContractDetails) GetMessageType() api.MessageType {
884 return api.ReplyMessage
887 func (m *GbpContractDetails) Size() int {
892 size += 2 // m.Contract.Scope
893 size += 2 // m.Contract.Sclass
894 size += 2 // m.Contract.Dclass
895 size += 4 // m.Contract.ACLIndex
896 size += 1 // m.Contract.NEtherTypes
897 size += 2 * 16 // m.Contract.AllowedEthertypes
898 size += 1 // m.Contract.NRules
899 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
902 if j2 < len(m.Contract.Rules) {
903 s2 = m.Contract.Rules[j2]
905 size += 4 // s2.Action
906 size += 4 // s2.NhSet.HashMode
907 size += 1 // s2.NhSet.NNhs
908 for j4 := 0; j4 < 8; j4++ {
911 if j4 < len(s2.NhSet.Nhs) {
912 s4 = s2.NhSet.Nhs[j4]
914 size += 1 // s4.IP.Af
915 size += 1 * 16 // s4.IP.Un
916 size += 1 * 6 // s4.Mac
923 func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
924 var buf *codec.Buffer
926 buf = codec.NewBuffer(make([]byte, m.Size()))
928 buf = codec.NewBuffer(b)
930 buf.EncodeUint16(uint16(m.Contract.Scope))
931 buf.EncodeUint16(uint16(m.Contract.Sclass))
932 buf.EncodeUint16(uint16(m.Contract.Dclass))
933 buf.EncodeUint32(uint32(m.Contract.ACLIndex))
934 buf.EncodeUint8(uint8(m.Contract.NEtherTypes))
935 for i := 0; i < 16; i++ {
937 if i < len(m.Contract.AllowedEthertypes) {
938 x = uint16(m.Contract.AllowedEthertypes[i])
940 buf.EncodeUint16(uint16(x))
942 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
943 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
945 if j1 < len(m.Contract.Rules) {
946 v1 = m.Contract.Rules[j1]
948 buf.EncodeUint32(uint32(v1.Action))
949 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
950 buf.EncodeUint8(uint8(v1.NhSet.NNhs))
951 for j3 := 0; j3 < 8; j3++ {
953 if j3 < len(v1.NhSet.Nhs) {
954 v3 = v1.NhSet.Nhs[j3]
956 buf.EncodeUint8(uint8(v3.IP.Af))
957 buf.EncodeBytes(v3.IP.Un.XXX_UnionData[:], 0)
958 buf.EncodeBytes(v3.Mac[:], 6)
959 buf.EncodeUint32(uint32(v3.BdID))
960 buf.EncodeUint32(uint32(v3.RdID))
963 return buf.Bytes(), nil
965 func (m *GbpContractDetails) Unmarshal(b []byte) error {
966 buf := codec.NewBuffer(b)
967 m.Contract.Scope = GbpScope(buf.DecodeUint16())
968 m.Contract.Sclass = buf.DecodeUint16()
969 m.Contract.Dclass = buf.DecodeUint16()
970 m.Contract.ACLIndex = buf.DecodeUint32()
971 m.Contract.NEtherTypes = buf.DecodeUint8()
972 m.Contract.AllowedEthertypes = make([]uint16, 16)
973 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
974 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
976 m.Contract.NRules = buf.DecodeUint8()
977 m.Contract.Rules = make([]GbpRule, int(m.Contract.NRules))
978 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
979 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
980 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
981 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
982 for j3 := 0; j3 < 8; j3++ {
983 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
984 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
985 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
986 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
987 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
993 // GbpContractDump defines message 'gbp_contract_dump'.
994 type GbpContractDump struct{}
996 func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
997 func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
998 func (*GbpContractDump) GetCrcString() string { return "51077d14" }
999 func (*GbpContractDump) GetMessageType() api.MessageType {
1000 return api.RequestMessage
1003 func (m *GbpContractDump) Size() int {
1010 func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
1011 var buf *codec.Buffer
1013 buf = codec.NewBuffer(make([]byte, m.Size()))
1015 buf = codec.NewBuffer(b)
1017 return buf.Bytes(), nil
1019 func (m *GbpContractDump) Unmarshal(b []byte) error {
1023 // GbpEndpointAdd defines message 'gbp_endpoint_add'.
1024 type GbpEndpointAdd struct {
1025 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
1028 func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
1029 func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
1030 func (*GbpEndpointAdd) GetCrcString() string { return "9ce16d5a" }
1031 func (*GbpEndpointAdd) GetMessageType() api.MessageType {
1032 return api.RequestMessage
1035 func (m *GbpEndpointAdd) Size() int {
1040 size += 4 // m.Endpoint.SwIfIndex
1041 size += 2 // m.Endpoint.Sclass
1042 size += 4 // m.Endpoint.Flags
1043 size += 1 * 6 // m.Endpoint.Mac
1044 size += 1 // m.Endpoint.Tun.Src.Af
1045 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1046 size += 1 // m.Endpoint.Tun.Dst.Af
1047 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1048 size += 1 // m.Endpoint.NIps
1049 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1050 var s2 ip_types.Address
1052 if j2 < len(m.Endpoint.Ips) {
1053 s2 = m.Endpoint.Ips[j2]
1056 size += 1 * 16 // s2.Un
1060 func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
1061 var buf *codec.Buffer
1063 buf = codec.NewBuffer(make([]byte, m.Size()))
1065 buf = codec.NewBuffer(b)
1067 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1068 buf.EncodeUint16(uint16(m.Endpoint.Sclass))
1069 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1070 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1071 buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
1072 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 0)
1073 buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
1074 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 0)
1075 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1076 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1077 var v1 ip_types.Address
1078 if j1 < len(m.Endpoint.Ips) {
1079 v1 = m.Endpoint.Ips[j1]
1081 buf.EncodeUint8(uint8(v1.Af))
1082 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 0)
1084 return buf.Bytes(), nil
1086 func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
1087 buf := codec.NewBuffer(b)
1088 m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1089 m.Endpoint.Sclass = buf.DecodeUint16()
1090 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1091 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1092 m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1093 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1094 m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1095 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1096 m.Endpoint.NIps = buf.DecodeUint8()
1097 m.Endpoint.Ips = make([]ip_types.Address, int(m.Endpoint.NIps))
1098 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1099 m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
1100 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1105 // GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
1106 type GbpEndpointAddReply struct {
1107 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1108 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1111 func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
1112 func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
1113 func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
1114 func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
1115 return api.ReplyMessage
1118 func (m *GbpEndpointAddReply) Size() int {
1123 size += 4 // m.Retval
1124 size += 4 // m.Handle
1127 func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
1128 var buf *codec.Buffer
1130 buf = codec.NewBuffer(make([]byte, m.Size()))
1132 buf = codec.NewBuffer(b)
1134 buf.EncodeUint32(uint32(m.Retval))
1135 buf.EncodeUint32(uint32(m.Handle))
1136 return buf.Bytes(), nil
1138 func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
1139 buf := codec.NewBuffer(b)
1140 m.Retval = int32(buf.DecodeUint32())
1141 m.Handle = buf.DecodeUint32()
1145 // GbpEndpointDel defines message 'gbp_endpoint_del'.
1146 type GbpEndpointDel struct {
1147 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1150 func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
1151 func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
1152 func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
1153 func (*GbpEndpointDel) GetMessageType() api.MessageType {
1154 return api.RequestMessage
1157 func (m *GbpEndpointDel) Size() int {
1162 size += 4 // m.Handle
1165 func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
1166 var buf *codec.Buffer
1168 buf = codec.NewBuffer(make([]byte, m.Size()))
1170 buf = codec.NewBuffer(b)
1172 buf.EncodeUint32(uint32(m.Handle))
1173 return buf.Bytes(), nil
1175 func (m *GbpEndpointDel) Unmarshal(b []byte) error {
1176 buf := codec.NewBuffer(b)
1177 m.Handle = buf.DecodeUint32()
1181 // GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
1182 type GbpEndpointDelReply struct {
1183 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1186 func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
1187 func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
1188 func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
1189 func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
1190 return api.ReplyMessage
1193 func (m *GbpEndpointDelReply) Size() int {
1198 size += 4 // m.Retval
1201 func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) {
1202 var buf *codec.Buffer
1204 buf = codec.NewBuffer(make([]byte, m.Size()))
1206 buf = codec.NewBuffer(b)
1208 buf.EncodeUint32(uint32(m.Retval))
1209 return buf.Bytes(), nil
1211 func (m *GbpEndpointDelReply) Unmarshal(b []byte) error {
1212 buf := codec.NewBuffer(b)
1213 m.Retval = int32(buf.DecodeUint32())
1217 // GbpEndpointDetails defines message 'gbp_endpoint_details'.
1218 type GbpEndpointDetails struct {
1219 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
1220 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1221 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
1224 func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
1225 func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
1226 func (*GbpEndpointDetails) GetCrcString() string { return "08aecb60" }
1227 func (*GbpEndpointDetails) GetMessageType() api.MessageType {
1228 return api.ReplyMessage
1231 func (m *GbpEndpointDetails) Size() int {
1237 size += 4 // m.Handle
1238 size += 4 // m.Endpoint.SwIfIndex
1239 size += 2 // m.Endpoint.Sclass
1240 size += 4 // m.Endpoint.Flags
1241 size += 1 * 6 // m.Endpoint.Mac
1242 size += 1 // m.Endpoint.Tun.Src.Af
1243 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1244 size += 1 // m.Endpoint.Tun.Dst.Af
1245 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1246 size += 1 // m.Endpoint.NIps
1247 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1248 var s2 ip_types.Address
1250 if j2 < len(m.Endpoint.Ips) {
1251 s2 = m.Endpoint.Ips[j2]
1254 size += 1 * 16 // s2.Un
1258 func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
1259 var buf *codec.Buffer
1261 buf = codec.NewBuffer(make([]byte, m.Size()))
1263 buf = codec.NewBuffer(b)
1265 buf.EncodeFloat64(float64(m.Age))
1266 buf.EncodeUint32(uint32(m.Handle))
1267 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1268 buf.EncodeUint16(uint16(m.Endpoint.Sclass))
1269 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1270 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1271 buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
1272 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 0)
1273 buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
1274 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 0)
1275 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1276 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1277 var v1 ip_types.Address
1278 if j1 < len(m.Endpoint.Ips) {
1279 v1 = m.Endpoint.Ips[j1]
1281 buf.EncodeUint8(uint8(v1.Af))
1282 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 0)
1284 return buf.Bytes(), nil
1286 func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
1287 buf := codec.NewBuffer(b)
1288 m.Age = float64(buf.DecodeFloat64())
1289 m.Handle = buf.DecodeUint32()
1290 m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1291 m.Endpoint.Sclass = buf.DecodeUint16()
1292 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1293 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1294 m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1295 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1296 m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1297 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1298 m.Endpoint.NIps = buf.DecodeUint8()
1299 m.Endpoint.Ips = make([]ip_types.Address, int(m.Endpoint.NIps))
1300 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1301 m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
1302 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1307 // GbpEndpointDump defines message 'gbp_endpoint_dump'.
1308 type GbpEndpointDump struct{}
1310 func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
1311 func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
1312 func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
1313 func (*GbpEndpointDump) GetMessageType() api.MessageType {
1314 return api.RequestMessage
1317 func (m *GbpEndpointDump) Size() int {
1324 func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
1325 var buf *codec.Buffer
1327 buf = codec.NewBuffer(make([]byte, m.Size()))
1329 buf = codec.NewBuffer(b)
1331 return buf.Bytes(), nil
1333 func (m *GbpEndpointDump) Unmarshal(b []byte) error {
1337 // GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
1338 type GbpEndpointGroupAdd struct {
1339 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
1342 func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
1343 func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
1344 func (*GbpEndpointGroupAdd) GetCrcString() string { return "8e0f4054" }
1345 func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
1346 return api.RequestMessage
1349 func (m *GbpEndpointGroupAdd) Size() int {
1354 size += 4 // m.Epg.Vnid
1355 size += 2 // m.Epg.Sclass
1356 size += 4 // m.Epg.BdID
1357 size += 4 // m.Epg.RdID
1358 size += 4 // m.Epg.UplinkSwIfIndex
1359 size += 4 // m.Epg.Retention.RemoteEpTimeout
1362 func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
1363 var buf *codec.Buffer
1365 buf = codec.NewBuffer(make([]byte, m.Size()))
1367 buf = codec.NewBuffer(b)
1369 buf.EncodeUint32(uint32(m.Epg.Vnid))
1370 buf.EncodeUint16(uint16(m.Epg.Sclass))
1371 buf.EncodeUint32(uint32(m.Epg.BdID))
1372 buf.EncodeUint32(uint32(m.Epg.RdID))
1373 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
1374 buf.EncodeUint32(uint32(m.Epg.Retention.RemoteEpTimeout))
1375 return buf.Bytes(), nil
1377 func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
1378 buf := codec.NewBuffer(b)
1379 m.Epg.Vnid = buf.DecodeUint32()
1380 m.Epg.Sclass = buf.DecodeUint16()
1381 m.Epg.BdID = buf.DecodeUint32()
1382 m.Epg.RdID = buf.DecodeUint32()
1383 m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1384 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
1388 // GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
1389 type GbpEndpointGroupAddReply struct {
1390 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1393 func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
1394 func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
1395 func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
1396 func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
1397 return api.ReplyMessage
1400 func (m *GbpEndpointGroupAddReply) Size() int {
1405 size += 4 // m.Retval
1408 func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) {
1409 var buf *codec.Buffer
1411 buf = codec.NewBuffer(make([]byte, m.Size()))
1413 buf = codec.NewBuffer(b)
1415 buf.EncodeUint32(uint32(m.Retval))
1416 return buf.Bytes(), nil
1418 func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
1419 buf := codec.NewBuffer(b)
1420 m.Retval = int32(buf.DecodeUint32())
1424 // GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
1425 type GbpEndpointGroupDel struct {
1426 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1429 func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
1430 func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
1431 func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
1432 func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
1433 return api.RequestMessage
1436 func (m *GbpEndpointGroupDel) Size() int {
1441 size += 2 // m.Sclass
1444 func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
1445 var buf *codec.Buffer
1447 buf = codec.NewBuffer(make([]byte, m.Size()))
1449 buf = codec.NewBuffer(b)
1451 buf.EncodeUint16(uint16(m.Sclass))
1452 return buf.Bytes(), nil
1454 func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
1455 buf := codec.NewBuffer(b)
1456 m.Sclass = buf.DecodeUint16()
1460 // GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
1461 type GbpEndpointGroupDelReply struct {
1462 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1465 func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
1466 func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
1467 func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
1468 func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
1469 return api.ReplyMessage
1472 func (m *GbpEndpointGroupDelReply) Size() int {
1477 size += 4 // m.Retval
1480 func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) {
1481 var buf *codec.Buffer
1483 buf = codec.NewBuffer(make([]byte, m.Size()))
1485 buf = codec.NewBuffer(b)
1487 buf.EncodeUint32(uint32(m.Retval))
1488 return buf.Bytes(), nil
1490 func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
1491 buf := codec.NewBuffer(b)
1492 m.Retval = int32(buf.DecodeUint32())
1496 // GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
1497 type GbpEndpointGroupDetails struct {
1498 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
1501 func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
1502 func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
1503 func (*GbpEndpointGroupDetails) GetCrcString() string { return "8f38292c" }
1504 func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
1505 return api.ReplyMessage
1508 func (m *GbpEndpointGroupDetails) Size() int {
1513 size += 4 // m.Epg.Vnid
1514 size += 2 // m.Epg.Sclass
1515 size += 4 // m.Epg.BdID
1516 size += 4 // m.Epg.RdID
1517 size += 4 // m.Epg.UplinkSwIfIndex
1518 size += 4 // m.Epg.Retention.RemoteEpTimeout
1521 func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
1522 var buf *codec.Buffer
1524 buf = codec.NewBuffer(make([]byte, m.Size()))
1526 buf = codec.NewBuffer(b)
1528 buf.EncodeUint32(uint32(m.Epg.Vnid))
1529 buf.EncodeUint16(uint16(m.Epg.Sclass))
1530 buf.EncodeUint32(uint32(m.Epg.BdID))
1531 buf.EncodeUint32(uint32(m.Epg.RdID))
1532 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
1533 buf.EncodeUint32(uint32(m.Epg.Retention.RemoteEpTimeout))
1534 return buf.Bytes(), nil
1536 func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
1537 buf := codec.NewBuffer(b)
1538 m.Epg.Vnid = buf.DecodeUint32()
1539 m.Epg.Sclass = buf.DecodeUint16()
1540 m.Epg.BdID = buf.DecodeUint32()
1541 m.Epg.RdID = buf.DecodeUint32()
1542 m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1543 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
1547 // GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
1548 type GbpEndpointGroupDump struct{}
1550 func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
1551 func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
1552 func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
1553 func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
1554 return api.RequestMessage
1557 func (m *GbpEndpointGroupDump) Size() int {
1564 func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
1565 var buf *codec.Buffer
1567 buf = codec.NewBuffer(make([]byte, m.Size()))
1569 buf = codec.NewBuffer(b)
1571 return buf.Bytes(), nil
1573 func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
1577 // GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
1578 type GbpExtItfAddDel struct {
1579 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1580 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
1583 func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
1584 func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
1585 func (*GbpExtItfAddDel) GetCrcString() string { return "12ed5700" }
1586 func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
1587 return api.RequestMessage
1590 func (m *GbpExtItfAddDel) Size() int {
1595 size += 1 // m.IsAdd
1596 size += 4 // m.ExtItf.SwIfIndex
1597 size += 4 // m.ExtItf.BdID
1598 size += 4 // m.ExtItf.RdID
1599 size += 4 // m.ExtItf.Flags
1602 func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) {
1603 var buf *codec.Buffer
1605 buf = codec.NewBuffer(make([]byte, m.Size()))
1607 buf = codec.NewBuffer(b)
1609 buf.EncodeBool(m.IsAdd)
1610 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
1611 buf.EncodeUint32(uint32(m.ExtItf.BdID))
1612 buf.EncodeUint32(uint32(m.ExtItf.RdID))
1613 buf.EncodeUint32(uint32(m.ExtItf.Flags))
1614 return buf.Bytes(), nil
1616 func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
1617 buf := codec.NewBuffer(b)
1618 m.IsAdd = buf.DecodeBool()
1619 m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1620 m.ExtItf.BdID = buf.DecodeUint32()
1621 m.ExtItf.RdID = buf.DecodeUint32()
1622 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
1626 // GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
1627 type GbpExtItfAddDelReply struct {
1628 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1631 func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
1632 func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
1633 func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
1634 func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
1635 return api.ReplyMessage
1638 func (m *GbpExtItfAddDelReply) Size() int {
1643 size += 4 // m.Retval
1646 func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) {
1647 var buf *codec.Buffer
1649 buf = codec.NewBuffer(make([]byte, m.Size()))
1651 buf = codec.NewBuffer(b)
1653 buf.EncodeUint32(uint32(m.Retval))
1654 return buf.Bytes(), nil
1656 func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
1657 buf := codec.NewBuffer(b)
1658 m.Retval = int32(buf.DecodeUint32())
1662 // GbpExtItfDetails defines message 'gbp_ext_itf_details'.
1663 type GbpExtItfDetails struct {
1664 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
1667 func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
1668 func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
1669 func (*GbpExtItfDetails) GetCrcString() string { return "408a45c0" }
1670 func (*GbpExtItfDetails) GetMessageType() api.MessageType {
1671 return api.ReplyMessage
1674 func (m *GbpExtItfDetails) Size() int {
1679 size += 4 // m.ExtItf.SwIfIndex
1680 size += 4 // m.ExtItf.BdID
1681 size += 4 // m.ExtItf.RdID
1682 size += 4 // m.ExtItf.Flags
1685 func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
1686 var buf *codec.Buffer
1688 buf = codec.NewBuffer(make([]byte, m.Size()))
1690 buf = codec.NewBuffer(b)
1692 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
1693 buf.EncodeUint32(uint32(m.ExtItf.BdID))
1694 buf.EncodeUint32(uint32(m.ExtItf.RdID))
1695 buf.EncodeUint32(uint32(m.ExtItf.Flags))
1696 return buf.Bytes(), nil
1698 func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
1699 buf := codec.NewBuffer(b)
1700 m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1701 m.ExtItf.BdID = buf.DecodeUint32()
1702 m.ExtItf.RdID = buf.DecodeUint32()
1703 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
1707 // GbpExtItfDump defines message 'gbp_ext_itf_dump'.
1708 type GbpExtItfDump struct{}
1710 func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
1711 func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
1712 func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
1713 func (*GbpExtItfDump) GetMessageType() api.MessageType {
1714 return api.RequestMessage
1717 func (m *GbpExtItfDump) Size() int {
1724 func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
1725 var buf *codec.Buffer
1727 buf = codec.NewBuffer(make([]byte, m.Size()))
1729 buf = codec.NewBuffer(b)
1731 return buf.Bytes(), nil
1733 func (m *GbpExtItfDump) Unmarshal(b []byte) error {
1737 // GbpRecircAddDel defines message 'gbp_recirc_add_del'.
1738 type GbpRecircAddDel struct {
1739 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1740 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
1743 func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
1744 func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
1745 func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
1746 func (*GbpRecircAddDel) GetMessageType() api.MessageType {
1747 return api.RequestMessage
1750 func (m *GbpRecircAddDel) Size() int {
1755 size += 1 // m.IsAdd
1756 size += 4 // m.Recirc.SwIfIndex
1757 size += 2 // m.Recirc.Sclass
1758 size += 1 // m.Recirc.IsExt
1761 func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) {
1762 var buf *codec.Buffer
1764 buf = codec.NewBuffer(make([]byte, m.Size()))
1766 buf = codec.NewBuffer(b)
1768 buf.EncodeBool(m.IsAdd)
1769 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
1770 buf.EncodeUint16(uint16(m.Recirc.Sclass))
1771 buf.EncodeBool(m.Recirc.IsExt)
1772 return buf.Bytes(), nil
1774 func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
1775 buf := codec.NewBuffer(b)
1776 m.IsAdd = buf.DecodeBool()
1777 m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1778 m.Recirc.Sclass = buf.DecodeUint16()
1779 m.Recirc.IsExt = buf.DecodeBool()
1783 // GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
1784 type GbpRecircAddDelReply struct {
1785 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1788 func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
1789 func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
1790 func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
1791 func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
1792 return api.ReplyMessage
1795 func (m *GbpRecircAddDelReply) Size() int {
1800 size += 4 // m.Retval
1803 func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) {
1804 var buf *codec.Buffer
1806 buf = codec.NewBuffer(make([]byte, m.Size()))
1808 buf = codec.NewBuffer(b)
1810 buf.EncodeUint32(uint32(m.Retval))
1811 return buf.Bytes(), nil
1813 func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error {
1814 buf := codec.NewBuffer(b)
1815 m.Retval = int32(buf.DecodeUint32())
1819 // GbpRecircDetails defines message 'gbp_recirc_details'.
1820 type GbpRecircDetails struct {
1821 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
1824 func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
1825 func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
1826 func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
1827 func (*GbpRecircDetails) GetMessageType() api.MessageType {
1828 return api.ReplyMessage
1831 func (m *GbpRecircDetails) Size() int {
1836 size += 4 // m.Recirc.SwIfIndex
1837 size += 2 // m.Recirc.Sclass
1838 size += 1 // m.Recirc.IsExt
1841 func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
1842 var buf *codec.Buffer
1844 buf = codec.NewBuffer(make([]byte, m.Size()))
1846 buf = codec.NewBuffer(b)
1848 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
1849 buf.EncodeUint16(uint16(m.Recirc.Sclass))
1850 buf.EncodeBool(m.Recirc.IsExt)
1851 return buf.Bytes(), nil
1853 func (m *GbpRecircDetails) Unmarshal(b []byte) error {
1854 buf := codec.NewBuffer(b)
1855 m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1856 m.Recirc.Sclass = buf.DecodeUint16()
1857 m.Recirc.IsExt = buf.DecodeBool()
1861 // GbpRecircDump defines message 'gbp_recirc_dump'.
1862 type GbpRecircDump struct{}
1864 func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
1865 func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
1866 func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
1867 func (*GbpRecircDump) GetMessageType() api.MessageType {
1868 return api.RequestMessage
1871 func (m *GbpRecircDump) Size() int {
1878 func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
1879 var buf *codec.Buffer
1881 buf = codec.NewBuffer(make([]byte, m.Size()))
1883 buf = codec.NewBuffer(b)
1885 return buf.Bytes(), nil
1887 func (m *GbpRecircDump) Unmarshal(b []byte) error {
1891 // GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
1892 type GbpRouteDomainAdd struct {
1893 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
1896 func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
1897 func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
1898 func (*GbpRouteDomainAdd) GetCrcString() string { return "2d0afe38" }
1899 func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
1900 return api.RequestMessage
1903 func (m *GbpRouteDomainAdd) Size() int {
1908 size += 4 // m.Rd.RdID
1909 size += 4 // m.Rd.IP4TableID
1910 size += 4 // m.Rd.IP6TableID
1911 size += 4 // m.Rd.IP4UuSwIfIndex
1912 size += 4 // m.Rd.IP6UuSwIfIndex
1913 size += 2 // m.Rd.Scope
1916 func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
1917 var buf *codec.Buffer
1919 buf = codec.NewBuffer(make([]byte, m.Size()))
1921 buf = codec.NewBuffer(b)
1923 buf.EncodeUint32(uint32(m.Rd.RdID))
1924 buf.EncodeUint32(uint32(m.Rd.IP4TableID))
1925 buf.EncodeUint32(uint32(m.Rd.IP6TableID))
1926 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
1927 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
1928 buf.EncodeUint16(uint16(m.Rd.Scope))
1929 return buf.Bytes(), nil
1931 func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
1932 buf := codec.NewBuffer(b)
1933 m.Rd.RdID = buf.DecodeUint32()
1934 m.Rd.IP4TableID = buf.DecodeUint32()
1935 m.Rd.IP6TableID = buf.DecodeUint32()
1936 m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1937 m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1938 m.Rd.Scope = GbpScope(buf.DecodeUint16())
1942 // GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
1943 type GbpRouteDomainAddReply struct {
1944 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1947 func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
1948 func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
1949 func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
1950 func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
1951 return api.ReplyMessage
1954 func (m *GbpRouteDomainAddReply) Size() int {
1959 size += 4 // m.Retval
1962 func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) {
1963 var buf *codec.Buffer
1965 buf = codec.NewBuffer(make([]byte, m.Size()))
1967 buf = codec.NewBuffer(b)
1969 buf.EncodeUint32(uint32(m.Retval))
1970 return buf.Bytes(), nil
1972 func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
1973 buf := codec.NewBuffer(b)
1974 m.Retval = int32(buf.DecodeUint32())
1978 // GbpRouteDomainDel defines message 'gbp_route_domain_del'.
1979 type GbpRouteDomainDel struct {
1980 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1983 func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
1984 func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
1985 func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
1986 func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
1987 return api.RequestMessage
1990 func (m *GbpRouteDomainDel) Size() int {
1998 func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
1999 var buf *codec.Buffer
2001 buf = codec.NewBuffer(make([]byte, m.Size()))
2003 buf = codec.NewBuffer(b)
2005 buf.EncodeUint32(uint32(m.RdID))
2006 return buf.Bytes(), nil
2008 func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
2009 buf := codec.NewBuffer(b)
2010 m.RdID = buf.DecodeUint32()
2014 // GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
2015 type GbpRouteDomainDelReply struct {
2016 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2019 func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
2020 func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
2021 func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
2022 func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
2023 return api.ReplyMessage
2026 func (m *GbpRouteDomainDelReply) Size() int {
2031 size += 4 // m.Retval
2034 func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) {
2035 var buf *codec.Buffer
2037 buf = codec.NewBuffer(make([]byte, m.Size()))
2039 buf = codec.NewBuffer(b)
2041 buf.EncodeUint32(uint32(m.Retval))
2042 return buf.Bytes(), nil
2044 func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
2045 buf := codec.NewBuffer(b)
2046 m.Retval = int32(buf.DecodeUint32())
2050 // GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
2051 type GbpRouteDomainDetails struct {
2052 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
2055 func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
2056 func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
2057 func (*GbpRouteDomainDetails) GetCrcString() string { return "8ab11375" }
2058 func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
2059 return api.ReplyMessage
2062 func (m *GbpRouteDomainDetails) Size() int {
2067 size += 4 // m.Rd.RdID
2068 size += 4 // m.Rd.IP4TableID
2069 size += 4 // m.Rd.IP6TableID
2070 size += 4 // m.Rd.IP4UuSwIfIndex
2071 size += 4 // m.Rd.IP6UuSwIfIndex
2072 size += 2 // m.Rd.Scope
2075 func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
2076 var buf *codec.Buffer
2078 buf = codec.NewBuffer(make([]byte, m.Size()))
2080 buf = codec.NewBuffer(b)
2082 buf.EncodeUint32(uint32(m.Rd.RdID))
2083 buf.EncodeUint32(uint32(m.Rd.IP4TableID))
2084 buf.EncodeUint32(uint32(m.Rd.IP6TableID))
2085 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
2086 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
2087 buf.EncodeUint16(uint16(m.Rd.Scope))
2088 return buf.Bytes(), nil
2090 func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
2091 buf := codec.NewBuffer(b)
2092 m.Rd.RdID = buf.DecodeUint32()
2093 m.Rd.IP4TableID = buf.DecodeUint32()
2094 m.Rd.IP6TableID = buf.DecodeUint32()
2095 m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2096 m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2097 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2101 // GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
2102 type GbpRouteDomainDump struct{}
2104 func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
2105 func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
2106 func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
2107 func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
2108 return api.RequestMessage
2111 func (m *GbpRouteDomainDump) Size() int {
2118 func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
2119 var buf *codec.Buffer
2121 buf = codec.NewBuffer(make([]byte, m.Size()))
2123 buf = codec.NewBuffer(b)
2125 return buf.Bytes(), nil
2127 func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
2131 // GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
2132 type GbpRouteDomainDumpReply struct {
2133 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2136 func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
2137 func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
2138 func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
2139 func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
2140 return api.ReplyMessage
2143 func (m *GbpRouteDomainDumpReply) Size() int {
2148 size += 4 // m.Retval
2151 func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) {
2152 var buf *codec.Buffer
2154 buf = codec.NewBuffer(make([]byte, m.Size()))
2156 buf = codec.NewBuffer(b)
2158 buf.EncodeUint32(uint32(m.Retval))
2159 return buf.Bytes(), nil
2161 func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
2162 buf := codec.NewBuffer(b)
2163 m.Retval = int32(buf.DecodeUint32())
2167 // GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
2168 type GbpSubnetAddDel struct {
2169 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2170 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2173 func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
2174 func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
2175 func (*GbpSubnetAddDel) GetCrcString() string { return "888aca35" }
2176 func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
2177 return api.RequestMessage
2180 func (m *GbpSubnetAddDel) Size() int {
2185 size += 1 // m.IsAdd
2186 size += 4 // m.Subnet.RdID
2187 size += 4 // m.Subnet.SwIfIndex
2188 size += 2 // m.Subnet.Sclass
2189 size += 4 // m.Subnet.Type
2190 size += 1 // m.Subnet.Prefix.Address.Af
2191 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2192 size += 1 // m.Subnet.Prefix.Len
2195 func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
2196 var buf *codec.Buffer
2198 buf = codec.NewBuffer(make([]byte, m.Size()))
2200 buf = codec.NewBuffer(b)
2202 buf.EncodeBool(m.IsAdd)
2203 buf.EncodeUint32(uint32(m.Subnet.RdID))
2204 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2205 buf.EncodeUint16(uint16(m.Subnet.Sclass))
2206 buf.EncodeUint32(uint32(m.Subnet.Type))
2207 buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
2208 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 0)
2209 buf.EncodeUint8(uint8(m.Subnet.Prefix.Len))
2210 return buf.Bytes(), nil
2212 func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
2213 buf := codec.NewBuffer(b)
2214 m.IsAdd = buf.DecodeBool()
2215 m.Subnet.RdID = buf.DecodeUint32()
2216 m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2217 m.Subnet.Sclass = buf.DecodeUint16()
2218 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2219 m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2220 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2221 m.Subnet.Prefix.Len = buf.DecodeUint8()
2225 // GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
2226 type GbpSubnetAddDelReply struct {
2227 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2230 func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
2231 func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
2232 func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
2233 func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
2234 return api.ReplyMessage
2237 func (m *GbpSubnetAddDelReply) Size() int {
2242 size += 4 // m.Retval
2245 func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) {
2246 var buf *codec.Buffer
2248 buf = codec.NewBuffer(make([]byte, m.Size()))
2250 buf = codec.NewBuffer(b)
2252 buf.EncodeUint32(uint32(m.Retval))
2253 return buf.Bytes(), nil
2255 func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
2256 buf := codec.NewBuffer(b)
2257 m.Retval = int32(buf.DecodeUint32())
2261 // GbpSubnetDetails defines message 'gbp_subnet_details'.
2262 type GbpSubnetDetails struct {
2263 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2266 func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
2267 func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
2268 func (*GbpSubnetDetails) GetCrcString() string { return "4ed84156" }
2269 func (*GbpSubnetDetails) GetMessageType() api.MessageType {
2270 return api.ReplyMessage
2273 func (m *GbpSubnetDetails) Size() int {
2278 size += 4 // m.Subnet.RdID
2279 size += 4 // m.Subnet.SwIfIndex
2280 size += 2 // m.Subnet.Sclass
2281 size += 4 // m.Subnet.Type
2282 size += 1 // m.Subnet.Prefix.Address.Af
2283 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2284 size += 1 // m.Subnet.Prefix.Len
2287 func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
2288 var buf *codec.Buffer
2290 buf = codec.NewBuffer(make([]byte, m.Size()))
2292 buf = codec.NewBuffer(b)
2294 buf.EncodeUint32(uint32(m.Subnet.RdID))
2295 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2296 buf.EncodeUint16(uint16(m.Subnet.Sclass))
2297 buf.EncodeUint32(uint32(m.Subnet.Type))
2298 buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
2299 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 0)
2300 buf.EncodeUint8(uint8(m.Subnet.Prefix.Len))
2301 return buf.Bytes(), nil
2303 func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
2304 buf := codec.NewBuffer(b)
2305 m.Subnet.RdID = buf.DecodeUint32()
2306 m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2307 m.Subnet.Sclass = buf.DecodeUint16()
2308 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2309 m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2310 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2311 m.Subnet.Prefix.Len = buf.DecodeUint8()
2315 // GbpSubnetDump defines message 'gbp_subnet_dump'.
2316 type GbpSubnetDump struct{}
2318 func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
2319 func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
2320 func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
2321 func (*GbpSubnetDump) GetMessageType() api.MessageType {
2322 return api.RequestMessage
2325 func (m *GbpSubnetDump) Size() int {
2332 func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
2333 var buf *codec.Buffer
2335 buf = codec.NewBuffer(make([]byte, m.Size()))
2337 buf = codec.NewBuffer(b)
2339 return buf.Bytes(), nil
2341 func (m *GbpSubnetDump) Unmarshal(b []byte) error {
2345 // GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
2346 type GbpVxlanTunnelAdd struct {
2347 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
2350 func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
2351 func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
2352 func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
2353 func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
2354 return api.RequestMessage
2357 func (m *GbpVxlanTunnelAdd) Size() int {
2362 size += 4 // m.Tunnel.Vni
2363 size += 4 // m.Tunnel.Mode
2364 size += 4 // m.Tunnel.BdRdID
2365 size += 1 * 4 // m.Tunnel.Src
2368 func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
2369 var buf *codec.Buffer
2371 buf = codec.NewBuffer(make([]byte, m.Size()))
2373 buf = codec.NewBuffer(b)
2375 buf.EncodeUint32(uint32(m.Tunnel.Vni))
2376 buf.EncodeUint32(uint32(m.Tunnel.Mode))
2377 buf.EncodeUint32(uint32(m.Tunnel.BdRdID))
2378 buf.EncodeBytes(m.Tunnel.Src[:], 4)
2379 return buf.Bytes(), nil
2381 func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
2382 buf := codec.NewBuffer(b)
2383 m.Tunnel.Vni = buf.DecodeUint32()
2384 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
2385 m.Tunnel.BdRdID = buf.DecodeUint32()
2386 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
2390 // GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
2391 type GbpVxlanTunnelAddReply struct {
2392 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2393 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2396 func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
2397 func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
2398 func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
2399 func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
2400 return api.ReplyMessage
2403 func (m *GbpVxlanTunnelAddReply) Size() int {
2408 size += 4 // m.Retval
2409 size += 4 // m.SwIfIndex
2412 func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
2413 var buf *codec.Buffer
2415 buf = codec.NewBuffer(make([]byte, m.Size()))
2417 buf = codec.NewBuffer(b)
2419 buf.EncodeUint32(uint32(m.Retval))
2420 buf.EncodeUint32(uint32(m.SwIfIndex))
2421 return buf.Bytes(), nil
2423 func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
2424 buf := codec.NewBuffer(b)
2425 m.Retval = int32(buf.DecodeUint32())
2426 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2430 // GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
2431 type GbpVxlanTunnelDel struct {
2432 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
2435 func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
2436 func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
2437 func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
2438 func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
2439 return api.RequestMessage
2442 func (m *GbpVxlanTunnelDel) Size() int {
2450 func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
2451 var buf *codec.Buffer
2453 buf = codec.NewBuffer(make([]byte, m.Size()))
2455 buf = codec.NewBuffer(b)
2457 buf.EncodeUint32(uint32(m.Vni))
2458 return buf.Bytes(), nil
2460 func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
2461 buf := codec.NewBuffer(b)
2462 m.Vni = buf.DecodeUint32()
2466 // GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
2467 type GbpVxlanTunnelDelReply struct {
2468 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2471 func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
2472 func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
2473 func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
2474 func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
2475 return api.ReplyMessage
2478 func (m *GbpVxlanTunnelDelReply) Size() int {
2483 size += 4 // m.Retval
2486 func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) {
2487 var buf *codec.Buffer
2489 buf = codec.NewBuffer(make([]byte, m.Size()))
2491 buf = codec.NewBuffer(b)
2493 buf.EncodeUint32(uint32(m.Retval))
2494 return buf.Bytes(), nil
2496 func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
2497 buf := codec.NewBuffer(b)
2498 m.Retval = int32(buf.DecodeUint32())
2502 // GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
2503 type GbpVxlanTunnelDetails struct {
2504 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
2507 func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
2508 func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
2509 func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
2510 func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
2511 return api.ReplyMessage
2514 func (m *GbpVxlanTunnelDetails) Size() int {
2519 size += 4 // m.Tunnel.Vni
2520 size += 4 // m.Tunnel.Mode
2521 size += 4 // m.Tunnel.BdRdID
2522 size += 1 * 4 // m.Tunnel.Src
2525 func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
2526 var buf *codec.Buffer
2528 buf = codec.NewBuffer(make([]byte, m.Size()))
2530 buf = codec.NewBuffer(b)
2532 buf.EncodeUint32(uint32(m.Tunnel.Vni))
2533 buf.EncodeUint32(uint32(m.Tunnel.Mode))
2534 buf.EncodeUint32(uint32(m.Tunnel.BdRdID))
2535 buf.EncodeBytes(m.Tunnel.Src[:], 4)
2536 return buf.Bytes(), nil
2538 func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
2539 buf := codec.NewBuffer(b)
2540 m.Tunnel.Vni = buf.DecodeUint32()
2541 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
2542 m.Tunnel.BdRdID = buf.DecodeUint32()
2543 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
2547 // GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
2548 type GbpVxlanTunnelDump struct{}
2550 func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
2551 func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
2552 func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
2553 func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
2554 return api.RequestMessage
2557 func (m *GbpVxlanTunnelDump) Size() int {
2564 func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
2565 var buf *codec.Buffer
2567 buf = codec.NewBuffer(make([]byte, m.Size()))
2569 buf = codec.NewBuffer(b)
2571 return buf.Bytes(), nil
2573 func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
2577 func init() { file_gbp_binapi_init() }
2578 func file_gbp_binapi_init() {
2579 api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_8454bfdf")
2580 api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
2581 api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
2582 api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
2583 api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_2acd15f9")
2584 api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
2585 api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
2586 api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_553e275b")
2587 api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
2588 api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_2a18db6e")
2589 api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
2590 api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_9ce16d5a")
2591 api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
2592 api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
2593 api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
2594 api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_08aecb60")
2595 api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
2596 api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_8e0f4054")
2597 api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
2598 api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
2599 api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
2600 api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_8f38292c")
2601 api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
2602 api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_12ed5700")
2603 api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
2604 api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_408a45c0")
2605 api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
2606 api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
2607 api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
2608 api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
2609 api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
2610 api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_2d0afe38")
2611 api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
2612 api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
2613 api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
2614 api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_8ab11375")
2615 api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
2616 api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
2617 api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_888aca35")
2618 api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
2619 api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_4ed84156")
2620 api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
2621 api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
2622 api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
2623 api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
2624 api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
2625 api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
2626 api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
2629 // Messages returns list of all messages in this module.
2630 func AllMessages() []api.Message {
2631 return []api.Message{
2632 (*GbpBridgeDomainAdd)(nil),
2633 (*GbpBridgeDomainAddReply)(nil),
2634 (*GbpBridgeDomainDel)(nil),
2635 (*GbpBridgeDomainDelReply)(nil),
2636 (*GbpBridgeDomainDetails)(nil),
2637 (*GbpBridgeDomainDump)(nil),
2638 (*GbpBridgeDomainDumpReply)(nil),
2639 (*GbpContractAddDel)(nil),
2640 (*GbpContractAddDelReply)(nil),
2641 (*GbpContractDetails)(nil),
2642 (*GbpContractDump)(nil),
2643 (*GbpEndpointAdd)(nil),
2644 (*GbpEndpointAddReply)(nil),
2645 (*GbpEndpointDel)(nil),
2646 (*GbpEndpointDelReply)(nil),
2647 (*GbpEndpointDetails)(nil),
2648 (*GbpEndpointDump)(nil),
2649 (*GbpEndpointGroupAdd)(nil),
2650 (*GbpEndpointGroupAddReply)(nil),
2651 (*GbpEndpointGroupDel)(nil),
2652 (*GbpEndpointGroupDelReply)(nil),
2653 (*GbpEndpointGroupDetails)(nil),
2654 (*GbpEndpointGroupDump)(nil),
2655 (*GbpExtItfAddDel)(nil),
2656 (*GbpExtItfAddDelReply)(nil),
2657 (*GbpExtItfDetails)(nil),
2658 (*GbpExtItfDump)(nil),
2659 (*GbpRecircAddDel)(nil),
2660 (*GbpRecircAddDelReply)(nil),
2661 (*GbpRecircDetails)(nil),
2662 (*GbpRecircDump)(nil),
2663 (*GbpRouteDomainAdd)(nil),
2664 (*GbpRouteDomainAddReply)(nil),
2665 (*GbpRouteDomainDel)(nil),
2666 (*GbpRouteDomainDelReply)(nil),
2667 (*GbpRouteDomainDetails)(nil),
2668 (*GbpRouteDomainDump)(nil),
2669 (*GbpRouteDomainDumpReply)(nil),
2670 (*GbpSubnetAddDel)(nil),
2671 (*GbpSubnetAddDelReply)(nil),
2672 (*GbpSubnetDetails)(nil),
2673 (*GbpSubnetDump)(nil),
2674 (*GbpVxlanTunnelAdd)(nil),
2675 (*GbpVxlanTunnelAddReply)(nil),
2676 (*GbpVxlanTunnelDel)(nil),
2677 (*GbpVxlanTunnelDelReply)(nil),
2678 (*GbpVxlanTunnelDetails)(nil),
2679 (*GbpVxlanTunnelDump)(nil),