diff options
Diffstat (limited to 'binapi/p2p_ethernet/p2p_ethernet.ba.go')
-rw-r--r-- | binapi/p2p_ethernet/p2p_ethernet.ba.go | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/binapi/p2p_ethernet/p2p_ethernet.ba.go b/binapi/p2p_ethernet/p2p_ethernet.ba.go new file mode 100644 index 0000000..5435390 --- /dev/null +++ b/binapi/p2p_ethernet/p2p_ethernet.ba.go @@ -0,0 +1,209 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.4.0-dev +// VPP: 20.05-release +// source: /usr/share/vpp/api/core/p2p_ethernet.api.json + +// Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api. +// +// Contents: +// 4 messages +// +package p2p_ethernet + +import ( + 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" + codec "git.fd.io/govpp.git/codec" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion2 + +const ( + APIFile = "p2p_ethernet" + APIVersion = "1.0.0" + VersionCrc = 0xe34f63cd +) + +// P2pEthernetAdd defines message 'p2p_ethernet_add'. +type P2pEthernetAdd struct { + ParentIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` + SubifID uint32 `binapi:"u32,name=subif_id" json:"subif_id,omitempty"` + RemoteMac ethernet_types.MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"` +} + +func (m *P2pEthernetAdd) Reset() { *m = P2pEthernetAdd{} } +func (*P2pEthernetAdd) GetMessageName() string { return "p2p_ethernet_add" } +func (*P2pEthernetAdd) GetCrcString() string { return "eeb8e717" } +func (*P2pEthernetAdd) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *P2pEthernetAdd) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.ParentIfIndex + size += 4 // m.SubifID + size += 1 * 6 // m.RemoteMac + return size +} +func (m *P2pEthernetAdd) 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.ParentIfIndex)) + buf.EncodeUint32(uint32(m.SubifID)) + buf.EncodeBytes(m.RemoteMac[:], 6) + return buf.Bytes(), nil +} +func (m *P2pEthernetAdd) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.ParentIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.SubifID = buf.DecodeUint32() + copy(m.RemoteMac[:], buf.DecodeBytes(6)) + return nil +} + +// P2pEthernetAddReply defines message 'p2p_ethernet_add_reply'. +type P2pEthernetAddReply 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"` +} + +func (m *P2pEthernetAddReply) Reset() { *m = P2pEthernetAddReply{} } +func (*P2pEthernetAddReply) GetMessageName() string { return "p2p_ethernet_add_reply" } +func (*P2pEthernetAddReply) GetCrcString() string { return "5383d31f" } +func (*P2pEthernetAddReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *P2pEthernetAddReply) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.Retval + size += 4 // m.SwIfIndex + return size +} +func (m *P2pEthernetAddReply) 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.Retval)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *P2pEthernetAddReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// P2pEthernetDel defines message 'p2p_ethernet_del'. +type P2pEthernetDel struct { + ParentIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` + RemoteMac ethernet_types.MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"` +} + +func (m *P2pEthernetDel) Reset() { *m = P2pEthernetDel{} } +func (*P2pEthernetDel) GetMessageName() string { return "p2p_ethernet_del" } +func (*P2pEthernetDel) GetCrcString() string { return "0b62c386" } +func (*P2pEthernetDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *P2pEthernetDel) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.ParentIfIndex + size += 1 * 6 // m.RemoteMac + return size +} +func (m *P2pEthernetDel) 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.ParentIfIndex)) + buf.EncodeBytes(m.RemoteMac[:], 6) + return buf.Bytes(), nil +} +func (m *P2pEthernetDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.ParentIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + copy(m.RemoteMac[:], buf.DecodeBytes(6)) + return nil +} + +// P2pEthernetDelReply defines message 'p2p_ethernet_del_reply'. +type P2pEthernetDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *P2pEthernetDelReply) Reset() { *m = P2pEthernetDelReply{} } +func (*P2pEthernetDelReply) GetMessageName() string { return "p2p_ethernet_del_reply" } +func (*P2pEthernetDelReply) GetCrcString() string { return "e8d4e804" } +func (*P2pEthernetDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *P2pEthernetDelReply) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.Retval + return size +} +func (m *P2pEthernetDelReply) 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.Retval)) + return buf.Bytes(), nil +} +func (m *P2pEthernetDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +func init() { file_p2p_ethernet_binapi_init() } +func file_p2p_ethernet_binapi_init() { + api.RegisterMessage((*P2pEthernetAdd)(nil), "p2p_ethernet_add_eeb8e717") + api.RegisterMessage((*P2pEthernetAddReply)(nil), "p2p_ethernet_add_reply_5383d31f") + api.RegisterMessage((*P2pEthernetDel)(nil), "p2p_ethernet_del_0b62c386") + api.RegisterMessage((*P2pEthernetDelReply)(nil), "p2p_ethernet_del_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*P2pEthernetAdd)(nil), + (*P2pEthernetAddReply)(nil), + (*P2pEthernetDel)(nil), + (*P2pEthernetDelReply)(nil), + } +} |