1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: /usr/share/vpp/api/plugins/adl.api.json
7 // Package adl contains generated bindings for API file adl.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 = 0xb752b7a2
32 // AdlAllowlistEnableDisable defines message 'adl_allowlist_enable_disable'.
33 // InProgress: the message form may change in the future versions
34 type AdlAllowlistEnableDisable struct {
35 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
36 FibID uint32 `binapi:"u32,name=fib_id" json:"fib_id,omitempty"`
37 IP4 bool `binapi:"bool,name=ip4" json:"ip4,omitempty"`
38 IP6 bool `binapi:"bool,name=ip6" json:"ip6,omitempty"`
39 DefaultAdl bool `binapi:"bool,name=default_adl" json:"default_adl,omitempty"`
42 func (m *AdlAllowlistEnableDisable) Reset() { *m = AdlAllowlistEnableDisable{} }
43 func (*AdlAllowlistEnableDisable) GetMessageName() string { return "adl_allowlist_enable_disable" }
44 func (*AdlAllowlistEnableDisable) GetCrcString() string { return "ea88828d" }
45 func (*AdlAllowlistEnableDisable) GetMessageType() api.MessageType {
46 return api.RequestMessage
49 func (m *AdlAllowlistEnableDisable) Size() (size int) {
53 size += 4 // m.SwIfIndex
57 size += 1 // m.DefaultAdl
60 func (m *AdlAllowlistEnableDisable) Marshal(b []byte) ([]byte, error) {
62 b = make([]byte, m.Size())
64 buf := codec.NewBuffer(b)
65 buf.EncodeUint32(uint32(m.SwIfIndex))
66 buf.EncodeUint32(m.FibID)
69 buf.EncodeBool(m.DefaultAdl)
70 return buf.Bytes(), nil
72 func (m *AdlAllowlistEnableDisable) Unmarshal(b []byte) error {
73 buf := codec.NewBuffer(b)
74 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
75 m.FibID = buf.DecodeUint32()
76 m.IP4 = buf.DecodeBool()
77 m.IP6 = buf.DecodeBool()
78 m.DefaultAdl = buf.DecodeBool()
82 // AdlAllowlistEnableDisableReply defines message 'adl_allowlist_enable_disable_reply'.
83 // InProgress: the message form may change in the future versions
84 type AdlAllowlistEnableDisableReply struct {
85 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
88 func (m *AdlAllowlistEnableDisableReply) Reset() { *m = AdlAllowlistEnableDisableReply{} }
89 func (*AdlAllowlistEnableDisableReply) GetMessageName() string {
90 return "adl_allowlist_enable_disable_reply"
92 func (*AdlAllowlistEnableDisableReply) GetCrcString() string { return "e8d4e804" }
93 func (*AdlAllowlistEnableDisableReply) GetMessageType() api.MessageType {
94 return api.ReplyMessage
97 func (m *AdlAllowlistEnableDisableReply) Size() (size int) {
101 size += 4 // m.Retval
104 func (m *AdlAllowlistEnableDisableReply) Marshal(b []byte) ([]byte, error) {
106 b = make([]byte, m.Size())
108 buf := codec.NewBuffer(b)
109 buf.EncodeInt32(m.Retval)
110 return buf.Bytes(), nil
112 func (m *AdlAllowlistEnableDisableReply) Unmarshal(b []byte) error {
113 buf := codec.NewBuffer(b)
114 m.Retval = buf.DecodeInt32()
118 // AdlInterfaceEnableDisable defines message 'adl_interface_enable_disable'.
119 // InProgress: the message form may change in the future versions
120 type AdlInterfaceEnableDisable struct {
121 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
122 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
125 func (m *AdlInterfaceEnableDisable) Reset() { *m = AdlInterfaceEnableDisable{} }
126 func (*AdlInterfaceEnableDisable) GetMessageName() string { return "adl_interface_enable_disable" }
127 func (*AdlInterfaceEnableDisable) GetCrcString() string { return "5501adee" }
128 func (*AdlInterfaceEnableDisable) GetMessageType() api.MessageType {
129 return api.RequestMessage
132 func (m *AdlInterfaceEnableDisable) Size() (size int) {
136 size += 4 // m.SwIfIndex
137 size += 1 // m.EnableDisable
140 func (m *AdlInterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
142 b = make([]byte, m.Size())
144 buf := codec.NewBuffer(b)
145 buf.EncodeUint32(uint32(m.SwIfIndex))
146 buf.EncodeBool(m.EnableDisable)
147 return buf.Bytes(), nil
149 func (m *AdlInterfaceEnableDisable) Unmarshal(b []byte) error {
150 buf := codec.NewBuffer(b)
151 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
152 m.EnableDisable = buf.DecodeBool()
156 // AdlInterfaceEnableDisableReply defines message 'adl_interface_enable_disable_reply'.
157 // InProgress: the message form may change in the future versions
158 type AdlInterfaceEnableDisableReply struct {
159 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
162 func (m *AdlInterfaceEnableDisableReply) Reset() { *m = AdlInterfaceEnableDisableReply{} }
163 func (*AdlInterfaceEnableDisableReply) GetMessageName() string {
164 return "adl_interface_enable_disable_reply"
166 func (*AdlInterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
167 func (*AdlInterfaceEnableDisableReply) GetMessageType() api.MessageType {
168 return api.ReplyMessage
171 func (m *AdlInterfaceEnableDisableReply) Size() (size int) {
175 size += 4 // m.Retval
178 func (m *AdlInterfaceEnableDisableReply) Marshal(b []byte) ([]byte, error) {
180 b = make([]byte, m.Size())
182 buf := codec.NewBuffer(b)
183 buf.EncodeInt32(m.Retval)
184 return buf.Bytes(), nil
186 func (m *AdlInterfaceEnableDisableReply) Unmarshal(b []byte) error {
187 buf := codec.NewBuffer(b)
188 m.Retval = buf.DecodeInt32()
192 func init() { file_adl_binapi_init() }
193 func file_adl_binapi_init() {
194 api.RegisterMessage((*AdlAllowlistEnableDisable)(nil), "adl_allowlist_enable_disable_ea88828d")
195 api.RegisterMessage((*AdlAllowlistEnableDisableReply)(nil), "adl_allowlist_enable_disable_reply_e8d4e804")
196 api.RegisterMessage((*AdlInterfaceEnableDisable)(nil), "adl_interface_enable_disable_5501adee")
197 api.RegisterMessage((*AdlInterfaceEnableDisableReply)(nil), "adl_interface_enable_disable_reply_e8d4e804")
200 // Messages returns list of all messages in this module.
201 func AllMessages() []api.Message {
202 return []api.Message{
203 (*AdlAllowlistEnableDisable)(nil),
204 (*AdlAllowlistEnableDisableReply)(nil),
205 (*AdlInterfaceEnableDisable)(nil),
206 (*AdlInterfaceEnableDisableReply)(nil),