X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fpppoe%2Fpppoe.ba.go;h=7e02eba88d4eae37917990a62168ff93e40347a6;hb=4102c72bce694babd94a481b1201d33895a6f9c5;hp=0b7cafb971f7e6d10e4f0b75f55b7a84dfc70358;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/pppoe/pppoe.ba.go b/binapi/pppoe/pppoe.ba.go index 0b7cafb..7e02eba 100644 --- a/binapi/pppoe/pppoe.ba.go +++ b/binapi/pppoe/pppoe.ba.go @@ -1,13 +1,13 @@ // 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-dev +// VPP: 22.02-release // source: /usr/share/vpp/api/plugins/pppoe.api.json // Package pppoe contains generated bindings for API file pppoe.api. // // Contents: -// 4 messages +// 6 messages // package pppoe @@ -28,9 +28,79 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "pppoe" APIVersion = "2.0.0" - VersionCrc = 0x24ebf557 + VersionCrc = 0xec9e86bf ) +// PppoeAddDelCp defines message 'pppoe_add_del_cp'. +type PppoeAddDelCp struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` +} + +func (m *PppoeAddDelCp) Reset() { *m = PppoeAddDelCp{} } +func (*PppoeAddDelCp) GetMessageName() string { return "pppoe_add_del_cp" } +func (*PppoeAddDelCp) GetCrcString() string { return "eacd9aaa" } +func (*PppoeAddDelCp) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PppoeAddDelCp) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 1 // m.IsAdd + return size +} +func (m *PppoeAddDelCp) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint8(m.IsAdd) + return buf.Bytes(), nil +} +func (m *PppoeAddDelCp) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IsAdd = buf.DecodeUint8() + return nil +} + +// PppoeAddDelCpReply defines message 'pppoe_add_del_cp_reply'. +type PppoeAddDelCpReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PppoeAddDelCpReply) Reset() { *m = PppoeAddDelCpReply{} } +func (*PppoeAddDelCpReply) GetMessageName() string { return "pppoe_add_del_cp_reply" } +func (*PppoeAddDelCpReply) GetCrcString() string { return "e8d4e804" } +func (*PppoeAddDelCpReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PppoeAddDelCpReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PppoeAddDelCpReply) 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 *PppoeAddDelCpReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // PppoeAddDelSession defines message 'pppoe_add_del_session'. type PppoeAddDelSession struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -42,16 +112,15 @@ type PppoeAddDelSession struct { func (m *PppoeAddDelSession) Reset() { *m = PppoeAddDelSession{} } func (*PppoeAddDelSession) GetMessageName() string { return "pppoe_add_del_session" } -func (*PppoeAddDelSession) GetCrcString() string { return "46ace853" } +func (*PppoeAddDelSession) GetCrcString() string { return "f6fd759e" } func (*PppoeAddDelSession) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *PppoeAddDelSession) Size() int { +func (m *PppoeAddDelSession) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsAdd size += 2 // m.SessionID size += 1 // m.ClientIP.Af @@ -61,17 +130,15 @@ func (m *PppoeAddDelSession) Size() int { return size } func (m *PppoeAddDelSession) 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.SessionID)) + buf.EncodeUint16(m.SessionID) buf.EncodeUint8(uint8(m.ClientIP.Af)) - buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 0) - buf.EncodeUint32(uint32(m.DecapVrfID)) + buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 16) + buf.EncodeUint32(m.DecapVrfID) buf.EncodeBytes(m.ClientMac[:], 6) return buf.Bytes(), nil } @@ -99,29 +166,26 @@ func (*PppoeAddDelSessionReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *PppoeAddDelSessionReply) Size() int { +func (m *PppoeAddDelSessionReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval size += 4 // m.SwIfIndex return size } func (m *PppoeAddDelSessionReply) 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 *PppoeAddDelSessionReply) 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 } @@ -139,16 +203,15 @@ type PppoeSessionDetails struct { func (m *PppoeSessionDetails) Reset() { *m = PppoeSessionDetails{} } func (*PppoeSessionDetails) GetMessageName() string { return "pppoe_session_details" } -func (*PppoeSessionDetails) GetCrcString() string { return "332bc742" } +func (*PppoeSessionDetails) GetCrcString() string { return "4b8e8a4a" } func (*PppoeSessionDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *PppoeSessionDetails) Size() int { +func (m *PppoeSessionDetails) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.SwIfIndex size += 2 // m.SessionID size += 1 // m.ClientIP.Af @@ -160,18 +223,16 @@ func (m *PppoeSessionDetails) Size() int { return size } func (m *PppoeSessionDetails) 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.EncodeUint16(uint16(m.SessionID)) + buf.EncodeUint16(m.SessionID) buf.EncodeUint8(uint8(m.ClientIP.Af)) - buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 16) buf.EncodeUint32(uint32(m.EncapIfIndex)) - buf.EncodeUint32(uint32(m.DecapVrfID)) + buf.EncodeUint32(m.DecapVrfID) buf.EncodeBytes(m.LocalMac[:], 6) buf.EncodeBytes(m.ClientMac[:], 6) return buf.Bytes(), nil @@ -201,21 +262,18 @@ func (*PppoeSessionDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *PppoeSessionDump) Size() int { +func (m *PppoeSessionDump) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.SwIfIndex return size } func (m *PppoeSessionDump) 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 } @@ -227,15 +285,19 @@ func (m *PppoeSessionDump) Unmarshal(b []byte) error { func init() { file_pppoe_binapi_init() } func file_pppoe_binapi_init() { - api.RegisterMessage((*PppoeAddDelSession)(nil), "pppoe_add_del_session_46ace853") + api.RegisterMessage((*PppoeAddDelCp)(nil), "pppoe_add_del_cp_eacd9aaa") + api.RegisterMessage((*PppoeAddDelCpReply)(nil), "pppoe_add_del_cp_reply_e8d4e804") + api.RegisterMessage((*PppoeAddDelSession)(nil), "pppoe_add_del_session_f6fd759e") api.RegisterMessage((*PppoeAddDelSessionReply)(nil), "pppoe_add_del_session_reply_5383d31f") - api.RegisterMessage((*PppoeSessionDetails)(nil), "pppoe_session_details_332bc742") + api.RegisterMessage((*PppoeSessionDetails)(nil), "pppoe_session_details_4b8e8a4a") api.RegisterMessage((*PppoeSessionDump)(nil), "pppoe_session_dump_f9e6675e") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ + (*PppoeAddDelCp)(nil), + (*PppoeAddDelCpReply)(nil), (*PppoeAddDelSession)(nil), (*PppoeAddDelSessionReply)(nil), (*PppoeSessionDetails)(nil),