296b4c54c573a9da5e9ea00bea830a1657125854
[govpp.git] / binapi / abf / abf.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package abf contains generated bindings for API file abf.api.
7 //
8 // Contents:
9 //   2 structs
10 //  10 messages
11 //
12 package abf
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         fib_types "git.fd.io/govpp.git/binapi/fib_types"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         _ "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 const (
29         APIFile    = "abf"
30         APIVersion = "1.0.0"
31         VersionCrc = 0x460b09b9
32 )
33
34 // AbfItfAttach defines type 'abf_itf_attach'.
35 type AbfItfAttach struct {
36         PolicyID  uint32                         `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
37         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
38         Priority  uint32                         `binapi:"u32,name=priority" json:"priority,omitempty"`
39         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
40 }
41
42 // AbfPolicy defines type 'abf_policy'.
43 type AbfPolicy struct {
44         PolicyID uint32              `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
45         ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
46         NPaths   uint8               `binapi:"u8,name=n_paths" json:"-"`
47         Paths    []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
48 }
49
50 // AbfItfAttachAddDel defines message 'abf_itf_attach_add_del'.
51 type AbfItfAttachAddDel struct {
52         IsAdd  bool         `binapi:"bool,name=is_add" json:"is_add,omitempty"`
53         Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
54 }
55
56 func (m *AbfItfAttachAddDel) Reset()               { *m = AbfItfAttachAddDel{} }
57 func (*AbfItfAttachAddDel) GetMessageName() string { return "abf_itf_attach_add_del" }
58 func (*AbfItfAttachAddDel) GetCrcString() string   { return "25c8621b" }
59 func (*AbfItfAttachAddDel) GetMessageType() api.MessageType {
60         return api.RequestMessage
61 }
62
63 func (m *AbfItfAttachAddDel) Size() (size int) {
64         if m == nil {
65                 return 0
66         }
67         size += 1 // m.IsAdd
68         size += 4 // m.Attach.PolicyID
69         size += 4 // m.Attach.SwIfIndex
70         size += 4 // m.Attach.Priority
71         size += 1 // m.Attach.IsIPv6
72         return size
73 }
74 func (m *AbfItfAttachAddDel) Marshal(b []byte) ([]byte, error) {
75         if b == nil {
76                 b = make([]byte, m.Size())
77         }
78         buf := codec.NewBuffer(b)
79         buf.EncodeBool(m.IsAdd)
80         buf.EncodeUint32(m.Attach.PolicyID)
81         buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
82         buf.EncodeUint32(m.Attach.Priority)
83         buf.EncodeBool(m.Attach.IsIPv6)
84         return buf.Bytes(), nil
85 }
86 func (m *AbfItfAttachAddDel) Unmarshal(b []byte) error {
87         buf := codec.NewBuffer(b)
88         m.IsAdd = buf.DecodeBool()
89         m.Attach.PolicyID = buf.DecodeUint32()
90         m.Attach.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
91         m.Attach.Priority = buf.DecodeUint32()
92         m.Attach.IsIPv6 = buf.DecodeBool()
93         return nil
94 }
95
96 // AbfItfAttachAddDelReply defines message 'abf_itf_attach_add_del_reply'.
97 type AbfItfAttachAddDelReply struct {
98         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
99 }
100
101 func (m *AbfItfAttachAddDelReply) Reset()               { *m = AbfItfAttachAddDelReply{} }
102 func (*AbfItfAttachAddDelReply) GetMessageName() string { return "abf_itf_attach_add_del_reply" }
103 func (*AbfItfAttachAddDelReply) GetCrcString() string   { return "e8d4e804" }
104 func (*AbfItfAttachAddDelReply) GetMessageType() api.MessageType {
105         return api.ReplyMessage
106 }
107
108 func (m *AbfItfAttachAddDelReply) Size() (size int) {
109         if m == nil {
110                 return 0
111         }
112         size += 4 // m.Retval
113         return size
114 }
115 func (m *AbfItfAttachAddDelReply) Marshal(b []byte) ([]byte, error) {
116         if b == nil {
117                 b = make([]byte, m.Size())
118         }
119         buf := codec.NewBuffer(b)
120         buf.EncodeInt32(m.Retval)
121         return buf.Bytes(), nil
122 }
123 func (m *AbfItfAttachAddDelReply) Unmarshal(b []byte) error {
124         buf := codec.NewBuffer(b)
125         m.Retval = buf.DecodeInt32()
126         return nil
127 }
128
129 // AbfItfAttachDetails defines message 'abf_itf_attach_details'.
130 type AbfItfAttachDetails struct {
131         Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
132 }
133
134 func (m *AbfItfAttachDetails) Reset()               { *m = AbfItfAttachDetails{} }
135 func (*AbfItfAttachDetails) GetMessageName() string { return "abf_itf_attach_details" }
136 func (*AbfItfAttachDetails) GetCrcString() string   { return "7819523e" }
137 func (*AbfItfAttachDetails) GetMessageType() api.MessageType {
138         return api.ReplyMessage
139 }
140
141 func (m *AbfItfAttachDetails) Size() (size int) {
142         if m == nil {
143                 return 0
144         }
145         size += 4 // m.Attach.PolicyID
146         size += 4 // m.Attach.SwIfIndex
147         size += 4 // m.Attach.Priority
148         size += 1 // m.Attach.IsIPv6
149         return size
150 }
151 func (m *AbfItfAttachDetails) Marshal(b []byte) ([]byte, error) {
152         if b == nil {
153                 b = make([]byte, m.Size())
154         }
155         buf := codec.NewBuffer(b)
156         buf.EncodeUint32(m.Attach.PolicyID)
157         buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
158         buf.EncodeUint32(m.Attach.Priority)
159         buf.EncodeBool(m.Attach.IsIPv6)
160         return buf.Bytes(), nil
161 }
162 func (m *AbfItfAttachDetails) Unmarshal(b []byte) error {
163         buf := codec.NewBuffer(b)
164         m.Attach.PolicyID = buf.DecodeUint32()
165         m.Attach.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
166         m.Attach.Priority = buf.DecodeUint32()
167         m.Attach.IsIPv6 = buf.DecodeBool()
168         return nil
169 }
170
171 // AbfItfAttachDump defines message 'abf_itf_attach_dump'.
172 type AbfItfAttachDump struct{}
173
174 func (m *AbfItfAttachDump) Reset()               { *m = AbfItfAttachDump{} }
175 func (*AbfItfAttachDump) GetMessageName() string { return "abf_itf_attach_dump" }
176 func (*AbfItfAttachDump) GetCrcString() string   { return "51077d14" }
177 func (*AbfItfAttachDump) GetMessageType() api.MessageType {
178         return api.RequestMessage
179 }
180
181 func (m *AbfItfAttachDump) Size() (size int) {
182         if m == nil {
183                 return 0
184         }
185         return size
186 }
187 func (m *AbfItfAttachDump) Marshal(b []byte) ([]byte, error) {
188         if b == nil {
189                 b = make([]byte, m.Size())
190         }
191         buf := codec.NewBuffer(b)
192         return buf.Bytes(), nil
193 }
194 func (m *AbfItfAttachDump) Unmarshal(b []byte) error {
195         return nil
196 }
197
198 // AbfPluginGetVersion defines message 'abf_plugin_get_version'.
199 type AbfPluginGetVersion struct{}
200
201 func (m *AbfPluginGetVersion) Reset()               { *m = AbfPluginGetVersion{} }
202 func (*AbfPluginGetVersion) GetMessageName() string { return "abf_plugin_get_version" }
203 func (*AbfPluginGetVersion) GetCrcString() string   { return "51077d14" }
204 func (*AbfPluginGetVersion) GetMessageType() api.MessageType {
205         return api.RequestMessage
206 }
207
208 func (m *AbfPluginGetVersion) Size() (size int) {
209         if m == nil {
210                 return 0
211         }
212         return size
213 }
214 func (m *AbfPluginGetVersion) Marshal(b []byte) ([]byte, error) {
215         if b == nil {
216                 b = make([]byte, m.Size())
217         }
218         buf := codec.NewBuffer(b)
219         return buf.Bytes(), nil
220 }
221 func (m *AbfPluginGetVersion) Unmarshal(b []byte) error {
222         return nil
223 }
224
225 // AbfPluginGetVersionReply defines message 'abf_plugin_get_version_reply'.
226 type AbfPluginGetVersionReply struct {
227         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
228         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
229 }
230
231 func (m *AbfPluginGetVersionReply) Reset()               { *m = AbfPluginGetVersionReply{} }
232 func (*AbfPluginGetVersionReply) GetMessageName() string { return "abf_plugin_get_version_reply" }
233 func (*AbfPluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
234 func (*AbfPluginGetVersionReply) GetMessageType() api.MessageType {
235         return api.ReplyMessage
236 }
237
238 func (m *AbfPluginGetVersionReply) Size() (size int) {
239         if m == nil {
240                 return 0
241         }
242         size += 4 // m.Major
243         size += 4 // m.Minor
244         return size
245 }
246 func (m *AbfPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
247         if b == nil {
248                 b = make([]byte, m.Size())
249         }
250         buf := codec.NewBuffer(b)
251         buf.EncodeUint32(m.Major)
252         buf.EncodeUint32(m.Minor)
253         return buf.Bytes(), nil
254 }
255 func (m *AbfPluginGetVersionReply) Unmarshal(b []byte) error {
256         buf := codec.NewBuffer(b)
257         m.Major = buf.DecodeUint32()
258         m.Minor = buf.DecodeUint32()
259         return nil
260 }
261
262 // AbfPolicyAddDel defines message 'abf_policy_add_del'.
263 type AbfPolicyAddDel struct {
264         IsAdd  bool      `binapi:"bool,name=is_add" json:"is_add,omitempty"`
265         Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
266 }
267
268 func (m *AbfPolicyAddDel) Reset()               { *m = AbfPolicyAddDel{} }
269 func (*AbfPolicyAddDel) GetMessageName() string { return "abf_policy_add_del" }
270 func (*AbfPolicyAddDel) GetCrcString() string   { return "ee66f93e" }
271 func (*AbfPolicyAddDel) GetMessageType() api.MessageType {
272         return api.RequestMessage
273 }
274
275 func (m *AbfPolicyAddDel) Size() (size int) {
276         if m == nil {
277                 return 0
278         }
279         size += 1 // m.IsAdd
280         size += 4 // m.Policy.PolicyID
281         size += 4 // m.Policy.ACLIndex
282         size += 1 // m.Policy.NPaths
283         for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
284                 var s2 fib_types.FibPath
285                 _ = s2
286                 if j2 < len(m.Policy.Paths) {
287                         s2 = m.Policy.Paths[j2]
288                 }
289                 size += 4      // s2.SwIfIndex
290                 size += 4      // s2.TableID
291                 size += 4      // s2.RpfID
292                 size += 1      // s2.Weight
293                 size += 1      // s2.Preference
294                 size += 4      // s2.Type
295                 size += 4      // s2.Flags
296                 size += 4      // s2.Proto
297                 size += 1 * 16 // s2.Nh.Address
298                 size += 4      // s2.Nh.ViaLabel
299                 size += 4      // s2.Nh.ObjID
300                 size += 4      // s2.Nh.ClassifyTableIndex
301                 size += 1      // s2.NLabels
302                 for j3 := 0; j3 < 16; j3++ {
303                         size += 1 // s2.LabelStack[j3].IsUniform
304                         size += 4 // s2.LabelStack[j3].Label
305                         size += 1 // s2.LabelStack[j3].TTL
306                         size += 1 // s2.LabelStack[j3].Exp
307                 }
308         }
309         return size
310 }
311 func (m *AbfPolicyAddDel) Marshal(b []byte) ([]byte, error) {
312         if b == nil {
313                 b = make([]byte, m.Size())
314         }
315         buf := codec.NewBuffer(b)
316         buf.EncodeBool(m.IsAdd)
317         buf.EncodeUint32(m.Policy.PolicyID)
318         buf.EncodeUint32(m.Policy.ACLIndex)
319         buf.EncodeUint8(uint8(len(m.Policy.Paths)))
320         for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
321                 var v1 fib_types.FibPath // Paths
322                 if j1 < len(m.Policy.Paths) {
323                         v1 = m.Policy.Paths[j1]
324                 }
325                 buf.EncodeUint32(v1.SwIfIndex)
326                 buf.EncodeUint32(v1.TableID)
327                 buf.EncodeUint32(v1.RpfID)
328                 buf.EncodeUint8(v1.Weight)
329                 buf.EncodeUint8(v1.Preference)
330                 buf.EncodeUint32(uint32(v1.Type))
331                 buf.EncodeUint32(uint32(v1.Flags))
332                 buf.EncodeUint32(uint32(v1.Proto))
333                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
334                 buf.EncodeUint32(v1.Nh.ViaLabel)
335                 buf.EncodeUint32(v1.Nh.ObjID)
336                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
337                 buf.EncodeUint8(v1.NLabels)
338                 for j2 := 0; j2 < 16; j2++ {
339                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
340                         buf.EncodeUint32(v1.LabelStack[j2].Label)
341                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
342                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
343                 }
344         }
345         return buf.Bytes(), nil
346 }
347 func (m *AbfPolicyAddDel) Unmarshal(b []byte) error {
348         buf := codec.NewBuffer(b)
349         m.IsAdd = buf.DecodeBool()
350         m.Policy.PolicyID = buf.DecodeUint32()
351         m.Policy.ACLIndex = buf.DecodeUint32()
352         m.Policy.NPaths = buf.DecodeUint8()
353         m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
354         for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
355                 m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
356                 m.Policy.Paths[j1].TableID = buf.DecodeUint32()
357                 m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
358                 m.Policy.Paths[j1].Weight = buf.DecodeUint8()
359                 m.Policy.Paths[j1].Preference = buf.DecodeUint8()
360                 m.Policy.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
361                 m.Policy.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
362                 m.Policy.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
363                 copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
364                 m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
365                 m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
366                 m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
367                 m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
368                 for j2 := 0; j2 < 16; j2++ {
369                         m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
370                         m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
371                         m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
372                         m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
373                 }
374         }
375         return nil
376 }
377
378 // AbfPolicyAddDelReply defines message 'abf_policy_add_del_reply'.
379 type AbfPolicyAddDelReply struct {
380         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
381 }
382
383 func (m *AbfPolicyAddDelReply) Reset()               { *m = AbfPolicyAddDelReply{} }
384 func (*AbfPolicyAddDelReply) GetMessageName() string { return "abf_policy_add_del_reply" }
385 func (*AbfPolicyAddDelReply) GetCrcString() string   { return "e8d4e804" }
386 func (*AbfPolicyAddDelReply) GetMessageType() api.MessageType {
387         return api.ReplyMessage
388 }
389
390 func (m *AbfPolicyAddDelReply) Size() (size int) {
391         if m == nil {
392                 return 0
393         }
394         size += 4 // m.Retval
395         return size
396 }
397 func (m *AbfPolicyAddDelReply) Marshal(b []byte) ([]byte, error) {
398         if b == nil {
399                 b = make([]byte, m.Size())
400         }
401         buf := codec.NewBuffer(b)
402         buf.EncodeInt32(m.Retval)
403         return buf.Bytes(), nil
404 }
405 func (m *AbfPolicyAddDelReply) Unmarshal(b []byte) error {
406         buf := codec.NewBuffer(b)
407         m.Retval = buf.DecodeInt32()
408         return nil
409 }
410
411 // AbfPolicyDetails defines message 'abf_policy_details'.
412 type AbfPolicyDetails struct {
413         Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
414 }
415
416 func (m *AbfPolicyDetails) Reset()               { *m = AbfPolicyDetails{} }
417 func (*AbfPolicyDetails) GetMessageName() string { return "abf_policy_details" }
418 func (*AbfPolicyDetails) GetCrcString() string   { return "6769e504" }
419 func (*AbfPolicyDetails) GetMessageType() api.MessageType {
420         return api.ReplyMessage
421 }
422
423 func (m *AbfPolicyDetails) Size() (size int) {
424         if m == nil {
425                 return 0
426         }
427         size += 4 // m.Policy.PolicyID
428         size += 4 // m.Policy.ACLIndex
429         size += 1 // m.Policy.NPaths
430         for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
431                 var s2 fib_types.FibPath
432                 _ = s2
433                 if j2 < len(m.Policy.Paths) {
434                         s2 = m.Policy.Paths[j2]
435                 }
436                 size += 4      // s2.SwIfIndex
437                 size += 4      // s2.TableID
438                 size += 4      // s2.RpfID
439                 size += 1      // s2.Weight
440                 size += 1      // s2.Preference
441                 size += 4      // s2.Type
442                 size += 4      // s2.Flags
443                 size += 4      // s2.Proto
444                 size += 1 * 16 // s2.Nh.Address
445                 size += 4      // s2.Nh.ViaLabel
446                 size += 4      // s2.Nh.ObjID
447                 size += 4      // s2.Nh.ClassifyTableIndex
448                 size += 1      // s2.NLabels
449                 for j3 := 0; j3 < 16; j3++ {
450                         size += 1 // s2.LabelStack[j3].IsUniform
451                         size += 4 // s2.LabelStack[j3].Label
452                         size += 1 // s2.LabelStack[j3].TTL
453                         size += 1 // s2.LabelStack[j3].Exp
454                 }
455         }
456         return size
457 }
458 func (m *AbfPolicyDetails) Marshal(b []byte) ([]byte, error) {
459         if b == nil {
460                 b = make([]byte, m.Size())
461         }
462         buf := codec.NewBuffer(b)
463         buf.EncodeUint32(m.Policy.PolicyID)
464         buf.EncodeUint32(m.Policy.ACLIndex)
465         buf.EncodeUint8(uint8(len(m.Policy.Paths)))
466         for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
467                 var v1 fib_types.FibPath // Paths
468                 if j1 < len(m.Policy.Paths) {
469                         v1 = m.Policy.Paths[j1]
470                 }
471                 buf.EncodeUint32(v1.SwIfIndex)
472                 buf.EncodeUint32(v1.TableID)
473                 buf.EncodeUint32(v1.RpfID)
474                 buf.EncodeUint8(v1.Weight)
475                 buf.EncodeUint8(v1.Preference)
476                 buf.EncodeUint32(uint32(v1.Type))
477                 buf.EncodeUint32(uint32(v1.Flags))
478                 buf.EncodeUint32(uint32(v1.Proto))
479                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
480                 buf.EncodeUint32(v1.Nh.ViaLabel)
481                 buf.EncodeUint32(v1.Nh.ObjID)
482                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
483                 buf.EncodeUint8(v1.NLabels)
484                 for j2 := 0; j2 < 16; j2++ {
485                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
486                         buf.EncodeUint32(v1.LabelStack[j2].Label)
487                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
488                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
489                 }
490         }
491         return buf.Bytes(), nil
492 }
493 func (m *AbfPolicyDetails) Unmarshal(b []byte) error {
494         buf := codec.NewBuffer(b)
495         m.Policy.PolicyID = buf.DecodeUint32()
496         m.Policy.ACLIndex = buf.DecodeUint32()
497         m.Policy.NPaths = buf.DecodeUint8()
498         m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
499         for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
500                 m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
501                 m.Policy.Paths[j1].TableID = buf.DecodeUint32()
502                 m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
503                 m.Policy.Paths[j1].Weight = buf.DecodeUint8()
504                 m.Policy.Paths[j1].Preference = buf.DecodeUint8()
505                 m.Policy.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
506                 m.Policy.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
507                 m.Policy.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
508                 copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
509                 m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
510                 m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
511                 m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
512                 m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
513                 for j2 := 0; j2 < 16; j2++ {
514                         m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
515                         m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
516                         m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
517                         m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
518                 }
519         }
520         return nil
521 }
522
523 // AbfPolicyDump defines message 'abf_policy_dump'.
524 type AbfPolicyDump struct{}
525
526 func (m *AbfPolicyDump) Reset()               { *m = AbfPolicyDump{} }
527 func (*AbfPolicyDump) GetMessageName() string { return "abf_policy_dump" }
528 func (*AbfPolicyDump) GetCrcString() string   { return "51077d14" }
529 func (*AbfPolicyDump) GetMessageType() api.MessageType {
530         return api.RequestMessage
531 }
532
533 func (m *AbfPolicyDump) Size() (size int) {
534         if m == nil {
535                 return 0
536         }
537         return size
538 }
539 func (m *AbfPolicyDump) Marshal(b []byte) ([]byte, error) {
540         if b == nil {
541                 b = make([]byte, m.Size())
542         }
543         buf := codec.NewBuffer(b)
544         return buf.Bytes(), nil
545 }
546 func (m *AbfPolicyDump) Unmarshal(b []byte) error {
547         return nil
548 }
549
550 func init() { file_abf_binapi_init() }
551 func file_abf_binapi_init() {
552         api.RegisterMessage((*AbfItfAttachAddDel)(nil), "abf_itf_attach_add_del_25c8621b")
553         api.RegisterMessage((*AbfItfAttachAddDelReply)(nil), "abf_itf_attach_add_del_reply_e8d4e804")
554         api.RegisterMessage((*AbfItfAttachDetails)(nil), "abf_itf_attach_details_7819523e")
555         api.RegisterMessage((*AbfItfAttachDump)(nil), "abf_itf_attach_dump_51077d14")
556         api.RegisterMessage((*AbfPluginGetVersion)(nil), "abf_plugin_get_version_51077d14")
557         api.RegisterMessage((*AbfPluginGetVersionReply)(nil), "abf_plugin_get_version_reply_9b32cf86")
558         api.RegisterMessage((*AbfPolicyAddDel)(nil), "abf_policy_add_del_ee66f93e")
559         api.RegisterMessage((*AbfPolicyAddDelReply)(nil), "abf_policy_add_del_reply_e8d4e804")
560         api.RegisterMessage((*AbfPolicyDetails)(nil), "abf_policy_details_6769e504")
561         api.RegisterMessage((*AbfPolicyDump)(nil), "abf_policy_dump_51077d14")
562 }
563
564 // Messages returns list of all messages in this module.
565 func AllMessages() []api.Message {
566         return []api.Message{
567                 (*AbfItfAttachAddDel)(nil),
568                 (*AbfItfAttachAddDelReply)(nil),
569                 (*AbfItfAttachDetails)(nil),
570                 (*AbfItfAttachDump)(nil),
571                 (*AbfPluginGetVersion)(nil),
572                 (*AbfPluginGetVersionReply)(nil),
573                 (*AbfPolicyAddDel)(nil),
574                 (*AbfPolicyAddDelReply)(nil),
575                 (*AbfPolicyDetails)(nil),
576                 (*AbfPolicyDump)(nil),
577         }
578 }