// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/vrrp.api.json
// Package vrrp contains generated bindings for API file vrrp.api.
// Contents:
// 2 enums
// 5 structs
-// 14 messages
+// 17 messages
//
package vrrp
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
const (
APIFile = "vrrp"
APIVersion = "1.0.1"
- VersionCrc = 0x1903f1f1
+ VersionCrc = 0x6a3c71cd
)
// VrrpVrFlags defines enum 'vrrp_vr_flags'.
func (m *VrrpVrAddDel) Reset() { *m = VrrpVrAddDel{} }
func (*VrrpVrAddDel) GetMessageName() string { return "vrrp_vr_add_del" }
-func (*VrrpVrAddDel) GetCrcString() string { return "6dc4b881" }
+func (*VrrpVrAddDel) GetCrcString() string { return "c5cf15aa" }
func (*VrrpVrAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *VrrpVrAddDel) Size() int {
+func (m *VrrpVrAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.SwIfIndex
size += 1 // m.VrID
return size
}
func (m *VrrpVrAddDel) 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.EncodeUint8(uint8(m.IsAdd))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint8(m.IsAdd)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.Priority))
- buf.EncodeUint16(uint16(m.Interval))
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.Priority)
+ buf.EncodeUint16(m.Interval)
buf.EncodeUint32(uint32(m.Flags))
buf.EncodeUint8(uint8(len(m.Addrs)))
for j0 := 0; j0 < len(m.Addrs); j0++ {
- var v0 ip_types.Address
+ var v0 ip_types.Address // Addrs
if j0 < len(m.Addrs) {
v0 = m.Addrs[j0]
}
buf.EncodeUint8(uint8(v0.Af))
- buf.EncodeBytes(v0.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(v0.Un.XXX_UnionData[:], 16)
}
return buf.Bytes(), nil
}
m.Interval = buf.DecodeUint16()
m.Flags = VrrpVrFlags(buf.DecodeUint32())
m.NAddrs = buf.DecodeUint8()
- m.Addrs = make([]ip_types.Address, int(m.NAddrs))
+ m.Addrs = make([]ip_types.Address, m.NAddrs)
for j0 := 0; j0 < len(m.Addrs); j0++ {
m.Addrs[j0].Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.Addrs[j0].Un.XXX_UnionData[:], buf.DecodeBytes(16))
return api.ReplyMessage
}
-func (m *VrrpVrAddDelReply) Size() int {
+func (m *VrrpVrAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *VrrpVrAddDelReply) 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 *VrrpVrAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *VrrpVrDetails) Reset() { *m = VrrpVrDetails{} }
func (*VrrpVrDetails) GetMessageName() string { return "vrrp_vr_details" }
-func (*VrrpVrDetails) GetCrcString() string { return "0412fa71" }
+func (*VrrpVrDetails) GetCrcString() string { return "46edcebd" }
func (*VrrpVrDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *VrrpVrDetails) Size() int {
+func (m *VrrpVrDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Config.SwIfIndex
size += 1 // m.Config.VrID
size += 1 // m.Config.Priority
return size
}
func (m *VrrpVrDetails) 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.Config.SwIfIndex))
- buf.EncodeUint8(uint8(m.Config.VrID))
- buf.EncodeUint8(uint8(m.Config.Priority))
- buf.EncodeUint16(uint16(m.Config.Interval))
+ buf.EncodeUint8(m.Config.VrID)
+ buf.EncodeUint8(m.Config.Priority)
+ buf.EncodeUint16(m.Config.Interval)
buf.EncodeUint32(uint32(m.Config.Flags))
buf.EncodeUint32(uint32(m.Runtime.State))
- buf.EncodeUint16(uint16(m.Runtime.MasterAdvInt))
- buf.EncodeUint16(uint16(m.Runtime.Skew))
- buf.EncodeUint16(uint16(m.Runtime.MasterDownInt))
+ buf.EncodeUint16(m.Runtime.MasterAdvInt)
+ buf.EncodeUint16(m.Runtime.Skew)
+ buf.EncodeUint16(m.Runtime.MasterDownInt)
buf.EncodeBytes(m.Runtime.Mac[:], 6)
- buf.EncodeUint32(uint32(m.Runtime.Tracking.InterfacesDec))
- buf.EncodeUint8(uint8(m.Runtime.Tracking.Priority))
+ buf.EncodeUint32(m.Runtime.Tracking.InterfacesDec)
+ buf.EncodeUint8(m.Runtime.Tracking.Priority)
buf.EncodeUint8(uint8(len(m.Addrs)))
for j0 := 0; j0 < len(m.Addrs); j0++ {
- var v0 ip_types.Address
+ var v0 ip_types.Address // Addrs
if j0 < len(m.Addrs) {
v0 = m.Addrs[j0]
}
buf.EncodeUint8(uint8(v0.Af))
- buf.EncodeBytes(v0.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(v0.Un.XXX_UnionData[:], 16)
}
return buf.Bytes(), nil
}
m.Runtime.Tracking.InterfacesDec = buf.DecodeUint32()
m.Runtime.Tracking.Priority = buf.DecodeUint8()
m.NAddrs = buf.DecodeUint8()
- m.Addrs = make([]ip_types.Address, int(m.NAddrs))
+ m.Addrs = make([]ip_types.Address, m.NAddrs)
for j0 := 0; j0 < len(m.Addrs); j0++ {
m.Addrs[j0].Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.Addrs[j0].Un.XXX_UnionData[:], buf.DecodeBytes(16))
return api.RequestMessage
}
-func (m *VrrpVrDump) Size() int {
+func (m *VrrpVrDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
return size
}
func (m *VrrpVrDump) 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.SwIfIndex))
return buf.Bytes(), nil
}
return nil
}
+// VrrpVrEvent defines message 'vrrp_vr_event'.
+type VrrpVrEvent struct {
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ Vr VrrpVrKey `binapi:"vrrp_vr_key,name=vr" json:"vr,omitempty"`
+ OldState VrrpVrState `binapi:"vrrp_vr_state,name=old_state" json:"old_state,omitempty"`
+ NewState VrrpVrState `binapi:"vrrp_vr_state,name=new_state" json:"new_state,omitempty"`
+}
+
+func (m *VrrpVrEvent) Reset() { *m = VrrpVrEvent{} }
+func (*VrrpVrEvent) GetMessageName() string { return "vrrp_vr_event" }
+func (*VrrpVrEvent) GetCrcString() string { return "c1fea6a5" }
+func (*VrrpVrEvent) GetMessageType() api.MessageType {
+ return api.EventMessage
+}
+
+func (m *VrrpVrEvent) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.PID
+ size += 4 // m.Vr.SwIfIndex
+ size += 1 // m.Vr.VrID
+ size += 1 // m.Vr.IsIPv6
+ size += 4 // m.OldState
+ size += 4 // m.NewState
+ return size
+}
+func (m *VrrpVrEvent) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.PID)
+ buf.EncodeUint32(uint32(m.Vr.SwIfIndex))
+ buf.EncodeUint8(m.Vr.VrID)
+ buf.EncodeUint8(m.Vr.IsIPv6)
+ buf.EncodeUint32(uint32(m.OldState))
+ buf.EncodeUint32(uint32(m.NewState))
+ return buf.Bytes(), nil
+}
+func (m *VrrpVrEvent) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.PID = buf.DecodeUint32()
+ m.Vr.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Vr.VrID = buf.DecodeUint8()
+ m.Vr.IsIPv6 = buf.DecodeUint8()
+ m.OldState = VrrpVrState(buf.DecodeUint32())
+ m.NewState = VrrpVrState(buf.DecodeUint32())
+ return nil
+}
+
// VrrpVrPeerDetails defines message 'vrrp_vr_peer_details'.
type VrrpVrPeerDetails struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
func (m *VrrpVrPeerDetails) Reset() { *m = VrrpVrPeerDetails{} }
func (*VrrpVrPeerDetails) GetMessageName() string { return "vrrp_vr_peer_details" }
-func (*VrrpVrPeerDetails) GetCrcString() string { return "abd9145e" }
+func (*VrrpVrPeerDetails) GetCrcString() string { return "3d99c108" }
func (*VrrpVrPeerDetails) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *VrrpVrPeerDetails) Size() int {
+func (m *VrrpVrPeerDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.VrID
size += 1 // m.IsIPv6
return size
}
func (m *VrrpVrPeerDetails) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.IsIPv6))
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.IsIPv6)
buf.EncodeUint8(uint8(len(m.PeerAddrs)))
for j0 := 0; j0 < len(m.PeerAddrs); j0++ {
- var v0 ip_types.Address
+ var v0 ip_types.Address // PeerAddrs
if j0 < len(m.PeerAddrs) {
v0 = m.PeerAddrs[j0]
}
buf.EncodeUint8(uint8(v0.Af))
- buf.EncodeBytes(v0.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(v0.Un.XXX_UnionData[:], 16)
}
return buf.Bytes(), nil
}
m.VrID = buf.DecodeUint8()
m.IsIPv6 = buf.DecodeUint8()
m.NPeerAddrs = buf.DecodeUint8()
- m.PeerAddrs = make([]ip_types.Address, int(m.NPeerAddrs))
+ m.PeerAddrs = make([]ip_types.Address, m.NPeerAddrs)
for j0 := 0; j0 < len(m.PeerAddrs); j0++ {
m.PeerAddrs[j0].Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.PeerAddrs[j0].Un.XXX_UnionData[:], buf.DecodeBytes(16))
return api.RequestMessage
}
-func (m *VrrpVrPeerDump) Size() int {
+func (m *VrrpVrPeerDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
size += 1 // m.VrID
return size
}
func (m *VrrpVrPeerDump) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.IsIPv6))
- buf.EncodeUint8(uint8(m.VrID))
+ buf.EncodeUint8(m.IsIPv6)
+ buf.EncodeUint8(m.VrID)
return buf.Bytes(), nil
}
func (m *VrrpVrPeerDump) Unmarshal(b []byte) error {
func (m *VrrpVrSetPeers) Reset() { *m = VrrpVrSetPeers{} }
func (*VrrpVrSetPeers) GetMessageName() string { return "vrrp_vr_set_peers" }
-func (*VrrpVrSetPeers) GetCrcString() string { return "baa2e52b" }
+func (*VrrpVrSetPeers) GetCrcString() string { return "20bec71f" }
func (*VrrpVrSetPeers) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *VrrpVrSetPeers) Size() int {
+func (m *VrrpVrSetPeers) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.VrID
size += 1 // m.IsIPv6
return size
}
func (m *VrrpVrSetPeers) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.IsIPv6))
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.IsIPv6)
buf.EncodeUint8(uint8(len(m.Addrs)))
for j0 := 0; j0 < len(m.Addrs); j0++ {
- var v0 ip_types.Address
+ var v0 ip_types.Address // Addrs
if j0 < len(m.Addrs) {
v0 = m.Addrs[j0]
}
buf.EncodeUint8(uint8(v0.Af))
- buf.EncodeBytes(v0.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(v0.Un.XXX_UnionData[:], 16)
}
return buf.Bytes(), nil
}
m.VrID = buf.DecodeUint8()
m.IsIPv6 = buf.DecodeUint8()
m.NAddrs = buf.DecodeUint8()
- m.Addrs = make([]ip_types.Address, int(m.NAddrs))
+ m.Addrs = make([]ip_types.Address, m.NAddrs)
for j0 := 0; j0 < len(m.Addrs); j0++ {
m.Addrs[j0].Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.Addrs[j0].Un.XXX_UnionData[:], buf.DecodeBytes(16))
return api.ReplyMessage
}
-func (m *VrrpVrSetPeersReply) Size() int {
+func (m *VrrpVrSetPeersReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *VrrpVrSetPeersReply) 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 *VrrpVrSetPeersReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *VrrpVrStartStop) Size() int {
+func (m *VrrpVrStartStop) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.VrID
size += 1 // m.IsIPv6
return size
}
func (m *VrrpVrStartStop) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.IsIPv6))
- buf.EncodeUint8(uint8(m.IsStart))
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.IsIPv6)
+ buf.EncodeUint8(m.IsStart)
return buf.Bytes(), nil
}
func (m *VrrpVrStartStop) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *VrrpVrStartStopReply) Size() int {
+func (m *VrrpVrStartStopReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *VrrpVrStartStopReply) 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 *VrrpVrStartStopReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *VrrpVrTrackIfAddDel) Reset() { *m = VrrpVrTrackIfAddDel{} }
func (*VrrpVrTrackIfAddDel) GetMessageName() string { return "vrrp_vr_track_if_add_del" }
-func (*VrrpVrTrackIfAddDel) GetCrcString() string { return "337f4ba4" }
+func (*VrrpVrTrackIfAddDel) GetCrcString() string { return "d67df299" }
func (*VrrpVrTrackIfAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *VrrpVrTrackIfAddDel) Size() int {
+func (m *VrrpVrTrackIfAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
size += 1 // m.VrID
return size
}
func (m *VrrpVrTrackIfAddDel) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.IsIPv6))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.IsAdd))
+ buf.EncodeUint8(m.IsIPv6)
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.IsAdd)
buf.EncodeUint8(uint8(len(m.Ifs)))
for j0 := 0; j0 < len(m.Ifs); j0++ {
- var v0 VrrpVrTrackIf
+ var v0 VrrpVrTrackIf // Ifs
if j0 < len(m.Ifs) {
v0 = m.Ifs[j0]
}
buf.EncodeUint32(uint32(v0.SwIfIndex))
- buf.EncodeUint8(uint8(v0.Priority))
+ buf.EncodeUint8(v0.Priority)
}
return buf.Bytes(), nil
}
m.VrID = buf.DecodeUint8()
m.IsAdd = buf.DecodeUint8()
m.NIfs = buf.DecodeUint8()
- m.Ifs = make([]VrrpVrTrackIf, int(m.NIfs))
+ m.Ifs = make([]VrrpVrTrackIf, m.NIfs)
for j0 := 0; j0 < len(m.Ifs); j0++ {
m.Ifs[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.Ifs[j0].Priority = buf.DecodeUint8()
return api.ReplyMessage
}
-func (m *VrrpVrTrackIfAddDelReply) Size() int {
+func (m *VrrpVrTrackIfAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *VrrpVrTrackIfAddDelReply) 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 *VrrpVrTrackIfAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *VrrpVrTrackIfDetails) Reset() { *m = VrrpVrTrackIfDetails{} }
func (*VrrpVrTrackIfDetails) GetMessageName() string { return "vrrp_vr_track_if_details" }
-func (*VrrpVrTrackIfDetails) GetCrcString() string { return "99bcca9c" }
+func (*VrrpVrTrackIfDetails) GetCrcString() string { return "73c36f81" }
func (*VrrpVrTrackIfDetails) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *VrrpVrTrackIfDetails) Size() int {
+func (m *VrrpVrTrackIfDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.VrID
size += 1 // m.IsIPv6
return size
}
func (m *VrrpVrTrackIfDetails) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.IsIPv6))
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.IsIPv6)
buf.EncodeUint8(uint8(len(m.Ifs)))
for j0 := 0; j0 < len(m.Ifs); j0++ {
- var v0 VrrpVrTrackIf
+ var v0 VrrpVrTrackIf // Ifs
if j0 < len(m.Ifs) {
v0 = m.Ifs[j0]
}
buf.EncodeUint32(uint32(v0.SwIfIndex))
- buf.EncodeUint8(uint8(v0.Priority))
+ buf.EncodeUint8(v0.Priority)
}
return buf.Bytes(), nil
}
m.VrID = buf.DecodeUint8()
m.IsIPv6 = buf.DecodeUint8()
m.NIfs = buf.DecodeUint8()
- m.Ifs = make([]VrrpVrTrackIf, int(m.NIfs))
+ m.Ifs = make([]VrrpVrTrackIf, m.NIfs)
for j0 := 0; j0 < len(m.Ifs); j0++ {
m.Ifs[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.Ifs[j0].Priority = buf.DecodeUint8()
return api.RequestMessage
}
-func (m *VrrpVrTrackIfDump) Size() int {
+func (m *VrrpVrTrackIfDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
size += 1 // m.VrID
return size
}
func (m *VrrpVrTrackIfDump) 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.SwIfIndex))
- buf.EncodeUint8(uint8(m.IsIPv6))
- buf.EncodeUint8(uint8(m.VrID))
- buf.EncodeUint8(uint8(m.DumpAll))
+ buf.EncodeUint8(m.IsIPv6)
+ buf.EncodeUint8(m.VrID)
+ buf.EncodeUint8(m.DumpAll)
return buf.Bytes(), nil
}
func (m *VrrpVrTrackIfDump) Unmarshal(b []byte) error {
return nil
}
+// WantVrrpVrEvents defines message 'want_vrrp_vr_events'.
+type WantVrrpVrEvents struct {
+ EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+}
+
+func (m *WantVrrpVrEvents) Reset() { *m = WantVrrpVrEvents{} }
+func (*WantVrrpVrEvents) GetMessageName() string { return "want_vrrp_vr_events" }
+func (*WantVrrpVrEvents) GetCrcString() string { return "c5e2af94" }
+func (*WantVrrpVrEvents) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *WantVrrpVrEvents) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.EnableDisable
+ size += 4 // m.PID
+ return size
+}
+func (m *WantVrrpVrEvents) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.EnableDisable)
+ buf.EncodeUint32(m.PID)
+ return buf.Bytes(), nil
+}
+func (m *WantVrrpVrEvents) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.EnableDisable = buf.DecodeBool()
+ m.PID = buf.DecodeUint32()
+ return nil
+}
+
+// WantVrrpVrEventsReply defines message 'want_vrrp_vr_events_reply'.
+type WantVrrpVrEventsReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *WantVrrpVrEventsReply) Reset() { *m = WantVrrpVrEventsReply{} }
+func (*WantVrrpVrEventsReply) GetMessageName() string { return "want_vrrp_vr_events_reply" }
+func (*WantVrrpVrEventsReply) GetCrcString() string { return "e8d4e804" }
+func (*WantVrrpVrEventsReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *WantVrrpVrEventsReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *WantVrrpVrEventsReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *WantVrrpVrEventsReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_vrrp_binapi_init() }
func file_vrrp_binapi_init() {
- api.RegisterMessage((*VrrpVrAddDel)(nil), "vrrp_vr_add_del_6dc4b881")
+ api.RegisterMessage((*VrrpVrAddDel)(nil), "vrrp_vr_add_del_c5cf15aa")
api.RegisterMessage((*VrrpVrAddDelReply)(nil), "vrrp_vr_add_del_reply_e8d4e804")
- api.RegisterMessage((*VrrpVrDetails)(nil), "vrrp_vr_details_0412fa71")
+ api.RegisterMessage((*VrrpVrDetails)(nil), "vrrp_vr_details_46edcebd")
api.RegisterMessage((*VrrpVrDump)(nil), "vrrp_vr_dump_f9e6675e")
- api.RegisterMessage((*VrrpVrPeerDetails)(nil), "vrrp_vr_peer_details_abd9145e")
+ api.RegisterMessage((*VrrpVrEvent)(nil), "vrrp_vr_event_c1fea6a5")
+ api.RegisterMessage((*VrrpVrPeerDetails)(nil), "vrrp_vr_peer_details_3d99c108")
api.RegisterMessage((*VrrpVrPeerDump)(nil), "vrrp_vr_peer_dump_6fa3f7c4")
- api.RegisterMessage((*VrrpVrSetPeers)(nil), "vrrp_vr_set_peers_baa2e52b")
+ api.RegisterMessage((*VrrpVrSetPeers)(nil), "vrrp_vr_set_peers_20bec71f")
api.RegisterMessage((*VrrpVrSetPeersReply)(nil), "vrrp_vr_set_peers_reply_e8d4e804")
api.RegisterMessage((*VrrpVrStartStop)(nil), "vrrp_vr_start_stop_0662a3b7")
api.RegisterMessage((*VrrpVrStartStopReply)(nil), "vrrp_vr_start_stop_reply_e8d4e804")
- api.RegisterMessage((*VrrpVrTrackIfAddDel)(nil), "vrrp_vr_track_if_add_del_337f4ba4")
+ api.RegisterMessage((*VrrpVrTrackIfAddDel)(nil), "vrrp_vr_track_if_add_del_d67df299")
api.RegisterMessage((*VrrpVrTrackIfAddDelReply)(nil), "vrrp_vr_track_if_add_del_reply_e8d4e804")
- api.RegisterMessage((*VrrpVrTrackIfDetails)(nil), "vrrp_vr_track_if_details_99bcca9c")
+ api.RegisterMessage((*VrrpVrTrackIfDetails)(nil), "vrrp_vr_track_if_details_73c36f81")
api.RegisterMessage((*VrrpVrTrackIfDump)(nil), "vrrp_vr_track_if_dump_a34dfc6d")
+ api.RegisterMessage((*WantVrrpVrEvents)(nil), "want_vrrp_vr_events_c5e2af94")
+ api.RegisterMessage((*WantVrrpVrEventsReply)(nil), "want_vrrp_vr_events_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
(*VrrpVrAddDelReply)(nil),
(*VrrpVrDetails)(nil),
(*VrrpVrDump)(nil),
+ (*VrrpVrEvent)(nil),
(*VrrpVrPeerDetails)(nil),
(*VrrpVrPeerDump)(nil),
(*VrrpVrSetPeers)(nil),
(*VrrpVrTrackIfAddDelReply)(nil),
(*VrrpVrTrackIfDetails)(nil),
(*VrrpVrTrackIfDump)(nil),
+ (*WantVrrpVrEvents)(nil),
+ (*WantVrrpVrEventsReply)(nil),
}
}