1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/feature.api.json
7 // Package feature contains generated bindings for API file feature.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0x8dd9f8ab
32 // FeatureEnableDisable defines message 'feature_enable_disable'.
33 type FeatureEnableDisable struct {
34 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
35 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
36 ArcName string `binapi:"string[64],name=arc_name" json:"arc_name,omitempty"`
37 FeatureName string `binapi:"string[64],name=feature_name" json:"feature_name,omitempty"`
40 func (m *FeatureEnableDisable) Reset() { *m = FeatureEnableDisable{} }
41 func (*FeatureEnableDisable) GetMessageName() string { return "feature_enable_disable" }
42 func (*FeatureEnableDisable) GetCrcString() string { return "7531c862" }
43 func (*FeatureEnableDisable) GetMessageType() api.MessageType {
44 return api.RequestMessage
47 func (m *FeatureEnableDisable) Size() (size int) {
51 size += 4 // m.SwIfIndex
53 size += 64 // m.ArcName
54 size += 64 // m.FeatureName
57 func (m *FeatureEnableDisable) Marshal(b []byte) ([]byte, error) {
59 b = make([]byte, m.Size())
61 buf := codec.NewBuffer(b)
62 buf.EncodeUint32(uint32(m.SwIfIndex))
63 buf.EncodeBool(m.Enable)
64 buf.EncodeString(m.ArcName, 64)
65 buf.EncodeString(m.FeatureName, 64)
66 return buf.Bytes(), nil
68 func (m *FeatureEnableDisable) Unmarshal(b []byte) error {
69 buf := codec.NewBuffer(b)
70 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
71 m.Enable = buf.DecodeBool()
72 m.ArcName = buf.DecodeString(64)
73 m.FeatureName = buf.DecodeString(64)
77 // FeatureEnableDisableReply defines message 'feature_enable_disable_reply'.
78 type FeatureEnableDisableReply struct {
79 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
82 func (m *FeatureEnableDisableReply) Reset() { *m = FeatureEnableDisableReply{} }
83 func (*FeatureEnableDisableReply) GetMessageName() string { return "feature_enable_disable_reply" }
84 func (*FeatureEnableDisableReply) GetCrcString() string { return "e8d4e804" }
85 func (*FeatureEnableDisableReply) GetMessageType() api.MessageType {
86 return api.ReplyMessage
89 func (m *FeatureEnableDisableReply) Size() (size int) {
96 func (m *FeatureEnableDisableReply) Marshal(b []byte) ([]byte, error) {
98 b = make([]byte, m.Size())
100 buf := codec.NewBuffer(b)
101 buf.EncodeInt32(m.Retval)
102 return buf.Bytes(), nil
104 func (m *FeatureEnableDisableReply) Unmarshal(b []byte) error {
105 buf := codec.NewBuffer(b)
106 m.Retval = buf.DecodeInt32()
110 func init() { file_feature_binapi_init() }
111 func file_feature_binapi_init() {
112 api.RegisterMessage((*FeatureEnableDisable)(nil), "feature_enable_disable_7531c862")
113 api.RegisterMessage((*FeatureEnableDisableReply)(nil), "feature_enable_disable_reply_e8d4e804")
116 // Messages returns list of all messages in this module.
117 func AllMessages() []api.Message {
118 return []api.Message{
119 (*FeatureEnableDisable)(nil),
120 (*FeatureEnableDisableReply)(nil),