Introduce Stream - experimental API for low-level access to VPP API
[govpp.git] / examples / binapi / sr / sr.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 // source: /usr/share/vpp/api/core/sr.api.json
6
7 /*
8 Package sr contains generated code for VPP API file sr.api (2.0.0).
9
10 It consists of:
11           6 aliases
12          13 enums
13          20 messages
14           7 types
15           1 union
16 */
17 package sr
18
19 import (
20         "bytes"
21         "context"
22         "encoding/binary"
23         "io"
24         "math"
25         "strconv"
26
27         api "git.fd.io/govpp.git/api"
28         codec "git.fd.io/govpp.git/codec"
29         struc "github.com/lunixbochs/struc"
30
31         interface_types "git.fd.io/govpp.git/examples/binapi/interface_types"
32         ip_types "git.fd.io/govpp.git/examples/binapi/ip_types"
33 )
34
35 // This is a compile-time assertion to ensure that this generated file
36 // is compatible with the GoVPP api package it is being compiled against.
37 // A compilation error at this line likely means your copy of the
38 // GoVPP api package needs to be updated.
39 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
40
41 const (
42         // ModuleName is the name of this module.
43         ModuleName = "sr"
44         // APIVersion is the API version of this module.
45         APIVersion = "2.0.0"
46         // VersionCrc is the CRC of this module.
47         VersionCrc = 0xd85c77ca
48 )
49
50 type AddressFamily = ip_types.AddressFamily
51
52 type IfStatusFlags = interface_types.IfStatusFlags
53
54 type IfType = interface_types.IfType
55
56 type IPDscp = ip_types.IPDscp
57
58 type IPEcn = ip_types.IPEcn
59
60 type IPProto = ip_types.IPProto
61
62 type LinkDuplex = interface_types.LinkDuplex
63
64 type MtuProto = interface_types.MtuProto
65
66 type RxMode = interface_types.RxMode
67
68 // SrBehavior represents VPP binary API enum 'sr_behavior'.
69 type SrBehavior uint8
70
71 const (
72         SR_BEHAVIOR_API_END     SrBehavior = 1
73         SR_BEHAVIOR_API_X       SrBehavior = 2
74         SR_BEHAVIOR_API_T       SrBehavior = 3
75         SR_BEHAVIOR_API_D_FIRST SrBehavior = 4
76         SR_BEHAVIOR_API_DX2     SrBehavior = 5
77         SR_BEHAVIOR_API_DX6     SrBehavior = 6
78         SR_BEHAVIOR_API_DX4     SrBehavior = 7
79         SR_BEHAVIOR_API_DT6     SrBehavior = 8
80         SR_BEHAVIOR_API_DT4     SrBehavior = 9
81         SR_BEHAVIOR_API_LAST    SrBehavior = 10
82 )
83
84 var (
85         SrBehavior_name = map[uint8]string{
86                 1:  "SR_BEHAVIOR_API_END",
87                 2:  "SR_BEHAVIOR_API_X",
88                 3:  "SR_BEHAVIOR_API_T",
89                 4:  "SR_BEHAVIOR_API_D_FIRST",
90                 5:  "SR_BEHAVIOR_API_DX2",
91                 6:  "SR_BEHAVIOR_API_DX6",
92                 7:  "SR_BEHAVIOR_API_DX4",
93                 8:  "SR_BEHAVIOR_API_DT6",
94                 9:  "SR_BEHAVIOR_API_DT4",
95                 10: "SR_BEHAVIOR_API_LAST",
96         }
97         SrBehavior_value = map[string]uint8{
98                 "SR_BEHAVIOR_API_END":     1,
99                 "SR_BEHAVIOR_API_X":       2,
100                 "SR_BEHAVIOR_API_T":       3,
101                 "SR_BEHAVIOR_API_D_FIRST": 4,
102                 "SR_BEHAVIOR_API_DX2":     5,
103                 "SR_BEHAVIOR_API_DX6":     6,
104                 "SR_BEHAVIOR_API_DX4":     7,
105                 "SR_BEHAVIOR_API_DT6":     8,
106                 "SR_BEHAVIOR_API_DT4":     9,
107                 "SR_BEHAVIOR_API_LAST":    10,
108         }
109 )
110
111 func (x SrBehavior) String() string {
112         s, ok := SrBehavior_name[uint8(x)]
113         if ok {
114                 return s
115         }
116         return "SrBehavior(" + strconv.Itoa(int(x)) + ")"
117 }
118
119 // SrPolicyOp represents VPP binary API enum 'sr_policy_op'.
120 type SrPolicyOp uint8
121
122 const (
123         SR_POLICY_OP_API_NONE SrPolicyOp = 0
124         SR_POLICY_OP_API_ADD  SrPolicyOp = 1
125         SR_POLICY_OP_API_DEL  SrPolicyOp = 2
126         SR_POLICY_OP_API_MOD  SrPolicyOp = 3
127 )
128
129 var (
130         SrPolicyOp_name = map[uint8]string{
131                 0: "SR_POLICY_OP_API_NONE",
132                 1: "SR_POLICY_OP_API_ADD",
133                 2: "SR_POLICY_OP_API_DEL",
134                 3: "SR_POLICY_OP_API_MOD",
135         }
136         SrPolicyOp_value = map[string]uint8{
137                 "SR_POLICY_OP_API_NONE": 0,
138                 "SR_POLICY_OP_API_ADD":  1,
139                 "SR_POLICY_OP_API_DEL":  2,
140                 "SR_POLICY_OP_API_MOD":  3,
141         }
142 )
143
144 func (x SrPolicyOp) String() string {
145         s, ok := SrPolicyOp_name[uint8(x)]
146         if ok {
147                 return s
148         }
149         return "SrPolicyOp(" + strconv.Itoa(int(x)) + ")"
150 }
151
152 // SrSteer represents VPP binary API enum 'sr_steer'.
153 type SrSteer uint8
154
155 const (
156         SR_STEER_API_L2   SrSteer = 2
157         SR_STEER_API_IPV4 SrSteer = 4
158         SR_STEER_API_IPV6 SrSteer = 6
159 )
160
161 var (
162         SrSteer_name = map[uint8]string{
163                 2: "SR_STEER_API_L2",
164                 4: "SR_STEER_API_IPV4",
165                 6: "SR_STEER_API_IPV6",
166         }
167         SrSteer_value = map[string]uint8{
168                 "SR_STEER_API_L2":   2,
169                 "SR_STEER_API_IPV4": 4,
170                 "SR_STEER_API_IPV6": 6,
171         }
172 )
173
174 func (x SrSteer) String() string {
175         s, ok := SrSteer_name[uint8(x)]
176         if ok {
177                 return s
178         }
179         return "SrSteer(" + strconv.Itoa(int(x)) + ")"
180 }
181
182 type SubIfFlags = interface_types.SubIfFlags
183
184 type AddressWithPrefix = ip_types.AddressWithPrefix
185
186 type InterfaceIndex = interface_types.InterfaceIndex
187
188 type IP4Address = ip_types.IP4Address
189
190 type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix
191
192 type IP6Address = ip_types.IP6Address
193
194 type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix
195
196 type Address = ip_types.Address
197
198 type IP4Prefix = ip_types.IP4Prefix
199
200 type IP6Prefix = ip_types.IP6Prefix
201
202 type Mprefix = ip_types.Mprefix
203
204 type Prefix = ip_types.Prefix
205
206 type PrefixMatcher = ip_types.PrefixMatcher
207
208 // Srv6SidList represents VPP binary API type 'srv6_sid_list'.
209 type Srv6SidList struct {
210         NumSids uint8          `binapi:"u8,name=num_sids" json:"num_sids,omitempty"`
211         Weight  uint32         `binapi:"u32,name=weight" json:"weight,omitempty"`
212         Sids    [16]IP6Address `binapi:"ip6_address[16],name=sids" json:"sids,omitempty" struc:"[16]IP6Address"`
213 }
214
215 func (*Srv6SidList) GetTypeName() string { return "srv6_sid_list" }
216
217 type AddressUnion = ip_types.AddressUnion
218
219 // SrLocalsidAddDel represents VPP binary API message 'sr_localsid_add_del'.
220 type SrLocalsidAddDel struct {
221         IsDel     bool           `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"`
222         Localsid  IP6Address     `binapi:"ip6_address,name=localsid" json:"localsid,omitempty"`
223         EndPsp    bool           `binapi:"bool,name=end_psp" json:"end_psp,omitempty"`
224         Behavior  SrBehavior     `binapi:"sr_behavior,name=behavior" json:"behavior,omitempty"`
225         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
226         VlanIndex uint32         `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
227         FibTable  uint32         `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
228         NhAddr    Address        `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"`
229 }
230
231 func (m *SrLocalsidAddDel) Reset()                        { *m = SrLocalsidAddDel{} }
232 func (*SrLocalsidAddDel) GetMessageName() string          { return "sr_localsid_add_del" }
233 func (*SrLocalsidAddDel) GetCrcString() string            { return "26fa3309" }
234 func (*SrLocalsidAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
235
236 func (m *SrLocalsidAddDel) Size() int {
237         if m == nil {
238                 return 0
239         }
240         var size int
241         // field[1] m.IsDel
242         size += 1
243         // field[1] m.Localsid
244         size += 16
245         // field[1] m.EndPsp
246         size += 1
247         // field[1] m.Behavior
248         size += 1
249         // field[1] m.SwIfIndex
250         size += 4
251         // field[1] m.VlanIndex
252         size += 4
253         // field[1] m.FibTable
254         size += 4
255         // field[1] m.NhAddr
256         // field[2] m.NhAddr.Af
257         size += 1
258         // field[2] m.NhAddr.Un
259         size += 16
260         return size
261 }
262 func (m *SrLocalsidAddDel) Marshal(b []byte) ([]byte, error) {
263         o := binary.BigEndian
264         _ = o
265         pos := 0
266         _ = pos
267         var buf []byte
268         if b == nil {
269                 buf = make([]byte, m.Size())
270         } else {
271                 buf = b
272         }
273         // field[1] m.IsDel
274         if m.IsDel {
275                 buf[pos] = 1
276         }
277         pos += 1
278         // field[1] m.Localsid
279         for i := 0; i < 16; i++ {
280                 var x uint8
281                 if i < len(m.Localsid) {
282                         x = uint8(m.Localsid[i])
283                 }
284                 buf[pos] = uint8(x)
285                 pos += 1
286         }
287         // field[1] m.EndPsp
288         if m.EndPsp {
289                 buf[pos] = 1
290         }
291         pos += 1
292         // field[1] m.Behavior
293         buf[pos] = uint8(m.Behavior)
294         pos += 1
295         // field[1] m.SwIfIndex
296         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
297         pos += 4
298         // field[1] m.VlanIndex
299         o.PutUint32(buf[pos:pos+4], uint32(m.VlanIndex))
300         pos += 4
301         // field[1] m.FibTable
302         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
303         pos += 4
304         // field[1] m.NhAddr
305         // field[2] m.NhAddr.Af
306         buf[pos] = uint8(m.NhAddr.Af)
307         pos += 1
308         // field[2] m.NhAddr.Un
309         copy(buf[pos:pos+16], m.NhAddr.Un.XXX_UnionData[:])
310         pos += 16
311         return buf, nil
312 }
313 func (m *SrLocalsidAddDel) Unmarshal(tmp []byte) error {
314         o := binary.BigEndian
315         _ = o
316         pos := 0
317         _ = pos
318         // field[1] m.IsDel
319         m.IsDel = tmp[pos] != 0
320         pos += 1
321         // field[1] m.Localsid
322         for i := 0; i < len(m.Localsid); i++ {
323                 m.Localsid[i] = uint8(tmp[pos])
324                 pos += 1
325         }
326         // field[1] m.EndPsp
327         m.EndPsp = tmp[pos] != 0
328         pos += 1
329         // field[1] m.Behavior
330         m.Behavior = SrBehavior(tmp[pos])
331         pos += 1
332         // field[1] m.SwIfIndex
333         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
334         pos += 4
335         // field[1] m.VlanIndex
336         m.VlanIndex = uint32(o.Uint32(tmp[pos : pos+4]))
337         pos += 4
338         // field[1] m.FibTable
339         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
340         pos += 4
341         // field[1] m.NhAddr
342         // field[2] m.NhAddr.Af
343         m.NhAddr.Af = AddressFamily(tmp[pos])
344         pos += 1
345         // field[2] m.NhAddr.Un
346         copy(m.NhAddr.Un.XXX_UnionData[:], tmp[pos:pos+16])
347         pos += 16
348         return nil
349 }
350
351 // SrLocalsidAddDelReply represents VPP binary API message 'sr_localsid_add_del_reply'.
352 type SrLocalsidAddDelReply struct {
353         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
354 }
355
356 func (m *SrLocalsidAddDelReply) Reset()                        { *m = SrLocalsidAddDelReply{} }
357 func (*SrLocalsidAddDelReply) GetMessageName() string          { return "sr_localsid_add_del_reply" }
358 func (*SrLocalsidAddDelReply) GetCrcString() string            { return "e8d4e804" }
359 func (*SrLocalsidAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
360
361 func (m *SrLocalsidAddDelReply) Size() int {
362         if m == nil {
363                 return 0
364         }
365         var size int
366         // field[1] m.Retval
367         size += 4
368         return size
369 }
370 func (m *SrLocalsidAddDelReply) Marshal(b []byte) ([]byte, error) {
371         o := binary.BigEndian
372         _ = o
373         pos := 0
374         _ = pos
375         var buf []byte
376         if b == nil {
377                 buf = make([]byte, m.Size())
378         } else {
379                 buf = b
380         }
381         // field[1] m.Retval
382         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
383         pos += 4
384         return buf, nil
385 }
386 func (m *SrLocalsidAddDelReply) Unmarshal(tmp []byte) error {
387         o := binary.BigEndian
388         _ = o
389         pos := 0
390         _ = pos
391         // field[1] m.Retval
392         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
393         pos += 4
394         return nil
395 }
396
397 // SrLocalsidsDetails represents VPP binary API message 'sr_localsids_details'.
398 type SrLocalsidsDetails struct {
399         Addr                    IP6Address `binapi:"ip6_address,name=addr" json:"addr,omitempty"`
400         EndPsp                  bool       `binapi:"bool,name=end_psp" json:"end_psp,omitempty"`
401         Behavior                SrBehavior `binapi:"sr_behavior,name=behavior" json:"behavior,omitempty"`
402         FibTable                uint32     `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
403         VlanIndex               uint32     `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
404         XconnectNhAddr          Address    `binapi:"address,name=xconnect_nh_addr" json:"xconnect_nh_addr,omitempty"`
405         XconnectIfaceOrVrfTable uint32     `binapi:"u32,name=xconnect_iface_or_vrf_table" json:"xconnect_iface_or_vrf_table,omitempty"`
406 }
407
408 func (m *SrLocalsidsDetails) Reset()                        { *m = SrLocalsidsDetails{} }
409 func (*SrLocalsidsDetails) GetMessageName() string          { return "sr_localsids_details" }
410 func (*SrLocalsidsDetails) GetCrcString() string            { return "6a6c0265" }
411 func (*SrLocalsidsDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
412
413 func (m *SrLocalsidsDetails) Size() int {
414         if m == nil {
415                 return 0
416         }
417         var size int
418         // field[1] m.Addr
419         size += 16
420         // field[1] m.EndPsp
421         size += 1
422         // field[1] m.Behavior
423         size += 1
424         // field[1] m.FibTable
425         size += 4
426         // field[1] m.VlanIndex
427         size += 4
428         // field[1] m.XconnectNhAddr
429         // field[2] m.XconnectNhAddr.Af
430         size += 1
431         // field[2] m.XconnectNhAddr.Un
432         size += 16
433         // field[1] m.XconnectIfaceOrVrfTable
434         size += 4
435         return size
436 }
437 func (m *SrLocalsidsDetails) Marshal(b []byte) ([]byte, error) {
438         o := binary.BigEndian
439         _ = o
440         pos := 0
441         _ = pos
442         var buf []byte
443         if b == nil {
444                 buf = make([]byte, m.Size())
445         } else {
446                 buf = b
447         }
448         // field[1] m.Addr
449         for i := 0; i < 16; i++ {
450                 var x uint8
451                 if i < len(m.Addr) {
452                         x = uint8(m.Addr[i])
453                 }
454                 buf[pos] = uint8(x)
455                 pos += 1
456         }
457         // field[1] m.EndPsp
458         if m.EndPsp {
459                 buf[pos] = 1
460         }
461         pos += 1
462         // field[1] m.Behavior
463         buf[pos] = uint8(m.Behavior)
464         pos += 1
465         // field[1] m.FibTable
466         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
467         pos += 4
468         // field[1] m.VlanIndex
469         o.PutUint32(buf[pos:pos+4], uint32(m.VlanIndex))
470         pos += 4
471         // field[1] m.XconnectNhAddr
472         // field[2] m.XconnectNhAddr.Af
473         buf[pos] = uint8(m.XconnectNhAddr.Af)
474         pos += 1
475         // field[2] m.XconnectNhAddr.Un
476         copy(buf[pos:pos+16], m.XconnectNhAddr.Un.XXX_UnionData[:])
477         pos += 16
478         // field[1] m.XconnectIfaceOrVrfTable
479         o.PutUint32(buf[pos:pos+4], uint32(m.XconnectIfaceOrVrfTable))
480         pos += 4
481         return buf, nil
482 }
483 func (m *SrLocalsidsDetails) Unmarshal(tmp []byte) error {
484         o := binary.BigEndian
485         _ = o
486         pos := 0
487         _ = pos
488         // field[1] m.Addr
489         for i := 0; i < len(m.Addr); i++ {
490                 m.Addr[i] = uint8(tmp[pos])
491                 pos += 1
492         }
493         // field[1] m.EndPsp
494         m.EndPsp = tmp[pos] != 0
495         pos += 1
496         // field[1] m.Behavior
497         m.Behavior = SrBehavior(tmp[pos])
498         pos += 1
499         // field[1] m.FibTable
500         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
501         pos += 4
502         // field[1] m.VlanIndex
503         m.VlanIndex = uint32(o.Uint32(tmp[pos : pos+4]))
504         pos += 4
505         // field[1] m.XconnectNhAddr
506         // field[2] m.XconnectNhAddr.Af
507         m.XconnectNhAddr.Af = AddressFamily(tmp[pos])
508         pos += 1
509         // field[2] m.XconnectNhAddr.Un
510         copy(m.XconnectNhAddr.Un.XXX_UnionData[:], tmp[pos:pos+16])
511         pos += 16
512         // field[1] m.XconnectIfaceOrVrfTable
513         m.XconnectIfaceOrVrfTable = uint32(o.Uint32(tmp[pos : pos+4]))
514         pos += 4
515         return nil
516 }
517
518 // SrLocalsidsDump represents VPP binary API message 'sr_localsids_dump'.
519 type SrLocalsidsDump struct{}
520
521 func (m *SrLocalsidsDump) Reset()                        { *m = SrLocalsidsDump{} }
522 func (*SrLocalsidsDump) GetMessageName() string          { return "sr_localsids_dump" }
523 func (*SrLocalsidsDump) GetCrcString() string            { return "51077d14" }
524 func (*SrLocalsidsDump) GetMessageType() api.MessageType { return api.RequestMessage }
525
526 func (m *SrLocalsidsDump) Size() int {
527         if m == nil {
528                 return 0
529         }
530         var size int
531         return size
532 }
533 func (m *SrLocalsidsDump) Marshal(b []byte) ([]byte, error) {
534         o := binary.BigEndian
535         _ = o
536         pos := 0
537         _ = pos
538         var buf []byte
539         if b == nil {
540                 buf = make([]byte, m.Size())
541         } else {
542                 buf = b
543         }
544         return buf, nil
545 }
546 func (m *SrLocalsidsDump) Unmarshal(tmp []byte) error {
547         o := binary.BigEndian
548         _ = o
549         pos := 0
550         _ = pos
551         return nil
552 }
553
554 // SrPoliciesDetails represents VPP binary API message 'sr_policies_details'.
555 type SrPoliciesDetails struct {
556         Bsid        IP6Address    `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
557         IsSpray     bool          `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
558         IsEncap     bool          `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
559         FibTable    uint32        `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
560         NumSidLists uint8         `binapi:"u8,name=num_sid_lists" json:"num_sid_lists,omitempty" struc:"sizeof=SidLists"`
561         SidLists    []Srv6SidList `binapi:"srv6_sid_list[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
562 }
563
564 func (m *SrPoliciesDetails) Reset()                        { *m = SrPoliciesDetails{} }
565 func (*SrPoliciesDetails) GetMessageName() string          { return "sr_policies_details" }
566 func (*SrPoliciesDetails) GetCrcString() string            { return "07ec2d93" }
567 func (*SrPoliciesDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
568
569 func (m *SrPoliciesDetails) Size() int {
570         if m == nil {
571                 return 0
572         }
573         var size int
574         // field[1] m.Bsid
575         size += 16
576         // field[1] m.IsSpray
577         size += 1
578         // field[1] m.IsEncap
579         size += 1
580         // field[1] m.FibTable
581         size += 4
582         // field[1] m.NumSidLists
583         size += 1
584         // field[1] m.SidLists
585         for j1 := 0; j1 < len(m.SidLists); j1++ {
586                 var s1 Srv6SidList
587                 _ = s1
588                 if j1 < len(m.SidLists) {
589                         s1 = m.SidLists[j1]
590                 }
591                 // field[2] s1.NumSids
592                 size += 1
593                 // field[2] s1.Weight
594                 size += 4
595                 // field[2] s1.Sids
596                 for j2 := 0; j2 < 16; j2++ {
597                         var s2 IP6Address
598                         _ = s2
599                         if j2 < len(s1.Sids) {
600                                 s2 = s1.Sids[j2]
601                         }
602                         size += 16
603                 }
604         }
605         return size
606 }
607 func (m *SrPoliciesDetails) Marshal(b []byte) ([]byte, error) {
608         o := binary.BigEndian
609         _ = o
610         pos := 0
611         _ = pos
612         var buf []byte
613         if b == nil {
614                 buf = make([]byte, m.Size())
615         } else {
616                 buf = b
617         }
618         // field[1] m.Bsid
619         for i := 0; i < 16; i++ {
620                 var x uint8
621                 if i < len(m.Bsid) {
622                         x = uint8(m.Bsid[i])
623                 }
624                 buf[pos] = uint8(x)
625                 pos += 1
626         }
627         // field[1] m.IsSpray
628         if m.IsSpray {
629                 buf[pos] = 1
630         }
631         pos += 1
632         // field[1] m.IsEncap
633         if m.IsEncap {
634                 buf[pos] = 1
635         }
636         pos += 1
637         // field[1] m.FibTable
638         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
639         pos += 4
640         // field[1] m.NumSidLists
641         buf[pos] = uint8(len(m.SidLists))
642         pos += 1
643         // field[1] m.SidLists
644         for j1 := 0; j1 < len(m.SidLists); j1++ {
645                 var v1 Srv6SidList
646                 if j1 < len(m.SidLists) {
647                         v1 = m.SidLists[j1]
648                 }
649                 // field[2] v1.NumSids
650                 buf[pos] = uint8(v1.NumSids)
651                 pos += 1
652                 // field[2] v1.Weight
653                 o.PutUint32(buf[pos:pos+4], uint32(v1.Weight))
654                 pos += 4
655                 // field[2] v1.Sids
656                 for j2 := 0; j2 < 16; j2++ {
657                         var v2 IP6Address
658                         if j2 < len(v1.Sids) {
659                                 v2 = v1.Sids[j2]
660                         }
661                         for i := 0; i < 16; i++ {
662                                 var x uint8
663                                 if i < len(v2) {
664                                         x = uint8(v2[i])
665                                 }
666                                 buf[pos] = uint8(x)
667                                 pos += 1
668                         }
669                 }
670         }
671         return buf, nil
672 }
673 func (m *SrPoliciesDetails) Unmarshal(tmp []byte) error {
674         o := binary.BigEndian
675         _ = o
676         pos := 0
677         _ = pos
678         // field[1] m.Bsid
679         for i := 0; i < len(m.Bsid); i++ {
680                 m.Bsid[i] = uint8(tmp[pos])
681                 pos += 1
682         }
683         // field[1] m.IsSpray
684         m.IsSpray = tmp[pos] != 0
685         pos += 1
686         // field[1] m.IsEncap
687         m.IsEncap = tmp[pos] != 0
688         pos += 1
689         // field[1] m.FibTable
690         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
691         pos += 4
692         // field[1] m.NumSidLists
693         m.NumSidLists = uint8(tmp[pos])
694         pos += 1
695         // field[1] m.SidLists
696         m.SidLists = make([]Srv6SidList, int(m.NumSidLists))
697         for j1 := 0; j1 < int(m.NumSidLists); j1++ {
698                 // field[2] m.SidLists[j1].NumSids
699                 m.SidLists[j1].NumSids = uint8(tmp[pos])
700                 pos += 1
701                 // field[2] m.SidLists[j1].Weight
702                 m.SidLists[j1].Weight = uint32(o.Uint32(tmp[pos : pos+4]))
703                 pos += 4
704                 // field[2] m.SidLists[j1].Sids
705                 for j2 := 0; j2 < 16; j2++ {
706                         for i := 0; i < len(m.SidLists[j1].Sids[j2]); i++ {
707                                 m.SidLists[j1].Sids[j2][i] = uint8(tmp[pos])
708                                 pos += 1
709                         }
710                 }
711         }
712         return nil
713 }
714
715 // SrPoliciesDump represents VPP binary API message 'sr_policies_dump'.
716 type SrPoliciesDump struct{}
717
718 func (m *SrPoliciesDump) Reset()                        { *m = SrPoliciesDump{} }
719 func (*SrPoliciesDump) GetMessageName() string          { return "sr_policies_dump" }
720 func (*SrPoliciesDump) GetCrcString() string            { return "51077d14" }
721 func (*SrPoliciesDump) GetMessageType() api.MessageType { return api.RequestMessage }
722
723 func (m *SrPoliciesDump) Size() int {
724         if m == nil {
725                 return 0
726         }
727         var size int
728         return size
729 }
730 func (m *SrPoliciesDump) Marshal(b []byte) ([]byte, error) {
731         o := binary.BigEndian
732         _ = o
733         pos := 0
734         _ = pos
735         var buf []byte
736         if b == nil {
737                 buf = make([]byte, m.Size())
738         } else {
739                 buf = b
740         }
741         return buf, nil
742 }
743 func (m *SrPoliciesDump) Unmarshal(tmp []byte) error {
744         o := binary.BigEndian
745         _ = o
746         pos := 0
747         _ = pos
748         return nil
749 }
750
751 // SrPolicyAdd represents VPP binary API message 'sr_policy_add'.
752 type SrPolicyAdd struct {
753         BsidAddr IP6Address  `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
754         Weight   uint32      `binapi:"u32,name=weight" json:"weight,omitempty"`
755         IsEncap  bool        `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
756         IsSpray  bool        `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
757         FibTable uint32      `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
758         Sids     Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
759 }
760
761 func (m *SrPolicyAdd) Reset()                        { *m = SrPolicyAdd{} }
762 func (*SrPolicyAdd) GetMessageName() string          { return "sr_policy_add" }
763 func (*SrPolicyAdd) GetCrcString() string            { return "ec79ee6a" }
764 func (*SrPolicyAdd) GetMessageType() api.MessageType { return api.RequestMessage }
765
766 func (m *SrPolicyAdd) Size() int {
767         if m == nil {
768                 return 0
769         }
770         var size int
771         // field[1] m.BsidAddr
772         size += 16
773         // field[1] m.Weight
774         size += 4
775         // field[1] m.IsEncap
776         size += 1
777         // field[1] m.IsSpray
778         size += 1
779         // field[1] m.FibTable
780         size += 4
781         // field[1] m.Sids
782         // field[2] m.Sids.NumSids
783         size += 1
784         // field[2] m.Sids.Weight
785         size += 4
786         // field[2] m.Sids.Sids
787         for j2 := 0; j2 < 16; j2++ {
788                 var s2 IP6Address
789                 _ = s2
790                 if j2 < len(m.Sids.Sids) {
791                         s2 = m.Sids.Sids[j2]
792                 }
793                 size += 16
794         }
795         return size
796 }
797 func (m *SrPolicyAdd) Marshal(b []byte) ([]byte, error) {
798         o := binary.BigEndian
799         _ = o
800         pos := 0
801         _ = pos
802         var buf []byte
803         if b == nil {
804                 buf = make([]byte, m.Size())
805         } else {
806                 buf = b
807         }
808         // field[1] m.BsidAddr
809         for i := 0; i < 16; i++ {
810                 var x uint8
811                 if i < len(m.BsidAddr) {
812                         x = uint8(m.BsidAddr[i])
813                 }
814                 buf[pos] = uint8(x)
815                 pos += 1
816         }
817         // field[1] m.Weight
818         o.PutUint32(buf[pos:pos+4], uint32(m.Weight))
819         pos += 4
820         // field[1] m.IsEncap
821         if m.IsEncap {
822                 buf[pos] = 1
823         }
824         pos += 1
825         // field[1] m.IsSpray
826         if m.IsSpray {
827                 buf[pos] = 1
828         }
829         pos += 1
830         // field[1] m.FibTable
831         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
832         pos += 4
833         // field[1] m.Sids
834         // field[2] m.Sids.NumSids
835         buf[pos] = uint8(m.Sids.NumSids)
836         pos += 1
837         // field[2] m.Sids.Weight
838         o.PutUint32(buf[pos:pos+4], uint32(m.Sids.Weight))
839         pos += 4
840         // field[2] m.Sids.Sids
841         for j2 := 0; j2 < 16; j2++ {
842                 var v2 IP6Address
843                 if j2 < len(m.Sids.Sids) {
844                         v2 = m.Sids.Sids[j2]
845                 }
846                 for i := 0; i < 16; i++ {
847                         var x uint8
848                         if i < len(v2) {
849                                 x = uint8(v2[i])
850                         }
851                         buf[pos] = uint8(x)
852                         pos += 1
853                 }
854         }
855         return buf, nil
856 }
857 func (m *SrPolicyAdd) Unmarshal(tmp []byte) error {
858         o := binary.BigEndian
859         _ = o
860         pos := 0
861         _ = pos
862         // field[1] m.BsidAddr
863         for i := 0; i < len(m.BsidAddr); i++ {
864                 m.BsidAddr[i] = uint8(tmp[pos])
865                 pos += 1
866         }
867         // field[1] m.Weight
868         m.Weight = uint32(o.Uint32(tmp[pos : pos+4]))
869         pos += 4
870         // field[1] m.IsEncap
871         m.IsEncap = tmp[pos] != 0
872         pos += 1
873         // field[1] m.IsSpray
874         m.IsSpray = tmp[pos] != 0
875         pos += 1
876         // field[1] m.FibTable
877         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
878         pos += 4
879         // field[1] m.Sids
880         // field[2] m.Sids.NumSids
881         m.Sids.NumSids = uint8(tmp[pos])
882         pos += 1
883         // field[2] m.Sids.Weight
884         m.Sids.Weight = uint32(o.Uint32(tmp[pos : pos+4]))
885         pos += 4
886         // field[2] m.Sids.Sids
887         for j2 := 0; j2 < 16; j2++ {
888                 for i := 0; i < len(m.Sids.Sids[j2]); i++ {
889                         m.Sids.Sids[j2][i] = uint8(tmp[pos])
890                         pos += 1
891                 }
892         }
893         return nil
894 }
895
896 // SrPolicyAddReply represents VPP binary API message 'sr_policy_add_reply'.
897 type SrPolicyAddReply struct {
898         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
899 }
900
901 func (m *SrPolicyAddReply) Reset()                        { *m = SrPolicyAddReply{} }
902 func (*SrPolicyAddReply) GetMessageName() string          { return "sr_policy_add_reply" }
903 func (*SrPolicyAddReply) GetCrcString() string            { return "e8d4e804" }
904 func (*SrPolicyAddReply) GetMessageType() api.MessageType { return api.ReplyMessage }
905
906 func (m *SrPolicyAddReply) Size() int {
907         if m == nil {
908                 return 0
909         }
910         var size int
911         // field[1] m.Retval
912         size += 4
913         return size
914 }
915 func (m *SrPolicyAddReply) Marshal(b []byte) ([]byte, error) {
916         o := binary.BigEndian
917         _ = o
918         pos := 0
919         _ = pos
920         var buf []byte
921         if b == nil {
922                 buf = make([]byte, m.Size())
923         } else {
924                 buf = b
925         }
926         // field[1] m.Retval
927         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
928         pos += 4
929         return buf, nil
930 }
931 func (m *SrPolicyAddReply) Unmarshal(tmp []byte) error {
932         o := binary.BigEndian
933         _ = o
934         pos := 0
935         _ = pos
936         // field[1] m.Retval
937         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
938         pos += 4
939         return nil
940 }
941
942 // SrPolicyDel represents VPP binary API message 'sr_policy_del'.
943 type SrPolicyDel struct {
944         BsidAddr      IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
945         SrPolicyIndex uint32     `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
946 }
947
948 func (m *SrPolicyDel) Reset()                        { *m = SrPolicyDel{} }
949 func (*SrPolicyDel) GetMessageName() string          { return "sr_policy_del" }
950 func (*SrPolicyDel) GetCrcString() string            { return "cb4d48d5" }
951 func (*SrPolicyDel) GetMessageType() api.MessageType { return api.RequestMessage }
952
953 func (m *SrPolicyDel) Size() int {
954         if m == nil {
955                 return 0
956         }
957         var size int
958         // field[1] m.BsidAddr
959         size += 16
960         // field[1] m.SrPolicyIndex
961         size += 4
962         return size
963 }
964 func (m *SrPolicyDel) Marshal(b []byte) ([]byte, error) {
965         o := binary.BigEndian
966         _ = o
967         pos := 0
968         _ = pos
969         var buf []byte
970         if b == nil {
971                 buf = make([]byte, m.Size())
972         } else {
973                 buf = b
974         }
975         // field[1] m.BsidAddr
976         for i := 0; i < 16; i++ {
977                 var x uint8
978                 if i < len(m.BsidAddr) {
979                         x = uint8(m.BsidAddr[i])
980                 }
981                 buf[pos] = uint8(x)
982                 pos += 1
983         }
984         // field[1] m.SrPolicyIndex
985         o.PutUint32(buf[pos:pos+4], uint32(m.SrPolicyIndex))
986         pos += 4
987         return buf, nil
988 }
989 func (m *SrPolicyDel) Unmarshal(tmp []byte) error {
990         o := binary.BigEndian
991         _ = o
992         pos := 0
993         _ = pos
994         // field[1] m.BsidAddr
995         for i := 0; i < len(m.BsidAddr); i++ {
996                 m.BsidAddr[i] = uint8(tmp[pos])
997                 pos += 1
998         }
999         // field[1] m.SrPolicyIndex
1000         m.SrPolicyIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1001         pos += 4
1002         return nil
1003 }
1004
1005 // SrPolicyDelReply represents VPP binary API message 'sr_policy_del_reply'.
1006 type SrPolicyDelReply struct {
1007         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1008 }
1009
1010 func (m *SrPolicyDelReply) Reset()                        { *m = SrPolicyDelReply{} }
1011 func (*SrPolicyDelReply) GetMessageName() string          { return "sr_policy_del_reply" }
1012 func (*SrPolicyDelReply) GetCrcString() string            { return "e8d4e804" }
1013 func (*SrPolicyDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1014
1015 func (m *SrPolicyDelReply) Size() int {
1016         if m == nil {
1017                 return 0
1018         }
1019         var size int
1020         // field[1] m.Retval
1021         size += 4
1022         return size
1023 }
1024 func (m *SrPolicyDelReply) Marshal(b []byte) ([]byte, error) {
1025         o := binary.BigEndian
1026         _ = o
1027         pos := 0
1028         _ = pos
1029         var buf []byte
1030         if b == nil {
1031                 buf = make([]byte, m.Size())
1032         } else {
1033                 buf = b
1034         }
1035         // field[1] m.Retval
1036         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1037         pos += 4
1038         return buf, nil
1039 }
1040 func (m *SrPolicyDelReply) Unmarshal(tmp []byte) error {
1041         o := binary.BigEndian
1042         _ = o
1043         pos := 0
1044         _ = pos
1045         // field[1] m.Retval
1046         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1047         pos += 4
1048         return nil
1049 }
1050
1051 // SrPolicyMod represents VPP binary API message 'sr_policy_mod'.
1052 type SrPolicyMod struct {
1053         BsidAddr      IP6Address  `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
1054         SrPolicyIndex uint32      `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
1055         FibTable      uint32      `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
1056         Operation     SrPolicyOp  `binapi:"sr_policy_op,name=operation" json:"operation,omitempty"`
1057         SlIndex       uint32      `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
1058         Weight        uint32      `binapi:"u32,name=weight" json:"weight,omitempty"`
1059         Sids          Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
1060 }
1061
1062 func (m *SrPolicyMod) Reset()                        { *m = SrPolicyMod{} }
1063 func (*SrPolicyMod) GetMessageName() string          { return "sr_policy_mod" }
1064 func (*SrPolicyMod) GetCrcString() string            { return "e531a102" }
1065 func (*SrPolicyMod) GetMessageType() api.MessageType { return api.RequestMessage }
1066
1067 func (m *SrPolicyMod) Size() int {
1068         if m == nil {
1069                 return 0
1070         }
1071         var size int
1072         // field[1] m.BsidAddr
1073         size += 16
1074         // field[1] m.SrPolicyIndex
1075         size += 4
1076         // field[1] m.FibTable
1077         size += 4
1078         // field[1] m.Operation
1079         size += 1
1080         // field[1] m.SlIndex
1081         size += 4
1082         // field[1] m.Weight
1083         size += 4
1084         // field[1] m.Sids
1085         // field[2] m.Sids.NumSids
1086         size += 1
1087         // field[2] m.Sids.Weight
1088         size += 4
1089         // field[2] m.Sids.Sids
1090         for j2 := 0; j2 < 16; j2++ {
1091                 var s2 IP6Address
1092                 _ = s2
1093                 if j2 < len(m.Sids.Sids) {
1094                         s2 = m.Sids.Sids[j2]
1095                 }
1096                 size += 16
1097         }
1098         return size
1099 }
1100 func (m *SrPolicyMod) Marshal(b []byte) ([]byte, error) {
1101         o := binary.BigEndian
1102         _ = o
1103         pos := 0
1104         _ = pos
1105         var buf []byte
1106         if b == nil {
1107                 buf = make([]byte, m.Size())
1108         } else {
1109                 buf = b
1110         }
1111         // field[1] m.BsidAddr
1112         for i := 0; i < 16; i++ {
1113                 var x uint8
1114                 if i < len(m.BsidAddr) {
1115                         x = uint8(m.BsidAddr[i])
1116                 }
1117                 buf[pos] = uint8(x)
1118                 pos += 1
1119         }
1120         // field[1] m.SrPolicyIndex
1121         o.PutUint32(buf[pos:pos+4], uint32(m.SrPolicyIndex))
1122         pos += 4
1123         // field[1] m.FibTable
1124         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
1125         pos += 4
1126         // field[1] m.Operation
1127         buf[pos] = uint8(m.Operation)
1128         pos += 1
1129         // field[1] m.SlIndex
1130         o.PutUint32(buf[pos:pos+4], uint32(m.SlIndex))
1131         pos += 4
1132         // field[1] m.Weight
1133         o.PutUint32(buf[pos:pos+4], uint32(m.Weight))
1134         pos += 4
1135         // field[1] m.Sids
1136         // field[2] m.Sids.NumSids
1137         buf[pos] = uint8(m.Sids.NumSids)
1138         pos += 1
1139         // field[2] m.Sids.Weight
1140         o.PutUint32(buf[pos:pos+4], uint32(m.Sids.Weight))
1141         pos += 4
1142         // field[2] m.Sids.Sids
1143         for j2 := 0; j2 < 16; j2++ {
1144                 var v2 IP6Address
1145                 if j2 < len(m.Sids.Sids) {
1146                         v2 = m.Sids.Sids[j2]
1147                 }
1148                 for i := 0; i < 16; i++ {
1149                         var x uint8
1150                         if i < len(v2) {
1151                                 x = uint8(v2[i])
1152                         }
1153                         buf[pos] = uint8(x)
1154                         pos += 1
1155                 }
1156         }
1157         return buf, nil
1158 }
1159 func (m *SrPolicyMod) Unmarshal(tmp []byte) error {
1160         o := binary.BigEndian
1161         _ = o
1162         pos := 0
1163         _ = pos
1164         // field[1] m.BsidAddr
1165         for i := 0; i < len(m.BsidAddr); i++ {
1166                 m.BsidAddr[i] = uint8(tmp[pos])
1167                 pos += 1
1168         }
1169         // field[1] m.SrPolicyIndex
1170         m.SrPolicyIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1171         pos += 4
1172         // field[1] m.FibTable
1173         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
1174         pos += 4
1175         // field[1] m.Operation
1176         m.Operation = SrPolicyOp(tmp[pos])
1177         pos += 1
1178         // field[1] m.SlIndex
1179         m.SlIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1180         pos += 4
1181         // field[1] m.Weight
1182         m.Weight = uint32(o.Uint32(tmp[pos : pos+4]))
1183         pos += 4
1184         // field[1] m.Sids
1185         // field[2] m.Sids.NumSids
1186         m.Sids.NumSids = uint8(tmp[pos])
1187         pos += 1
1188         // field[2] m.Sids.Weight
1189         m.Sids.Weight = uint32(o.Uint32(tmp[pos : pos+4]))
1190         pos += 4
1191         // field[2] m.Sids.Sids
1192         for j2 := 0; j2 < 16; j2++ {
1193                 for i := 0; i < len(m.Sids.Sids[j2]); i++ {
1194                         m.Sids.Sids[j2][i] = uint8(tmp[pos])
1195                         pos += 1
1196                 }
1197         }
1198         return nil
1199 }
1200
1201 // SrPolicyModReply represents VPP binary API message 'sr_policy_mod_reply'.
1202 type SrPolicyModReply struct {
1203         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1204 }
1205
1206 func (m *SrPolicyModReply) Reset()                        { *m = SrPolicyModReply{} }
1207 func (*SrPolicyModReply) GetMessageName() string          { return "sr_policy_mod_reply" }
1208 func (*SrPolicyModReply) GetCrcString() string            { return "e8d4e804" }
1209 func (*SrPolicyModReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1210
1211 func (m *SrPolicyModReply) Size() int {
1212         if m == nil {
1213                 return 0
1214         }
1215         var size int
1216         // field[1] m.Retval
1217         size += 4
1218         return size
1219 }
1220 func (m *SrPolicyModReply) Marshal(b []byte) ([]byte, error) {
1221         o := binary.BigEndian
1222         _ = o
1223         pos := 0
1224         _ = pos
1225         var buf []byte
1226         if b == nil {
1227                 buf = make([]byte, m.Size())
1228         } else {
1229                 buf = b
1230         }
1231         // field[1] m.Retval
1232         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1233         pos += 4
1234         return buf, nil
1235 }
1236 func (m *SrPolicyModReply) Unmarshal(tmp []byte) error {
1237         o := binary.BigEndian
1238         _ = o
1239         pos := 0
1240         _ = pos
1241         // field[1] m.Retval
1242         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1243         pos += 4
1244         return nil
1245 }
1246
1247 // SrSetEncapHopLimit represents VPP binary API message 'sr_set_encap_hop_limit'.
1248 type SrSetEncapHopLimit struct {
1249         HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"`
1250 }
1251
1252 func (m *SrSetEncapHopLimit) Reset()                        { *m = SrSetEncapHopLimit{} }
1253 func (*SrSetEncapHopLimit) GetMessageName() string          { return "sr_set_encap_hop_limit" }
1254 func (*SrSetEncapHopLimit) GetCrcString() string            { return "aa75d7d0" }
1255 func (*SrSetEncapHopLimit) GetMessageType() api.MessageType { return api.RequestMessage }
1256
1257 func (m *SrSetEncapHopLimit) Size() int {
1258         if m == nil {
1259                 return 0
1260         }
1261         var size int
1262         // field[1] m.HopLimit
1263         size += 1
1264         return size
1265 }
1266 func (m *SrSetEncapHopLimit) Marshal(b []byte) ([]byte, error) {
1267         o := binary.BigEndian
1268         _ = o
1269         pos := 0
1270         _ = pos
1271         var buf []byte
1272         if b == nil {
1273                 buf = make([]byte, m.Size())
1274         } else {
1275                 buf = b
1276         }
1277         // field[1] m.HopLimit
1278         buf[pos] = uint8(m.HopLimit)
1279         pos += 1
1280         return buf, nil
1281 }
1282 func (m *SrSetEncapHopLimit) Unmarshal(tmp []byte) error {
1283         o := binary.BigEndian
1284         _ = o
1285         pos := 0
1286         _ = pos
1287         // field[1] m.HopLimit
1288         m.HopLimit = uint8(tmp[pos])
1289         pos += 1
1290         return nil
1291 }
1292
1293 // SrSetEncapHopLimitReply represents VPP binary API message 'sr_set_encap_hop_limit_reply'.
1294 type SrSetEncapHopLimitReply struct {
1295         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1296 }
1297
1298 func (m *SrSetEncapHopLimitReply) Reset()                        { *m = SrSetEncapHopLimitReply{} }
1299 func (*SrSetEncapHopLimitReply) GetMessageName() string          { return "sr_set_encap_hop_limit_reply" }
1300 func (*SrSetEncapHopLimitReply) GetCrcString() string            { return "e8d4e804" }
1301 func (*SrSetEncapHopLimitReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1302
1303 func (m *SrSetEncapHopLimitReply) Size() int {
1304         if m == nil {
1305                 return 0
1306         }
1307         var size int
1308         // field[1] m.Retval
1309         size += 4
1310         return size
1311 }
1312 func (m *SrSetEncapHopLimitReply) Marshal(b []byte) ([]byte, error) {
1313         o := binary.BigEndian
1314         _ = o
1315         pos := 0
1316         _ = pos
1317         var buf []byte
1318         if b == nil {
1319                 buf = make([]byte, m.Size())
1320         } else {
1321                 buf = b
1322         }
1323         // field[1] m.Retval
1324         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1325         pos += 4
1326         return buf, nil
1327 }
1328 func (m *SrSetEncapHopLimitReply) Unmarshal(tmp []byte) error {
1329         o := binary.BigEndian
1330         _ = o
1331         pos := 0
1332         _ = pos
1333         // field[1] m.Retval
1334         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1335         pos += 4
1336         return nil
1337 }
1338
1339 // SrSetEncapSource represents VPP binary API message 'sr_set_encap_source'.
1340 type SrSetEncapSource struct {
1341         EncapsSource IP6Address `binapi:"ip6_address,name=encaps_source" json:"encaps_source,omitempty"`
1342 }
1343
1344 func (m *SrSetEncapSource) Reset()                        { *m = SrSetEncapSource{} }
1345 func (*SrSetEncapSource) GetMessageName() string          { return "sr_set_encap_source" }
1346 func (*SrSetEncapSource) GetCrcString() string            { return "d3bad5e1" }
1347 func (*SrSetEncapSource) GetMessageType() api.MessageType { return api.RequestMessage }
1348
1349 func (m *SrSetEncapSource) Size() int {
1350         if m == nil {
1351                 return 0
1352         }
1353         var size int
1354         // field[1] m.EncapsSource
1355         size += 16
1356         return size
1357 }
1358 func (m *SrSetEncapSource) Marshal(b []byte) ([]byte, error) {
1359         o := binary.BigEndian
1360         _ = o
1361         pos := 0
1362         _ = pos
1363         var buf []byte
1364         if b == nil {
1365                 buf = make([]byte, m.Size())
1366         } else {
1367                 buf = b
1368         }
1369         // field[1] m.EncapsSource
1370         for i := 0; i < 16; i++ {
1371                 var x uint8
1372                 if i < len(m.EncapsSource) {
1373                         x = uint8(m.EncapsSource[i])
1374                 }
1375                 buf[pos] = uint8(x)
1376                 pos += 1
1377         }
1378         return buf, nil
1379 }
1380 func (m *SrSetEncapSource) Unmarshal(tmp []byte) error {
1381         o := binary.BigEndian
1382         _ = o
1383         pos := 0
1384         _ = pos
1385         // field[1] m.EncapsSource
1386         for i := 0; i < len(m.EncapsSource); i++ {
1387                 m.EncapsSource[i] = uint8(tmp[pos])
1388                 pos += 1
1389         }
1390         return nil
1391 }
1392
1393 // SrSetEncapSourceReply represents VPP binary API message 'sr_set_encap_source_reply'.
1394 type SrSetEncapSourceReply struct {
1395         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1396 }
1397
1398 func (m *SrSetEncapSourceReply) Reset()                        { *m = SrSetEncapSourceReply{} }
1399 func (*SrSetEncapSourceReply) GetMessageName() string          { return "sr_set_encap_source_reply" }
1400 func (*SrSetEncapSourceReply) GetCrcString() string            { return "e8d4e804" }
1401 func (*SrSetEncapSourceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1402
1403 func (m *SrSetEncapSourceReply) Size() int {
1404         if m == nil {
1405                 return 0
1406         }
1407         var size int
1408         // field[1] m.Retval
1409         size += 4
1410         return size
1411 }
1412 func (m *SrSetEncapSourceReply) Marshal(b []byte) ([]byte, error) {
1413         o := binary.BigEndian
1414         _ = o
1415         pos := 0
1416         _ = pos
1417         var buf []byte
1418         if b == nil {
1419                 buf = make([]byte, m.Size())
1420         } else {
1421                 buf = b
1422         }
1423         // field[1] m.Retval
1424         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1425         pos += 4
1426         return buf, nil
1427 }
1428 func (m *SrSetEncapSourceReply) Unmarshal(tmp []byte) error {
1429         o := binary.BigEndian
1430         _ = o
1431         pos := 0
1432         _ = pos
1433         // field[1] m.Retval
1434         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1435         pos += 4
1436         return nil
1437 }
1438
1439 // SrSteeringAddDel represents VPP binary API message 'sr_steering_add_del'.
1440 type SrSteeringAddDel struct {
1441         IsDel         bool           `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"`
1442         BsidAddr      IP6Address     `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
1443         SrPolicyIndex uint32         `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
1444         TableID       uint32         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1445         Prefix        Prefix         `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1446         SwIfIndex     InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1447         TrafficType   SrSteer        `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
1448 }
1449
1450 func (m *SrSteeringAddDel) Reset()                        { *m = SrSteeringAddDel{} }
1451 func (*SrSteeringAddDel) GetMessageName() string          { return "sr_steering_add_del" }
1452 func (*SrSteeringAddDel) GetCrcString() string            { return "3711dace" }
1453 func (*SrSteeringAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
1454
1455 func (m *SrSteeringAddDel) Size() int {
1456         if m == nil {
1457                 return 0
1458         }
1459         var size int
1460         // field[1] m.IsDel
1461         size += 1
1462         // field[1] m.BsidAddr
1463         size += 16
1464         // field[1] m.SrPolicyIndex
1465         size += 4
1466         // field[1] m.TableID
1467         size += 4
1468         // field[1] m.Prefix
1469         // field[2] m.Prefix.Address
1470         // field[3] m.Prefix.Address.Af
1471         size += 1
1472         // field[3] m.Prefix.Address.Un
1473         size += 16
1474         // field[2] m.Prefix.Len
1475         size += 1
1476         // field[1] m.SwIfIndex
1477         size += 4
1478         // field[1] m.TrafficType
1479         size += 1
1480         return size
1481 }
1482 func (m *SrSteeringAddDel) Marshal(b []byte) ([]byte, error) {
1483         o := binary.BigEndian
1484         _ = o
1485         pos := 0
1486         _ = pos
1487         var buf []byte
1488         if b == nil {
1489                 buf = make([]byte, m.Size())
1490         } else {
1491                 buf = b
1492         }
1493         // field[1] m.IsDel
1494         if m.IsDel {
1495                 buf[pos] = 1
1496         }
1497         pos += 1
1498         // field[1] m.BsidAddr
1499         for i := 0; i < 16; i++ {
1500                 var x uint8
1501                 if i < len(m.BsidAddr) {
1502                         x = uint8(m.BsidAddr[i])
1503                 }
1504                 buf[pos] = uint8(x)
1505                 pos += 1
1506         }
1507         // field[1] m.SrPolicyIndex
1508         o.PutUint32(buf[pos:pos+4], uint32(m.SrPolicyIndex))
1509         pos += 4
1510         // field[1] m.TableID
1511         o.PutUint32(buf[pos:pos+4], uint32(m.TableID))
1512         pos += 4
1513         // field[1] m.Prefix
1514         // field[2] m.Prefix.Address
1515         // field[3] m.Prefix.Address.Af
1516         buf[pos] = uint8(m.Prefix.Address.Af)
1517         pos += 1
1518         // field[3] m.Prefix.Address.Un
1519         copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
1520         pos += 16
1521         // field[2] m.Prefix.Len
1522         buf[pos] = uint8(m.Prefix.Len)
1523         pos += 1
1524         // field[1] m.SwIfIndex
1525         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1526         pos += 4
1527         // field[1] m.TrafficType
1528         buf[pos] = uint8(m.TrafficType)
1529         pos += 1
1530         return buf, nil
1531 }
1532 func (m *SrSteeringAddDel) Unmarshal(tmp []byte) error {
1533         o := binary.BigEndian
1534         _ = o
1535         pos := 0
1536         _ = pos
1537         // field[1] m.IsDel
1538         m.IsDel = tmp[pos] != 0
1539         pos += 1
1540         // field[1] m.BsidAddr
1541         for i := 0; i < len(m.BsidAddr); i++ {
1542                 m.BsidAddr[i] = uint8(tmp[pos])
1543                 pos += 1
1544         }
1545         // field[1] m.SrPolicyIndex
1546         m.SrPolicyIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1547         pos += 4
1548         // field[1] m.TableID
1549         m.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
1550         pos += 4
1551         // field[1] m.Prefix
1552         // field[2] m.Prefix.Address
1553         // field[3] m.Prefix.Address.Af
1554         m.Prefix.Address.Af = AddressFamily(tmp[pos])
1555         pos += 1
1556         // field[3] m.Prefix.Address.Un
1557         copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
1558         pos += 16
1559         // field[2] m.Prefix.Len
1560         m.Prefix.Len = uint8(tmp[pos])
1561         pos += 1
1562         // field[1] m.SwIfIndex
1563         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1564         pos += 4
1565         // field[1] m.TrafficType
1566         m.TrafficType = SrSteer(tmp[pos])
1567         pos += 1
1568         return nil
1569 }
1570
1571 // SrSteeringAddDelReply represents VPP binary API message 'sr_steering_add_del_reply'.
1572 type SrSteeringAddDelReply struct {
1573         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1574 }
1575
1576 func (m *SrSteeringAddDelReply) Reset()                        { *m = SrSteeringAddDelReply{} }
1577 func (*SrSteeringAddDelReply) GetMessageName() string          { return "sr_steering_add_del_reply" }
1578 func (*SrSteeringAddDelReply) GetCrcString() string            { return "e8d4e804" }
1579 func (*SrSteeringAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1580
1581 func (m *SrSteeringAddDelReply) Size() int {
1582         if m == nil {
1583                 return 0
1584         }
1585         var size int
1586         // field[1] m.Retval
1587         size += 4
1588         return size
1589 }
1590 func (m *SrSteeringAddDelReply) Marshal(b []byte) ([]byte, error) {
1591         o := binary.BigEndian
1592         _ = o
1593         pos := 0
1594         _ = pos
1595         var buf []byte
1596         if b == nil {
1597                 buf = make([]byte, m.Size())
1598         } else {
1599                 buf = b
1600         }
1601         // field[1] m.Retval
1602         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1603         pos += 4
1604         return buf, nil
1605 }
1606 func (m *SrSteeringAddDelReply) Unmarshal(tmp []byte) error {
1607         o := binary.BigEndian
1608         _ = o
1609         pos := 0
1610         _ = pos
1611         // field[1] m.Retval
1612         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1613         pos += 4
1614         return nil
1615 }
1616
1617 // SrSteeringPolDetails represents VPP binary API message 'sr_steering_pol_details'.
1618 type SrSteeringPolDetails struct {
1619         TrafficType SrSteer        `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
1620         FibTable    uint32         `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
1621         Prefix      Prefix         `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1622         SwIfIndex   InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1623         Bsid        IP6Address     `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
1624 }
1625
1626 func (m *SrSteeringPolDetails) Reset()                        { *m = SrSteeringPolDetails{} }
1627 func (*SrSteeringPolDetails) GetMessageName() string          { return "sr_steering_pol_details" }
1628 func (*SrSteeringPolDetails) GetCrcString() string            { return "1c1ee786" }
1629 func (*SrSteeringPolDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
1630
1631 func (m *SrSteeringPolDetails) Size() int {
1632         if m == nil {
1633                 return 0
1634         }
1635         var size int
1636         // field[1] m.TrafficType
1637         size += 1
1638         // field[1] m.FibTable
1639         size += 4
1640         // field[1] m.Prefix
1641         // field[2] m.Prefix.Address
1642         // field[3] m.Prefix.Address.Af
1643         size += 1
1644         // field[3] m.Prefix.Address.Un
1645         size += 16
1646         // field[2] m.Prefix.Len
1647         size += 1
1648         // field[1] m.SwIfIndex
1649         size += 4
1650         // field[1] m.Bsid
1651         size += 16
1652         return size
1653 }
1654 func (m *SrSteeringPolDetails) Marshal(b []byte) ([]byte, error) {
1655         o := binary.BigEndian
1656         _ = o
1657         pos := 0
1658         _ = pos
1659         var buf []byte
1660         if b == nil {
1661                 buf = make([]byte, m.Size())
1662         } else {
1663                 buf = b
1664         }
1665         // field[1] m.TrafficType
1666         buf[pos] = uint8(m.TrafficType)
1667         pos += 1
1668         // field[1] m.FibTable
1669         o.PutUint32(buf[pos:pos+4], uint32(m.FibTable))
1670         pos += 4
1671         // field[1] m.Prefix
1672         // field[2] m.Prefix.Address
1673         // field[3] m.Prefix.Address.Af
1674         buf[pos] = uint8(m.Prefix.Address.Af)
1675         pos += 1
1676         // field[3] m.Prefix.Address.Un
1677         copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
1678         pos += 16
1679         // field[2] m.Prefix.Len
1680         buf[pos] = uint8(m.Prefix.Len)
1681         pos += 1
1682         // field[1] m.SwIfIndex
1683         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1684         pos += 4
1685         // field[1] m.Bsid
1686         for i := 0; i < 16; i++ {
1687                 var x uint8
1688                 if i < len(m.Bsid) {
1689                         x = uint8(m.Bsid[i])
1690                 }
1691                 buf[pos] = uint8(x)
1692                 pos += 1
1693         }
1694         return buf, nil
1695 }
1696 func (m *SrSteeringPolDetails) Unmarshal(tmp []byte) error {
1697         o := binary.BigEndian
1698         _ = o
1699         pos := 0
1700         _ = pos
1701         // field[1] m.TrafficType
1702         m.TrafficType = SrSteer(tmp[pos])
1703         pos += 1
1704         // field[1] m.FibTable
1705         m.FibTable = uint32(o.Uint32(tmp[pos : pos+4]))
1706         pos += 4
1707         // field[1] m.Prefix
1708         // field[2] m.Prefix.Address
1709         // field[3] m.Prefix.Address.Af
1710         m.Prefix.Address.Af = AddressFamily(tmp[pos])
1711         pos += 1
1712         // field[3] m.Prefix.Address.Un
1713         copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
1714         pos += 16
1715         // field[2] m.Prefix.Len
1716         m.Prefix.Len = uint8(tmp[pos])
1717         pos += 1
1718         // field[1] m.SwIfIndex
1719         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1720         pos += 4
1721         // field[1] m.Bsid
1722         for i := 0; i < len(m.Bsid); i++ {
1723                 m.Bsid[i] = uint8(tmp[pos])
1724                 pos += 1
1725         }
1726         return nil
1727 }
1728
1729 // SrSteeringPolDump represents VPP binary API message 'sr_steering_pol_dump'.
1730 type SrSteeringPolDump struct{}
1731
1732 func (m *SrSteeringPolDump) Reset()                        { *m = SrSteeringPolDump{} }
1733 func (*SrSteeringPolDump) GetMessageName() string          { return "sr_steering_pol_dump" }
1734 func (*SrSteeringPolDump) GetCrcString() string            { return "51077d14" }
1735 func (*SrSteeringPolDump) GetMessageType() api.MessageType { return api.RequestMessage }
1736
1737 func (m *SrSteeringPolDump) Size() int {
1738         if m == nil {
1739                 return 0
1740         }
1741         var size int
1742         return size
1743 }
1744 func (m *SrSteeringPolDump) Marshal(b []byte) ([]byte, error) {
1745         o := binary.BigEndian
1746         _ = o
1747         pos := 0
1748         _ = pos
1749         var buf []byte
1750         if b == nil {
1751                 buf = make([]byte, m.Size())
1752         } else {
1753                 buf = b
1754         }
1755         return buf, nil
1756 }
1757 func (m *SrSteeringPolDump) Unmarshal(tmp []byte) error {
1758         o := binary.BigEndian
1759         _ = o
1760         pos := 0
1761         _ = pos
1762         return nil
1763 }
1764
1765 func init() { file_sr_binapi_init() }
1766 func file_sr_binapi_init() {
1767         api.RegisterMessage((*SrLocalsidAddDel)(nil), "sr.SrLocalsidAddDel")
1768         api.RegisterMessage((*SrLocalsidAddDelReply)(nil), "sr.SrLocalsidAddDelReply")
1769         api.RegisterMessage((*SrLocalsidsDetails)(nil), "sr.SrLocalsidsDetails")
1770         api.RegisterMessage((*SrLocalsidsDump)(nil), "sr.SrLocalsidsDump")
1771         api.RegisterMessage((*SrPoliciesDetails)(nil), "sr.SrPoliciesDetails")
1772         api.RegisterMessage((*SrPoliciesDump)(nil), "sr.SrPoliciesDump")
1773         api.RegisterMessage((*SrPolicyAdd)(nil), "sr.SrPolicyAdd")
1774         api.RegisterMessage((*SrPolicyAddReply)(nil), "sr.SrPolicyAddReply")
1775         api.RegisterMessage((*SrPolicyDel)(nil), "sr.SrPolicyDel")
1776         api.RegisterMessage((*SrPolicyDelReply)(nil), "sr.SrPolicyDelReply")
1777         api.RegisterMessage((*SrPolicyMod)(nil), "sr.SrPolicyMod")
1778         api.RegisterMessage((*SrPolicyModReply)(nil), "sr.SrPolicyModReply")
1779         api.RegisterMessage((*SrSetEncapHopLimit)(nil), "sr.SrSetEncapHopLimit")
1780         api.RegisterMessage((*SrSetEncapHopLimitReply)(nil), "sr.SrSetEncapHopLimitReply")
1781         api.RegisterMessage((*SrSetEncapSource)(nil), "sr.SrSetEncapSource")
1782         api.RegisterMessage((*SrSetEncapSourceReply)(nil), "sr.SrSetEncapSourceReply")
1783         api.RegisterMessage((*SrSteeringAddDel)(nil), "sr.SrSteeringAddDel")
1784         api.RegisterMessage((*SrSteeringAddDelReply)(nil), "sr.SrSteeringAddDelReply")
1785         api.RegisterMessage((*SrSteeringPolDetails)(nil), "sr.SrSteeringPolDetails")
1786         api.RegisterMessage((*SrSteeringPolDump)(nil), "sr.SrSteeringPolDump")
1787 }
1788
1789 // Messages returns list of all messages in this module.
1790 func AllMessages() []api.Message {
1791         return []api.Message{
1792                 (*SrLocalsidAddDel)(nil),
1793                 (*SrLocalsidAddDelReply)(nil),
1794                 (*SrLocalsidsDetails)(nil),
1795                 (*SrLocalsidsDump)(nil),
1796                 (*SrPoliciesDetails)(nil),
1797                 (*SrPoliciesDump)(nil),
1798                 (*SrPolicyAdd)(nil),
1799                 (*SrPolicyAddReply)(nil),
1800                 (*SrPolicyDel)(nil),
1801                 (*SrPolicyDelReply)(nil),
1802                 (*SrPolicyMod)(nil),
1803                 (*SrPolicyModReply)(nil),
1804                 (*SrSetEncapHopLimit)(nil),
1805                 (*SrSetEncapHopLimitReply)(nil),
1806                 (*SrSetEncapSource)(nil),
1807                 (*SrSetEncapSourceReply)(nil),
1808                 (*SrSteeringAddDel)(nil),
1809                 (*SrSteeringAddDelReply)(nil),
1810                 (*SrSteeringPolDetails)(nil),
1811                 (*SrSteeringPolDump)(nil),
1812         }
1813 }
1814
1815 // Reference imports to suppress errors if they are not otherwise used.
1816 var _ = api.RegisterMessage
1817 var _ = codec.DecodeString
1818 var _ = bytes.NewBuffer
1819 var _ = context.Background
1820 var _ = io.Copy
1821 var _ = strconv.Itoa
1822 var _ = struc.Pack
1823 var _ = binary.BigEndian
1824 var _ = math.Float32bits