X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fgbp%2Fgbp.ba.go;h=ee73d9bc5a355dcc5be00866c1098a377919ccf2;hb=refs%2Ftags%2Fv0.4.0;hp=5baa4f5b6792998c2420f85b6aa43a1fb62d4c62;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/gbp/gbp.ba.go b/binapi/gbp/gbp.ba.go index 5baa4f5..ee73d9b 100644 --- a/binapi/gbp/gbp.ba.go +++ b/binapi/gbp/gbp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 20.05-release +// binapi-generator: v0.4.0 +// VPP: 21.06-release // source: /usr/share/vpp/api/plugins/gbp.api.json // Package gbp contains generated bindings for API file gbp.api. @@ -15,12 +15,13 @@ package gbp import ( + "strconv" + api "git.fd.io/govpp.git/api" ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types" interface_types "git.fd.io/govpp.git/binapi/interface_types" ip_types "git.fd.io/govpp.git/binapi/ip_types" codec "git.fd.io/govpp.git/codec" - "strconv" ) // This is a compile-time assertion to ensure that this generated file @@ -32,7 +33,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "gbp" APIVersion = "2.0.0" - VersionCrc = 0xa084c6b0 + VersionCrc = 0x5b2d93 ) // GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'. @@ -420,8 +421,8 @@ type GbpRule struct { // GbpSubnet defines type 'gbp_subnet'. type GbpSubnet struct { RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"` - SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` - Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` + Sclass uint16 `binapi:"u16,name=sclass,default=4294967295" json:"sclass,omitempty"` Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"` Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` } @@ -435,22 +436,22 @@ type GbpVxlanTunnel struct { } // GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainAdd struct { Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"` } func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} } func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" } -func (*GbpBridgeDomainAdd) GetCrcString() string { return "8454bfdf" } +func (*GbpBridgeDomainAdd) GetCrcString() string { return "918e8c01" } func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpBridgeDomainAdd) Size() int { +func (m *GbpBridgeDomainAdd) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Bd.BdID size += 4 // m.Bd.RdID size += 4 // m.Bd.Flags @@ -460,14 +461,12 @@ func (m *GbpBridgeDomainAdd) Size() int { return size } func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Bd.BdID)) - buf.EncodeUint32(uint32(m.Bd.RdID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Bd.BdID) + buf.EncodeUint32(m.Bd.RdID) buf.EncodeUint32(uint32(m.Bd.Flags)) buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex)) buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex)) @@ -486,6 +485,7 @@ func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error { } // GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -497,31 +497,29 @@ func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpBridgeDomainAddReply) Size() int { +func (m *GbpBridgeDomainAddReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainDel struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` } @@ -533,22 +531,19 @@ func (*GbpBridgeDomainDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpBridgeDomainDel) Size() int { +func (m *GbpBridgeDomainDel) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.BdID return size } func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.BdID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.BdID) return buf.Bytes(), nil } func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error { @@ -558,6 +553,7 @@ func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error { } // GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -569,47 +565,44 @@ func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpBridgeDomainDelReply) Size() int { +func (m *GbpBridgeDomainDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainDetails struct { Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"` } func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} } func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" } -func (*GbpBridgeDomainDetails) GetCrcString() string { return "2acd15f9" } +func (*GbpBridgeDomainDetails) GetCrcString() string { return "51d51be9" } func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpBridgeDomainDetails) Size() int { +func (m *GbpBridgeDomainDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Bd.BdID size += 4 // m.Bd.RdID size += 4 // m.Bd.Flags @@ -619,14 +612,12 @@ func (m *GbpBridgeDomainDetails) Size() int { return size } func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Bd.BdID)) - buf.EncodeUint32(uint32(m.Bd.RdID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Bd.BdID) + buf.EncodeUint32(m.Bd.RdID) buf.EncodeUint32(uint32(m.Bd.Flags)) buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex)) buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex)) @@ -645,6 +636,7 @@ func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error { } // GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainDump struct{} func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} } @@ -654,20 +646,17 @@ func (*GbpBridgeDomainDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpBridgeDomainDump) Size() int { +func (m *GbpBridgeDomainDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error { @@ -675,6 +664,7 @@ func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error { } // GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'. +// InProgress: the message form may change in the future versions type GbpBridgeDomainDumpReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -686,31 +676,29 @@ func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpBridgeDomainDumpReply) Size() int { +func (m *GbpBridgeDomainDumpReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpContractAddDel defines message 'gbp_contract_add_del'. +// InProgress: the message form may change in the future versions type GbpContractAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"` @@ -718,16 +706,15 @@ type GbpContractAddDel struct { func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} } func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" } -func (*GbpContractAddDel) GetCrcString() string { return "553e275b" } +func (*GbpContractAddDel) GetCrcString() string { return "aa8d652d" } func (*GbpContractAddDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpContractAddDel) Size() int { +func (m *GbpContractAddDel) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsAdd size += 2 // m.Contract.Scope size += 2 // m.Contract.Sclass @@ -746,59 +733,48 @@ func (m *GbpContractAddDel) Size() int { size += 4 // s2.NhSet.HashMode size += 1 // s2.NhSet.NNhs for j4 := 0; j4 < 8; j4++ { - var s4 GbpNextHop - _ = s4 - if j4 < len(s2.NhSet.Nhs) { - s4 = s2.NhSet.Nhs[j4] - } - size += 1 // s4.IP.Af - size += 1 * 16 // s4.IP.Un - size += 1 * 6 // s4.Mac - size += 4 // s4.BdID - size += 4 // s4.RdID + size += 1 // s2.NhSet.Nhs[j4].IP.Af + size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un + size += 1 * 6 // s2.NhSet.Nhs[j4].Mac + size += 4 // s2.NhSet.Nhs[j4].BdID + size += 4 // s2.NhSet.Nhs[j4].RdID } } return size } func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeUint16(uint16(m.Contract.Scope)) - buf.EncodeUint16(uint16(m.Contract.Sclass)) - buf.EncodeUint16(uint16(m.Contract.Dclass)) - buf.EncodeUint32(uint32(m.Contract.ACLIndex)) - buf.EncodeUint8(uint8(m.Contract.NEtherTypes)) + buf.EncodeUint16(m.Contract.Sclass) + buf.EncodeUint16(m.Contract.Dclass) + buf.EncodeUint32(m.Contract.ACLIndex) + buf.EncodeUint8(m.Contract.NEtherTypes) for i := 0; i < 16; i++ { var x uint16 if i < len(m.Contract.AllowedEthertypes) { x = uint16(m.Contract.AllowedEthertypes[i]) } - buf.EncodeUint16(uint16(x)) + buf.EncodeUint16(x) } buf.EncodeUint8(uint8(len(m.Contract.Rules))) for j1 := 0; j1 < len(m.Contract.Rules); j1++ { - var v1 GbpRule + var v1 GbpRule // Rules if j1 < len(m.Contract.Rules) { v1 = m.Contract.Rules[j1] } buf.EncodeUint32(uint32(v1.Action)) buf.EncodeUint32(uint32(v1.NhSet.HashMode)) - buf.EncodeUint8(uint8(v1.NhSet.NNhs)) + buf.EncodeUint8(v1.NhSet.NNhs) for j3 := 0; j3 < 8; j3++ { - var v3 GbpNextHop - if j3 < len(v1.NhSet.Nhs) { - v3 = v1.NhSet.Nhs[j3] - } - buf.EncodeUint8(uint8(v3.IP.Af)) - buf.EncodeBytes(v3.IP.Un.XXX_UnionData[:], 0) - buf.EncodeBytes(v3.Mac[:], 6) - buf.EncodeUint32(uint32(v3.BdID)) - buf.EncodeUint32(uint32(v3.RdID)) + buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af)) + buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16) + buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6) + buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID) + buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID) } } return buf.Bytes(), nil @@ -816,7 +792,7 @@ func (m *GbpContractAddDel) Unmarshal(b []byte) error { m.Contract.AllowedEthertypes[i] = buf.DecodeUint16() } m.Contract.NRules = buf.DecodeUint8() - m.Contract.Rules = make([]GbpRule, int(m.Contract.NRules)) + m.Contract.Rules = make([]GbpRule, m.Contract.NRules) for j1 := 0; j1 < len(m.Contract.Rules); j1++ { m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32()) m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32()) @@ -833,6 +809,7 @@ func (m *GbpContractAddDel) Unmarshal(b []byte) error { } // GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'. +// InProgress: the message form may change in the future versions type GbpContractAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` @@ -845,50 +822,47 @@ func (*GbpContractAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpContractAddDelReply) Size() int { +func (m *GbpContractAddDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval size += 4 // m.StatsIndex return size } func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) - buf.EncodeUint32(uint32(m.StatsIndex)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.StatsIndex) return buf.Bytes(), nil } func (m *GbpContractAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() m.StatsIndex = buf.DecodeUint32() return nil } // GbpContractDetails defines message 'gbp_contract_details'. +// InProgress: the message form may change in the future versions type GbpContractDetails struct { Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"` } func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} } func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" } -func (*GbpContractDetails) GetCrcString() string { return "2a18db6e" } +func (*GbpContractDetails) GetCrcString() string { return "65dec325" } func (*GbpContractDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpContractDetails) Size() int { +func (m *GbpContractDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 2 // m.Contract.Scope size += 2 // m.Contract.Sclass size += 2 // m.Contract.Dclass @@ -906,58 +880,47 @@ func (m *GbpContractDetails) Size() int { size += 4 // s2.NhSet.HashMode size += 1 // s2.NhSet.NNhs for j4 := 0; j4 < 8; j4++ { - var s4 GbpNextHop - _ = s4 - if j4 < len(s2.NhSet.Nhs) { - s4 = s2.NhSet.Nhs[j4] - } - size += 1 // s4.IP.Af - size += 1 * 16 // s4.IP.Un - size += 1 * 6 // s4.Mac - size += 4 // s4.BdID - size += 4 // s4.RdID + size += 1 // s2.NhSet.Nhs[j4].IP.Af + size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un + size += 1 * 6 // s2.NhSet.Nhs[j4].Mac + size += 4 // s2.NhSet.Nhs[j4].BdID + size += 4 // s2.NhSet.Nhs[j4].RdID } } return size } func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeUint16(uint16(m.Contract.Scope)) - buf.EncodeUint16(uint16(m.Contract.Sclass)) - buf.EncodeUint16(uint16(m.Contract.Dclass)) - buf.EncodeUint32(uint32(m.Contract.ACLIndex)) - buf.EncodeUint8(uint8(m.Contract.NEtherTypes)) + buf.EncodeUint16(m.Contract.Sclass) + buf.EncodeUint16(m.Contract.Dclass) + buf.EncodeUint32(m.Contract.ACLIndex) + buf.EncodeUint8(m.Contract.NEtherTypes) for i := 0; i < 16; i++ { var x uint16 if i < len(m.Contract.AllowedEthertypes) { x = uint16(m.Contract.AllowedEthertypes[i]) } - buf.EncodeUint16(uint16(x)) + buf.EncodeUint16(x) } buf.EncodeUint8(uint8(len(m.Contract.Rules))) for j1 := 0; j1 < len(m.Contract.Rules); j1++ { - var v1 GbpRule + var v1 GbpRule // Rules if j1 < len(m.Contract.Rules) { v1 = m.Contract.Rules[j1] } buf.EncodeUint32(uint32(v1.Action)) buf.EncodeUint32(uint32(v1.NhSet.HashMode)) - buf.EncodeUint8(uint8(v1.NhSet.NNhs)) + buf.EncodeUint8(v1.NhSet.NNhs) for j3 := 0; j3 < 8; j3++ { - var v3 GbpNextHop - if j3 < len(v1.NhSet.Nhs) { - v3 = v1.NhSet.Nhs[j3] - } - buf.EncodeUint8(uint8(v3.IP.Af)) - buf.EncodeBytes(v3.IP.Un.XXX_UnionData[:], 0) - buf.EncodeBytes(v3.Mac[:], 6) - buf.EncodeUint32(uint32(v3.BdID)) - buf.EncodeUint32(uint32(v3.RdID)) + buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af)) + buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16) + buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6) + buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID) + buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID) } } return buf.Bytes(), nil @@ -974,7 +937,7 @@ func (m *GbpContractDetails) Unmarshal(b []byte) error { m.Contract.AllowedEthertypes[i] = buf.DecodeUint16() } m.Contract.NRules = buf.DecodeUint8() - m.Contract.Rules = make([]GbpRule, int(m.Contract.NRules)) + m.Contract.Rules = make([]GbpRule, m.Contract.NRules) for j1 := 0; j1 < len(m.Contract.Rules); j1++ { m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32()) m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32()) @@ -991,6 +954,7 @@ func (m *GbpContractDetails) Unmarshal(b []byte) error { } // GbpContractDump defines message 'gbp_contract_dump'. +// InProgress: the message form may change in the future versions type GbpContractDump struct{} func (m *GbpContractDump) Reset() { *m = GbpContractDump{} } @@ -1000,20 +964,17 @@ func (*GbpContractDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpContractDump) Size() int { +func (m *GbpContractDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpContractDump) Unmarshal(b []byte) error { @@ -1021,22 +982,22 @@ func (m *GbpContractDump) Unmarshal(b []byte) error { } // GbpEndpointAdd defines message 'gbp_endpoint_add'. +// InProgress: the message form may change in the future versions type GbpEndpointAdd struct { Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"` } func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} } func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" } -func (*GbpEndpointAdd) GetCrcString() string { return "9ce16d5a" } +func (*GbpEndpointAdd) GetCrcString() string { return "7b3af7de" } func (*GbpEndpointAdd) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointAdd) Size() int { +func (m *GbpEndpointAdd) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Endpoint.SwIfIndex size += 2 // m.Endpoint.Sclass size += 4 // m.Endpoint.Flags @@ -1058,28 +1019,26 @@ func (m *GbpEndpointAdd) Size() int { return size } func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex)) - buf.EncodeUint16(uint16(m.Endpoint.Sclass)) + buf.EncodeUint16(m.Endpoint.Sclass) buf.EncodeUint32(uint32(m.Endpoint.Flags)) buf.EncodeBytes(m.Endpoint.Mac[:], 6) buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af)) - buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af)) - buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(len(m.Endpoint.Ips))) for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ { - var v1 ip_types.Address + var v1 ip_types.Address // Ips if j1 < len(m.Endpoint.Ips) { v1 = m.Endpoint.Ips[j1] } buf.EncodeUint8(uint8(v1.Af)) - buf.EncodeBytes(v1.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16) } return buf.Bytes(), nil } @@ -1094,7 +1053,7 @@ func (m *GbpEndpointAdd) Unmarshal(b []byte) error { m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) m.Endpoint.NIps = buf.DecodeUint8() - m.Endpoint.Ips = make([]ip_types.Address, int(m.Endpoint.NIps)) + m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps) for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ { m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16)) @@ -1103,6 +1062,7 @@ func (m *GbpEndpointAdd) Unmarshal(b []byte) error { } // GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'. +// InProgress: the message form may change in the future versions type GbpEndpointAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"` @@ -1115,34 +1075,32 @@ func (*GbpEndpointAddReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointAddReply) Size() int { +func (m *GbpEndpointAddReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval size += 4 // m.Handle return size } func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) - buf.EncodeUint32(uint32(m.Handle)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Handle) return buf.Bytes(), nil } func (m *GbpEndpointAddReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() m.Handle = buf.DecodeUint32() return nil } // GbpEndpointDel defines message 'gbp_endpoint_del'. +// InProgress: the message form may change in the future versions type GbpEndpointDel struct { Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"` } @@ -1154,22 +1112,19 @@ func (*GbpEndpointDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointDel) Size() int { +func (m *GbpEndpointDel) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Handle return size } func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Handle)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Handle) return buf.Bytes(), nil } func (m *GbpEndpointDel) Unmarshal(b []byte) error { @@ -1179,6 +1134,7 @@ func (m *GbpEndpointDel) Unmarshal(b []byte) error { } // GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'. +// InProgress: the message form may change in the future versions type GbpEndpointDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1190,31 +1146,29 @@ func (*GbpEndpointDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointDelReply) Size() int { +func (m *GbpEndpointDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpEndpointDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpEndpointDetails defines message 'gbp_endpoint_details'. +// InProgress: the message form may change in the future versions type GbpEndpointDetails struct { Age float64 `binapi:"f64,name=age" json:"age,omitempty"` Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"` @@ -1223,16 +1177,15 @@ type GbpEndpointDetails struct { func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} } func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" } -func (*GbpEndpointDetails) GetCrcString() string { return "08aecb60" } +func (*GbpEndpointDetails) GetCrcString() string { return "8dd8fbd3" } func (*GbpEndpointDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointDetails) Size() int { +func (m *GbpEndpointDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 8 // m.Age size += 4 // m.Handle size += 4 // m.Endpoint.SwIfIndex @@ -1256,36 +1209,34 @@ func (m *GbpEndpointDetails) Size() int { return size } func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeFloat64(float64(m.Age)) - buf.EncodeUint32(uint32(m.Handle)) + buf := codec.NewBuffer(b) + buf.EncodeFloat64(m.Age) + buf.EncodeUint32(m.Handle) buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex)) - buf.EncodeUint16(uint16(m.Endpoint.Sclass)) + buf.EncodeUint16(m.Endpoint.Sclass) buf.EncodeUint32(uint32(m.Endpoint.Flags)) buf.EncodeBytes(m.Endpoint.Mac[:], 6) buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af)) - buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af)) - buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(len(m.Endpoint.Ips))) for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ { - var v1 ip_types.Address + var v1 ip_types.Address // Ips if j1 < len(m.Endpoint.Ips) { v1 = m.Endpoint.Ips[j1] } buf.EncodeUint8(uint8(v1.Af)) - buf.EncodeBytes(v1.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16) } return buf.Bytes(), nil } func (m *GbpEndpointDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Age = float64(buf.DecodeFloat64()) + m.Age = buf.DecodeFloat64() m.Handle = buf.DecodeUint32() m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.Endpoint.Sclass = buf.DecodeUint16() @@ -1296,7 +1247,7 @@ func (m *GbpEndpointDetails) Unmarshal(b []byte) error { m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) m.Endpoint.NIps = buf.DecodeUint8() - m.Endpoint.Ips = make([]ip_types.Address, int(m.Endpoint.NIps)) + m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps) for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ { m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16)) @@ -1305,6 +1256,7 @@ func (m *GbpEndpointDetails) Unmarshal(b []byte) error { } // GbpEndpointDump defines message 'gbp_endpoint_dump'. +// InProgress: the message form may change in the future versions type GbpEndpointDump struct{} func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} } @@ -1314,20 +1266,17 @@ func (*GbpEndpointDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointDump) Size() int { +func (m *GbpEndpointDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpEndpointDump) Unmarshal(b []byte) error { @@ -1335,22 +1284,22 @@ func (m *GbpEndpointDump) Unmarshal(b []byte) error { } // GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupAdd struct { Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"` } func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} } func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" } -func (*GbpEndpointGroupAdd) GetCrcString() string { return "8e0f4054" } +func (*GbpEndpointGroupAdd) GetCrcString() string { return "301ddf15" } func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointGroupAdd) Size() int { +func (m *GbpEndpointGroupAdd) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Epg.Vnid size += 2 // m.Epg.Sclass size += 4 // m.Epg.BdID @@ -1360,18 +1309,16 @@ func (m *GbpEndpointGroupAdd) Size() int { return size } func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) - } - buf.EncodeUint32(uint32(m.Epg.Vnid)) - buf.EncodeUint16(uint16(m.Epg.Sclass)) - buf.EncodeUint32(uint32(m.Epg.BdID)) - buf.EncodeUint32(uint32(m.Epg.RdID)) + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Epg.Vnid) + buf.EncodeUint16(m.Epg.Sclass) + buf.EncodeUint32(m.Epg.BdID) + buf.EncodeUint32(m.Epg.RdID) buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex)) - buf.EncodeUint32(uint32(m.Epg.Retention.RemoteEpTimeout)) + buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout) return buf.Bytes(), nil } func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error { @@ -1386,6 +1333,7 @@ func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error { } // GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1397,31 +1345,29 @@ func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointGroupAddReply) Size() int { +func (m *GbpEndpointGroupAddReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupDel struct { Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"` } @@ -1433,22 +1379,19 @@ func (*GbpEndpointGroupDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointGroupDel) Size() int { +func (m *GbpEndpointGroupDel) Size() (size int) { if m == nil { return 0 } - var size int size += 2 // m.Sclass return size } func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint16(uint16(m.Sclass)) + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.Sclass) return buf.Bytes(), nil } func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error { @@ -1458,6 +1401,7 @@ func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error { } // GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1469,47 +1413,44 @@ func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointGroupDelReply) Size() int { +func (m *GbpEndpointGroupDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupDetails struct { Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"` } func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} } func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" } -func (*GbpEndpointGroupDetails) GetCrcString() string { return "8f38292c" } +func (*GbpEndpointGroupDetails) GetCrcString() string { return "ab71d723" } func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpEndpointGroupDetails) Size() int { +func (m *GbpEndpointGroupDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Epg.Vnid size += 2 // m.Epg.Sclass size += 4 // m.Epg.BdID @@ -1519,18 +1460,16 @@ func (m *GbpEndpointGroupDetails) Size() int { return size } func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) - } - buf.EncodeUint32(uint32(m.Epg.Vnid)) - buf.EncodeUint16(uint16(m.Epg.Sclass)) - buf.EncodeUint32(uint32(m.Epg.BdID)) - buf.EncodeUint32(uint32(m.Epg.RdID)) + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Epg.Vnid) + buf.EncodeUint16(m.Epg.Sclass) + buf.EncodeUint32(m.Epg.BdID) + buf.EncodeUint32(m.Epg.RdID) buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex)) - buf.EncodeUint32(uint32(m.Epg.Retention.RemoteEpTimeout)) + buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout) return buf.Bytes(), nil } func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error { @@ -1545,6 +1484,7 @@ func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error { } // GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'. +// InProgress: the message form may change in the future versions type GbpEndpointGroupDump struct{} func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} } @@ -1554,20 +1494,17 @@ func (*GbpEndpointGroupDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpEndpointGroupDump) Size() int { +func (m *GbpEndpointGroupDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error { @@ -1575,6 +1512,7 @@ func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error { } // GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'. +// InProgress: the message form may change in the future versions type GbpExtItfAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"` @@ -1582,16 +1520,15 @@ type GbpExtItfAddDel struct { func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} } func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" } -func (*GbpExtItfAddDel) GetCrcString() string { return "12ed5700" } +func (*GbpExtItfAddDel) GetCrcString() string { return "7606d0e1" } func (*GbpExtItfAddDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpExtItfAddDel) Size() int { +func (m *GbpExtItfAddDel) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsAdd size += 4 // m.ExtItf.SwIfIndex size += 4 // m.ExtItf.BdID @@ -1600,16 +1537,14 @@ func (m *GbpExtItfAddDel) Size() int { return size } func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex)) - buf.EncodeUint32(uint32(m.ExtItf.BdID)) - buf.EncodeUint32(uint32(m.ExtItf.RdID)) + buf.EncodeUint32(m.ExtItf.BdID) + buf.EncodeUint32(m.ExtItf.RdID) buf.EncodeUint32(uint32(m.ExtItf.Flags)) return buf.Bytes(), nil } @@ -1624,6 +1559,7 @@ func (m *GbpExtItfAddDel) Unmarshal(b []byte) error { } // GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'. +// InProgress: the message form may change in the future versions type GbpExtItfAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1635,47 +1571,44 @@ func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpExtItfAddDelReply) Size() int { +func (m *GbpExtItfAddDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpExtItfDetails defines message 'gbp_ext_itf_details'. +// InProgress: the message form may change in the future versions type GbpExtItfDetails struct { ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"` } func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} } func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" } -func (*GbpExtItfDetails) GetCrcString() string { return "408a45c0" } +func (*GbpExtItfDetails) GetCrcString() string { return "519c3d3c" } func (*GbpExtItfDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpExtItfDetails) Size() int { +func (m *GbpExtItfDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.ExtItf.SwIfIndex size += 4 // m.ExtItf.BdID size += 4 // m.ExtItf.RdID @@ -1683,15 +1616,13 @@ func (m *GbpExtItfDetails) Size() int { return size } func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex)) - buf.EncodeUint32(uint32(m.ExtItf.BdID)) - buf.EncodeUint32(uint32(m.ExtItf.RdID)) + buf.EncodeUint32(m.ExtItf.BdID) + buf.EncodeUint32(m.ExtItf.RdID) buf.EncodeUint32(uint32(m.ExtItf.Flags)) return buf.Bytes(), nil } @@ -1705,6 +1636,7 @@ func (m *GbpExtItfDetails) Unmarshal(b []byte) error { } // GbpExtItfDump defines message 'gbp_ext_itf_dump'. +// InProgress: the message form may change in the future versions type GbpExtItfDump struct{} func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} } @@ -1714,20 +1646,17 @@ func (*GbpExtItfDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpExtItfDump) Size() int { +func (m *GbpExtItfDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpExtItfDump) Unmarshal(b []byte) error { @@ -1735,6 +1664,7 @@ func (m *GbpExtItfDump) Unmarshal(b []byte) error { } // GbpRecircAddDel defines message 'gbp_recirc_add_del'. +// InProgress: the message form may change in the future versions type GbpRecircAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"` @@ -1747,11 +1677,10 @@ func (*GbpRecircAddDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpRecircAddDel) Size() int { +func (m *GbpRecircAddDel) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsAdd size += 4 // m.Recirc.SwIfIndex size += 2 // m.Recirc.Sclass @@ -1759,15 +1688,13 @@ func (m *GbpRecircAddDel) Size() int { return size } func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeUint32(uint32(m.Recirc.SwIfIndex)) - buf.EncodeUint16(uint16(m.Recirc.Sclass)) + buf.EncodeUint16(m.Recirc.Sclass) buf.EncodeBool(m.Recirc.IsExt) return buf.Bytes(), nil } @@ -1781,6 +1708,7 @@ func (m *GbpRecircAddDel) Unmarshal(b []byte) error { } // GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'. +// InProgress: the message form may change in the future versions type GbpRecircAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1792,31 +1720,29 @@ func (*GbpRecircAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRecircAddDelReply) Size() int { +func (m *GbpRecircAddDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpRecircDetails defines message 'gbp_recirc_details'. +// InProgress: the message form may change in the future versions type GbpRecircDetails struct { Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"` } @@ -1828,25 +1754,22 @@ func (*GbpRecircDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRecircDetails) Size() int { +func (m *GbpRecircDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Recirc.SwIfIndex size += 2 // m.Recirc.Sclass size += 1 // m.Recirc.IsExt return size } func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.Recirc.SwIfIndex)) - buf.EncodeUint16(uint16(m.Recirc.Sclass)) + buf.EncodeUint16(m.Recirc.Sclass) buf.EncodeBool(m.Recirc.IsExt) return buf.Bytes(), nil } @@ -1859,6 +1782,7 @@ func (m *GbpRecircDetails) Unmarshal(b []byte) error { } // GbpRecircDump defines message 'gbp_recirc_dump'. +// InProgress: the message form may change in the future versions type GbpRecircDump struct{} func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} } @@ -1868,20 +1792,17 @@ func (*GbpRecircDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpRecircDump) Size() int { +func (m *GbpRecircDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpRecircDump) Unmarshal(b []byte) error { @@ -1889,22 +1810,22 @@ func (m *GbpRecircDump) Unmarshal(b []byte) error { } // GbpRouteDomainAdd defines message 'gbp_route_domain_add'. +// InProgress: the message form may change in the future versions type GbpRouteDomainAdd struct { Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"` } func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} } func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" } -func (*GbpRouteDomainAdd) GetCrcString() string { return "2d0afe38" } +func (*GbpRouteDomainAdd) GetCrcString() string { return "204c79e1" } func (*GbpRouteDomainAdd) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpRouteDomainAdd) Size() int { +func (m *GbpRouteDomainAdd) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Rd.RdID size += 4 // m.Rd.IP4TableID size += 4 // m.Rd.IP6TableID @@ -1914,15 +1835,13 @@ func (m *GbpRouteDomainAdd) Size() int { return size } func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Rd.RdID)) - buf.EncodeUint32(uint32(m.Rd.IP4TableID)) - buf.EncodeUint32(uint32(m.Rd.IP6TableID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Rd.RdID) + buf.EncodeUint32(m.Rd.IP4TableID) + buf.EncodeUint32(m.Rd.IP6TableID) buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex)) buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex)) buf.EncodeUint16(uint16(m.Rd.Scope)) @@ -1940,6 +1859,7 @@ func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error { } // GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'. +// InProgress: the message form may change in the future versions type GbpRouteDomainAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1951,31 +1871,29 @@ func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRouteDomainAddReply) Size() int { +func (m *GbpRouteDomainAddReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpRouteDomainDel defines message 'gbp_route_domain_del'. +// InProgress: the message form may change in the future versions type GbpRouteDomainDel struct { RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"` } @@ -1987,22 +1905,19 @@ func (*GbpRouteDomainDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpRouteDomainDel) Size() int { +func (m *GbpRouteDomainDel) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.RdID return size } func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.RdID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.RdID) return buf.Bytes(), nil } func (m *GbpRouteDomainDel) Unmarshal(b []byte) error { @@ -2012,6 +1927,7 @@ func (m *GbpRouteDomainDel) Unmarshal(b []byte) error { } // GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'. +// InProgress: the message form may change in the future versions type GbpRouteDomainDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -2023,47 +1939,44 @@ func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRouteDomainDelReply) Size() int { +func (m *GbpRouteDomainDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpRouteDomainDetails defines message 'gbp_route_domain_details'. +// InProgress: the message form may change in the future versions type GbpRouteDomainDetails struct { Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"` } func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} } func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" } -func (*GbpRouteDomainDetails) GetCrcString() string { return "8ab11375" } +func (*GbpRouteDomainDetails) GetCrcString() string { return "a78bfbca" } func (*GbpRouteDomainDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRouteDomainDetails) Size() int { +func (m *GbpRouteDomainDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Rd.RdID size += 4 // m.Rd.IP4TableID size += 4 // m.Rd.IP6TableID @@ -2073,15 +1986,13 @@ func (m *GbpRouteDomainDetails) Size() int { return size } func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Rd.RdID)) - buf.EncodeUint32(uint32(m.Rd.IP4TableID)) - buf.EncodeUint32(uint32(m.Rd.IP6TableID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Rd.RdID) + buf.EncodeUint32(m.Rd.IP4TableID) + buf.EncodeUint32(m.Rd.IP6TableID) buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex)) buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex)) buf.EncodeUint16(uint16(m.Rd.Scope)) @@ -2099,6 +2010,7 @@ func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error { } // GbpRouteDomainDump defines message 'gbp_route_domain_dump'. +// InProgress: the message form may change in the future versions type GbpRouteDomainDump struct{} func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} } @@ -2108,20 +2020,17 @@ func (*GbpRouteDomainDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpRouteDomainDump) Size() int { +func (m *GbpRouteDomainDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpRouteDomainDump) Unmarshal(b []byte) error { @@ -2129,6 +2038,7 @@ func (m *GbpRouteDomainDump) Unmarshal(b []byte) error { } // GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'. +// InProgress: the message form may change in the future versions type GbpRouteDomainDumpReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -2140,31 +2050,29 @@ func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpRouteDomainDumpReply) Size() int { +func (m *GbpRouteDomainDumpReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpSubnetAddDel defines message 'gbp_subnet_add_del'. +// InProgress: the message form may change in the future versions type GbpSubnetAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"` @@ -2172,16 +2080,15 @@ type GbpSubnetAddDel struct { func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} } func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" } -func (*GbpSubnetAddDel) GetCrcString() string { return "888aca35" } +func (*GbpSubnetAddDel) GetCrcString() string { return "a8803c80" } func (*GbpSubnetAddDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpSubnetAddDel) Size() int { +func (m *GbpSubnetAddDel) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsAdd size += 4 // m.Subnet.RdID size += 4 // m.Subnet.SwIfIndex @@ -2193,20 +2100,18 @@ func (m *GbpSubnetAddDel) Size() int { return size } func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) - buf.EncodeUint32(uint32(m.Subnet.RdID)) + buf.EncodeUint32(m.Subnet.RdID) buf.EncodeUint32(uint32(m.Subnet.SwIfIndex)) - buf.EncodeUint16(uint16(m.Subnet.Sclass)) + buf.EncodeUint16(m.Subnet.Sclass) buf.EncodeUint32(uint32(m.Subnet.Type)) buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af)) - buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 0) - buf.EncodeUint8(uint8(m.Subnet.Prefix.Len)) + buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(m.Subnet.Prefix.Len) return buf.Bytes(), nil } func (m *GbpSubnetAddDel) Unmarshal(b []byte) error { @@ -2223,6 +2128,7 @@ func (m *GbpSubnetAddDel) Unmarshal(b []byte) error { } // GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'. +// InProgress: the message form may change in the future versions type GbpSubnetAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -2234,47 +2140,44 @@ func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpSubnetAddDelReply) Size() int { +func (m *GbpSubnetAddDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpSubnetDetails defines message 'gbp_subnet_details'. +// InProgress: the message form may change in the future versions type GbpSubnetDetails struct { Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"` } func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} } func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" } -func (*GbpSubnetDetails) GetCrcString() string { return "4ed84156" } +func (*GbpSubnetDetails) GetCrcString() string { return "cbc5ca18" } func (*GbpSubnetDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpSubnetDetails) Size() int { +func (m *GbpSubnetDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Subnet.RdID size += 4 // m.Subnet.SwIfIndex size += 2 // m.Subnet.Sclass @@ -2285,19 +2188,17 @@ func (m *GbpSubnetDetails) Size() int { return size } func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Subnet.RdID)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Subnet.RdID) buf.EncodeUint32(uint32(m.Subnet.SwIfIndex)) - buf.EncodeUint16(uint16(m.Subnet.Sclass)) + buf.EncodeUint16(m.Subnet.Sclass) buf.EncodeUint32(uint32(m.Subnet.Type)) buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af)) - buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 0) - buf.EncodeUint8(uint8(m.Subnet.Prefix.Len)) + buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(m.Subnet.Prefix.Len) return buf.Bytes(), nil } func (m *GbpSubnetDetails) Unmarshal(b []byte) error { @@ -2313,6 +2214,7 @@ func (m *GbpSubnetDetails) Unmarshal(b []byte) error { } // GbpSubnetDump defines message 'gbp_subnet_dump'. +// InProgress: the message form may change in the future versions type GbpSubnetDump struct{} func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} } @@ -2322,20 +2224,17 @@ func (*GbpSubnetDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpSubnetDump) Size() int { +func (m *GbpSubnetDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpSubnetDump) Unmarshal(b []byte) error { @@ -2343,6 +2242,7 @@ func (m *GbpSubnetDump) Unmarshal(b []byte) error { } // GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelAdd struct { Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"` } @@ -2354,11 +2254,10 @@ func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpVxlanTunnelAdd) Size() int { +func (m *GbpVxlanTunnelAdd) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Tunnel.Vni size += 4 // m.Tunnel.Mode size += 4 // m.Tunnel.BdRdID @@ -2366,15 +2265,13 @@ func (m *GbpVxlanTunnelAdd) Size() int { return size } func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Tunnel.Vni)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Tunnel.Vni) buf.EncodeUint32(uint32(m.Tunnel.Mode)) - buf.EncodeUint32(uint32(m.Tunnel.BdRdID)) + buf.EncodeUint32(m.Tunnel.BdRdID) buf.EncodeBytes(m.Tunnel.Src[:], 4) return buf.Bytes(), nil } @@ -2388,6 +2285,7 @@ func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error { } // GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2400,34 +2298,32 @@ func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpVxlanTunnelAddReply) Size() int { +func (m *GbpVxlanTunnelAddReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval size += 4 // m.SwIfIndex return size } func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelDel struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` } @@ -2439,22 +2335,19 @@ func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpVxlanTunnelDel) Size() int { +func (m *GbpVxlanTunnelDel) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Vni return size } func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Vni)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Vni) return buf.Bytes(), nil } func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error { @@ -2464,6 +2357,7 @@ func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error { } // GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -2475,31 +2369,29 @@ func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpVxlanTunnelDelReply) Size() int { +func (m *GbpVxlanTunnelDelReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Retval)) + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } // GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelDetails struct { Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"` } @@ -2511,11 +2403,10 @@ func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *GbpVxlanTunnelDetails) Size() int { +func (m *GbpVxlanTunnelDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Tunnel.Vni size += 4 // m.Tunnel.Mode size += 4 // m.Tunnel.BdRdID @@ -2523,15 +2414,13 @@ func (m *GbpVxlanTunnelDetails) Size() int { return size } func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } - buf.EncodeUint32(uint32(m.Tunnel.Vni)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Tunnel.Vni) buf.EncodeUint32(uint32(m.Tunnel.Mode)) - buf.EncodeUint32(uint32(m.Tunnel.BdRdID)) + buf.EncodeUint32(m.Tunnel.BdRdID) buf.EncodeBytes(m.Tunnel.Src[:], 4) return buf.Bytes(), nil } @@ -2545,6 +2434,7 @@ func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error { } // GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'. +// InProgress: the message form may change in the future versions type GbpVxlanTunnelDump struct{} func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} } @@ -2554,20 +2444,17 @@ func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *GbpVxlanTunnelDump) Size() int { +func (m *GbpVxlanTunnelDump) Size() (size int) { if m == nil { return 0 } - var size int return size } func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) { - var buf *codec.Buffer if b == nil { - buf = codec.NewBuffer(make([]byte, m.Size())) - } else { - buf = codec.NewBuffer(b) + b = make([]byte, m.Size()) } + buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error { @@ -2576,47 +2463,47 @@ func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error { func init() { file_gbp_binapi_init() } func file_gbp_binapi_init() { - api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_8454bfdf") + api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_918e8c01") api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804") api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6") api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804") - api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_2acd15f9") + api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_51d51be9") api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14") api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804") - api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_553e275b") + api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_aa8d652d") api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab") - api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_2a18db6e") + api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_65dec325") api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14") - api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_9ce16d5a") + api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_7b3af7de") api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e") api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566") api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804") - api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_08aecb60") + api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_8dd8fbd3") api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14") - api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_8e0f4054") + api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_301ddf15") api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804") api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7") api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804") - api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_8f38292c") + api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_ab71d723") api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14") - api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_12ed5700") + api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_7606d0e1") api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804") - api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_408a45c0") + api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_519c3d3c") api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14") api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3") api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804") api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e") api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14") - api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_2d0afe38") + api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_204c79e1") api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804") api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd") api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804") - api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_8ab11375") + api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_a78bfbca") api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14") api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804") - api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_888aca35") + api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_a8803c80") api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804") - api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_4ed84156") + api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_cbc5ca18") api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14") api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35") api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")