1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.3.5-56-gc0da1f2-dirty
5 // source: /usr/share/vpp/api/core/flow.api.json
7 // Package flow contains generated bindings for API file flow.api.
15 api "git.fd.io/govpp.git/api"
16 _ "git.fd.io/govpp.git/binapi/ethernet_types"
17 flow_types "git.fd.io/govpp.git/binapi/flow_types"
18 _ "git.fd.io/govpp.git/binapi/interface_types"
19 _ "git.fd.io/govpp.git/binapi/ip_types"
20 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0x140d3585
35 // FlowAdd defines message 'flow_add'.
36 // InProgress: the message form may change in the future versions
38 Flow flow_types.FlowRule `binapi:"flow_rule,name=flow" json:"flow,omitempty"`
41 func (m *FlowAdd) Reset() { *m = FlowAdd{} }
42 func (*FlowAdd) GetMessageName() string { return "flow_add" }
43 func (*FlowAdd) GetCrcString() string { return "f946ed84" }
44 func (*FlowAdd) GetMessageType() api.MessageType {
45 return api.RequestMessage
48 func (m *FlowAdd) Size() (size int) {
52 size += 4 // m.Flow.Type
53 size += 4 // m.Flow.Index
54 size += 4 // m.Flow.Actions
55 size += 4 // m.Flow.MarkFlowID
56 size += 4 // m.Flow.RedirectNodeIndex
57 size += 4 // m.Flow.RedirectDeviceInputNextIndex
58 size += 4 // m.Flow.RedirectQueue
59 size += 4 // m.Flow.BufferAdvance
60 size += 1 * 82 // m.Flow.Flow
63 func (m *FlowAdd) Marshal(b []byte) ([]byte, error) {
65 b = make([]byte, m.Size())
67 buf := codec.NewBuffer(b)
68 buf.EncodeUint32(uint32(m.Flow.Type))
69 buf.EncodeUint32(m.Flow.Index)
70 buf.EncodeUint32(uint32(m.Flow.Actions))
71 buf.EncodeUint32(m.Flow.MarkFlowID)
72 buf.EncodeUint32(m.Flow.RedirectNodeIndex)
73 buf.EncodeUint32(m.Flow.RedirectDeviceInputNextIndex)
74 buf.EncodeUint32(m.Flow.RedirectQueue)
75 buf.EncodeInt32(m.Flow.BufferAdvance)
76 buf.EncodeBytes(m.Flow.Flow.XXX_UnionData[:], 82)
77 return buf.Bytes(), nil
79 func (m *FlowAdd) Unmarshal(b []byte) error {
80 buf := codec.NewBuffer(b)
81 m.Flow.Type = flow_types.FlowType(buf.DecodeUint32())
82 m.Flow.Index = buf.DecodeUint32()
83 m.Flow.Actions = flow_types.FlowAction(buf.DecodeUint32())
84 m.Flow.MarkFlowID = buf.DecodeUint32()
85 m.Flow.RedirectNodeIndex = buf.DecodeUint32()
86 m.Flow.RedirectDeviceInputNextIndex = buf.DecodeUint32()
87 m.Flow.RedirectQueue = buf.DecodeUint32()
88 m.Flow.BufferAdvance = buf.DecodeInt32()
89 copy(m.Flow.Flow.XXX_UnionData[:], buf.DecodeBytes(82))
93 // FlowAddReply defines message 'flow_add_reply'.
94 // InProgress: the message form may change in the future versions
95 type FlowAddReply struct {
96 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
97 FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"`
100 func (m *FlowAddReply) Reset() { *m = FlowAddReply{} }
101 func (*FlowAddReply) GetMessageName() string { return "flow_add_reply" }
102 func (*FlowAddReply) GetCrcString() string { return "8587dc85" }
103 func (*FlowAddReply) GetMessageType() api.MessageType {
104 return api.ReplyMessage
107 func (m *FlowAddReply) Size() (size int) {
111 size += 4 // m.Retval
112 size += 4 // m.FlowIndex
115 func (m *FlowAddReply) Marshal(b []byte) ([]byte, error) {
117 b = make([]byte, m.Size())
119 buf := codec.NewBuffer(b)
120 buf.EncodeInt32(m.Retval)
121 buf.EncodeUint32(m.FlowIndex)
122 return buf.Bytes(), nil
124 func (m *FlowAddReply) Unmarshal(b []byte) error {
125 buf := codec.NewBuffer(b)
126 m.Retval = buf.DecodeInt32()
127 m.FlowIndex = buf.DecodeUint32()
131 // FlowDel defines message 'flow_del'.
132 // InProgress: the message form may change in the future versions
133 type FlowDel struct {
134 FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"`
137 func (m *FlowDel) Reset() { *m = FlowDel{} }
138 func (*FlowDel) GetMessageName() string { return "flow_del" }
139 func (*FlowDel) GetCrcString() string { return "b6b9b02c" }
140 func (*FlowDel) GetMessageType() api.MessageType {
141 return api.RequestMessage
144 func (m *FlowDel) Size() (size int) {
148 size += 4 // m.FlowIndex
151 func (m *FlowDel) Marshal(b []byte) ([]byte, error) {
153 b = make([]byte, m.Size())
155 buf := codec.NewBuffer(b)
156 buf.EncodeUint32(m.FlowIndex)
157 return buf.Bytes(), nil
159 func (m *FlowDel) Unmarshal(b []byte) error {
160 buf := codec.NewBuffer(b)
161 m.FlowIndex = buf.DecodeUint32()
165 // FlowDelReply defines message 'flow_del_reply'.
166 // InProgress: the message form may change in the future versions
167 type FlowDelReply struct {
168 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
171 func (m *FlowDelReply) Reset() { *m = FlowDelReply{} }
172 func (*FlowDelReply) GetMessageName() string { return "flow_del_reply" }
173 func (*FlowDelReply) GetCrcString() string { return "e8d4e804" }
174 func (*FlowDelReply) GetMessageType() api.MessageType {
175 return api.ReplyMessage
178 func (m *FlowDelReply) Size() (size int) {
182 size += 4 // m.Retval
185 func (m *FlowDelReply) Marshal(b []byte) ([]byte, error) {
187 b = make([]byte, m.Size())
189 buf := codec.NewBuffer(b)
190 buf.EncodeInt32(m.Retval)
191 return buf.Bytes(), nil
193 func (m *FlowDelReply) Unmarshal(b []byte) error {
194 buf := codec.NewBuffer(b)
195 m.Retval = buf.DecodeInt32()
199 // FlowDisable defines message 'flow_disable'.
200 // InProgress: the message form may change in the future versions
201 type FlowDisable struct {
202 FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"`
203 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
206 func (m *FlowDisable) Reset() { *m = FlowDisable{} }
207 func (*FlowDisable) GetMessageName() string { return "flow_disable" }
208 func (*FlowDisable) GetCrcString() string { return "2024be69" }
209 func (*FlowDisable) GetMessageType() api.MessageType {
210 return api.RequestMessage
213 func (m *FlowDisable) Size() (size int) {
217 size += 4 // m.FlowIndex
218 size += 4 // m.HwIfIndex
221 func (m *FlowDisable) Marshal(b []byte) ([]byte, error) {
223 b = make([]byte, m.Size())
225 buf := codec.NewBuffer(b)
226 buf.EncodeUint32(m.FlowIndex)
227 buf.EncodeUint32(m.HwIfIndex)
228 return buf.Bytes(), nil
230 func (m *FlowDisable) Unmarshal(b []byte) error {
231 buf := codec.NewBuffer(b)
232 m.FlowIndex = buf.DecodeUint32()
233 m.HwIfIndex = buf.DecodeUint32()
237 // FlowDisableReply defines message 'flow_disable_reply'.
238 // InProgress: the message form may change in the future versions
239 type FlowDisableReply struct {
240 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
243 func (m *FlowDisableReply) Reset() { *m = FlowDisableReply{} }
244 func (*FlowDisableReply) GetMessageName() string { return "flow_disable_reply" }
245 func (*FlowDisableReply) GetCrcString() string { return "e8d4e804" }
246 func (*FlowDisableReply) GetMessageType() api.MessageType {
247 return api.ReplyMessage
250 func (m *FlowDisableReply) Size() (size int) {
254 size += 4 // m.Retval
257 func (m *FlowDisableReply) Marshal(b []byte) ([]byte, error) {
259 b = make([]byte, m.Size())
261 buf := codec.NewBuffer(b)
262 buf.EncodeInt32(m.Retval)
263 return buf.Bytes(), nil
265 func (m *FlowDisableReply) Unmarshal(b []byte) error {
266 buf := codec.NewBuffer(b)
267 m.Retval = buf.DecodeInt32()
271 // FlowEnable defines message 'flow_enable'.
272 // InProgress: the message form may change in the future versions
273 type FlowEnable struct {
274 FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"`
275 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
278 func (m *FlowEnable) Reset() { *m = FlowEnable{} }
279 func (*FlowEnable) GetMessageName() string { return "flow_enable" }
280 func (*FlowEnable) GetCrcString() string { return "2024be69" }
281 func (*FlowEnable) GetMessageType() api.MessageType {
282 return api.RequestMessage
285 func (m *FlowEnable) Size() (size int) {
289 size += 4 // m.FlowIndex
290 size += 4 // m.HwIfIndex
293 func (m *FlowEnable) Marshal(b []byte) ([]byte, error) {
295 b = make([]byte, m.Size())
297 buf := codec.NewBuffer(b)
298 buf.EncodeUint32(m.FlowIndex)
299 buf.EncodeUint32(m.HwIfIndex)
300 return buf.Bytes(), nil
302 func (m *FlowEnable) Unmarshal(b []byte) error {
303 buf := codec.NewBuffer(b)
304 m.FlowIndex = buf.DecodeUint32()
305 m.HwIfIndex = buf.DecodeUint32()
309 // FlowEnableReply defines message 'flow_enable_reply'.
310 // InProgress: the message form may change in the future versions
311 type FlowEnableReply struct {
312 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
315 func (m *FlowEnableReply) Reset() { *m = FlowEnableReply{} }
316 func (*FlowEnableReply) GetMessageName() string { return "flow_enable_reply" }
317 func (*FlowEnableReply) GetCrcString() string { return "e8d4e804" }
318 func (*FlowEnableReply) GetMessageType() api.MessageType {
319 return api.ReplyMessage
322 func (m *FlowEnableReply) Size() (size int) {
326 size += 4 // m.Retval
329 func (m *FlowEnableReply) Marshal(b []byte) ([]byte, error) {
331 b = make([]byte, m.Size())
333 buf := codec.NewBuffer(b)
334 buf.EncodeInt32(m.Retval)
335 return buf.Bytes(), nil
337 func (m *FlowEnableReply) Unmarshal(b []byte) error {
338 buf := codec.NewBuffer(b)
339 m.Retval = buf.DecodeInt32()
343 func init() { file_flow_binapi_init() }
344 func file_flow_binapi_init() {
345 api.RegisterMessage((*FlowAdd)(nil), "flow_add_f946ed84")
346 api.RegisterMessage((*FlowAddReply)(nil), "flow_add_reply_8587dc85")
347 api.RegisterMessage((*FlowDel)(nil), "flow_del_b6b9b02c")
348 api.RegisterMessage((*FlowDelReply)(nil), "flow_del_reply_e8d4e804")
349 api.RegisterMessage((*FlowDisable)(nil), "flow_disable_2024be69")
350 api.RegisterMessage((*FlowDisableReply)(nil), "flow_disable_reply_e8d4e804")
351 api.RegisterMessage((*FlowEnable)(nil), "flow_enable_2024be69")
352 api.RegisterMessage((*FlowEnableReply)(nil), "flow_enable_reply_e8d4e804")
355 // Messages returns list of all messages in this module.
356 func AllMessages() []api.Message {
357 return []api.Message{
359 (*FlowAddReply)(nil),
361 (*FlowDelReply)(nil),
363 (*FlowDisableReply)(nil),
365 (*FlowEnableReply)(nil),