cc39b495350e60e1532392105c6f247ca1e3423c
[govpp.git] / binapi / l2 / l2.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 l2 contains generated bindings for API file l2.api.
7 //
8 // Contents:
9 //   3 enums
10 //   3 structs
11 //  54 messages
12 //
13 package l2
14
15 import (
16         "strconv"
17
18         api "git.fd.io/govpp.git/api"
19         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
20         interface_types "git.fd.io/govpp.git/binapi/interface_types"
21         ip_types "git.fd.io/govpp.git/binapi/ip_types"
22         codec "git.fd.io/govpp.git/codec"
23 )
24
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
30
31 const (
32         APIFile    = "l2"
33         APIVersion = "3.0.0"
34         VersionCrc = 0x58ce8a6b
35 )
36
37 // BdFlags defines enum 'bd_flags'.
38 type BdFlags uint32
39
40 const (
41         BRIDGE_API_FLAG_NONE     BdFlags = 0
42         BRIDGE_API_FLAG_LEARN    BdFlags = 1
43         BRIDGE_API_FLAG_FWD      BdFlags = 2
44         BRIDGE_API_FLAG_FLOOD    BdFlags = 4
45         BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8
46         BRIDGE_API_FLAG_ARP_TERM BdFlags = 16
47         BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32
48 )
49
50 var (
51         BdFlags_name = map[uint32]string{
52                 0:  "BRIDGE_API_FLAG_NONE",
53                 1:  "BRIDGE_API_FLAG_LEARN",
54                 2:  "BRIDGE_API_FLAG_FWD",
55                 4:  "BRIDGE_API_FLAG_FLOOD",
56                 8:  "BRIDGE_API_FLAG_UU_FLOOD",
57                 16: "BRIDGE_API_FLAG_ARP_TERM",
58                 32: "BRIDGE_API_FLAG_ARP_UFWD",
59         }
60         BdFlags_value = map[string]uint32{
61                 "BRIDGE_API_FLAG_NONE":     0,
62                 "BRIDGE_API_FLAG_LEARN":    1,
63                 "BRIDGE_API_FLAG_FWD":      2,
64                 "BRIDGE_API_FLAG_FLOOD":    4,
65                 "BRIDGE_API_FLAG_UU_FLOOD": 8,
66                 "BRIDGE_API_FLAG_ARP_TERM": 16,
67                 "BRIDGE_API_FLAG_ARP_UFWD": 32,
68         }
69 )
70
71 func (x BdFlags) String() string {
72         s, ok := BdFlags_name[uint32(x)]
73         if ok {
74                 return s
75         }
76         str := func(n uint32) string {
77                 s, ok := BdFlags_name[uint32(n)]
78                 if ok {
79                         return s
80                 }
81                 return "BdFlags(" + strconv.Itoa(int(n)) + ")"
82         }
83         for i := uint32(0); i <= 32; i++ {
84                 val := uint32(x)
85                 if val&(1<<i) != 0 {
86                         if s != "" {
87                                 s += "|"
88                         }
89                         s += str(1 << i)
90                 }
91         }
92         if s == "" {
93                 return str(uint32(x))
94         }
95         return s
96 }
97
98 // L2PortType defines enum 'l2_port_type'.
99 type L2PortType uint32
100
101 const (
102         L2_API_PORT_TYPE_NORMAL L2PortType = 0
103         L2_API_PORT_TYPE_BVI    L2PortType = 1
104         L2_API_PORT_TYPE_UU_FWD L2PortType = 2
105 )
106
107 var (
108         L2PortType_name = map[uint32]string{
109                 0: "L2_API_PORT_TYPE_NORMAL",
110                 1: "L2_API_PORT_TYPE_BVI",
111                 2: "L2_API_PORT_TYPE_UU_FWD",
112         }
113         L2PortType_value = map[string]uint32{
114                 "L2_API_PORT_TYPE_NORMAL": 0,
115                 "L2_API_PORT_TYPE_BVI":    1,
116                 "L2_API_PORT_TYPE_UU_FWD": 2,
117         }
118 )
119
120 func (x L2PortType) String() string {
121         s, ok := L2PortType_name[uint32(x)]
122         if ok {
123                 return s
124         }
125         return "L2PortType(" + strconv.Itoa(int(x)) + ")"
126 }
127
128 // MacEventAction defines enum 'mac_event_action'.
129 type MacEventAction uint32
130
131 const (
132         MAC_EVENT_ACTION_API_ADD    MacEventAction = 0
133         MAC_EVENT_ACTION_API_DELETE MacEventAction = 1
134         MAC_EVENT_ACTION_API_MOVE   MacEventAction = 2
135 )
136
137 var (
138         MacEventAction_name = map[uint32]string{
139                 0: "MAC_EVENT_ACTION_API_ADD",
140                 1: "MAC_EVENT_ACTION_API_DELETE",
141                 2: "MAC_EVENT_ACTION_API_MOVE",
142         }
143         MacEventAction_value = map[string]uint32{
144                 "MAC_EVENT_ACTION_API_ADD":    0,
145                 "MAC_EVENT_ACTION_API_DELETE": 1,
146                 "MAC_EVENT_ACTION_API_MOVE":   2,
147         }
148 )
149
150 func (x MacEventAction) String() string {
151         s, ok := MacEventAction_name[uint32(x)]
152         if ok {
153                 return s
154         }
155         return "MacEventAction(" + strconv.Itoa(int(x)) + ")"
156 }
157
158 // BdIPMac defines type 'bd_ip_mac'.
159 type BdIPMac struct {
160         BdID uint32                    `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
161         IP   ip_types.Address          `binapi:"address,name=ip" json:"ip,omitempty"`
162         Mac  ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
163 }
164
165 // BridgeDomainSwIf defines type 'bridge_domain_sw_if'.
166 type BridgeDomainSwIf struct {
167         Context   uint32                         `binapi:"u32,name=context" json:"context,omitempty"`
168         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
169         Shg       uint8                          `binapi:"u8,name=shg" json:"shg,omitempty"`
170 }
171
172 // MacEntry defines type 'mac_entry'.
173 type MacEntry struct {
174         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
175         MacAddr   ethernet_types.MacAddress      `binapi:"mac_address,name=mac_addr" json:"mac_addr,omitempty"`
176         Action    MacEventAction                 `binapi:"mac_event_action,name=action" json:"action,omitempty"`
177         Flags     uint8                          `binapi:"u8,name=flags" json:"flags,omitempty"`
178 }
179
180 // BdIPMacAddDel defines message 'bd_ip_mac_add_del'.
181 type BdIPMacAddDel struct {
182         IsAdd bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
183         Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
184 }
185
186 func (m *BdIPMacAddDel) Reset()               { *m = BdIPMacAddDel{} }
187 func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
188 func (*BdIPMacAddDel) GetCrcString() string   { return "5f2b84e2" }
189 func (*BdIPMacAddDel) GetMessageType() api.MessageType {
190         return api.RequestMessage
191 }
192
193 func (m *BdIPMacAddDel) Size() (size int) {
194         if m == nil {
195                 return 0
196         }
197         size += 1      // m.IsAdd
198         size += 4      // m.Entry.BdID
199         size += 1      // m.Entry.IP.Af
200         size += 1 * 16 // m.Entry.IP.Un
201         size += 1 * 6  // m.Entry.Mac
202         return size
203 }
204 func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
205         if b == nil {
206                 b = make([]byte, m.Size())
207         }
208         buf := codec.NewBuffer(b)
209         buf.EncodeBool(m.IsAdd)
210         buf.EncodeUint32(m.Entry.BdID)
211         buf.EncodeUint8(uint8(m.Entry.IP.Af))
212         buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
213         buf.EncodeBytes(m.Entry.Mac[:], 6)
214         return buf.Bytes(), nil
215 }
216 func (m *BdIPMacAddDel) Unmarshal(b []byte) error {
217         buf := codec.NewBuffer(b)
218         m.IsAdd = buf.DecodeBool()
219         m.Entry.BdID = buf.DecodeUint32()
220         m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
221         copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
222         copy(m.Entry.Mac[:], buf.DecodeBytes(6))
223         return nil
224 }
225
226 // BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
227 type BdIPMacAddDelReply struct {
228         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
229 }
230
231 func (m *BdIPMacAddDelReply) Reset()               { *m = BdIPMacAddDelReply{} }
232 func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" }
233 func (*BdIPMacAddDelReply) GetCrcString() string   { return "e8d4e804" }
234 func (*BdIPMacAddDelReply) GetMessageType() api.MessageType {
235         return api.ReplyMessage
236 }
237
238 func (m *BdIPMacAddDelReply) Size() (size int) {
239         if m == nil {
240                 return 0
241         }
242         size += 4 // m.Retval
243         return size
244 }
245 func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) {
246         if b == nil {
247                 b = make([]byte, m.Size())
248         }
249         buf := codec.NewBuffer(b)
250         buf.EncodeInt32(m.Retval)
251         return buf.Bytes(), nil
252 }
253 func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error {
254         buf := codec.NewBuffer(b)
255         m.Retval = buf.DecodeInt32()
256         return nil
257 }
258
259 // BdIPMacDetails defines message 'bd_ip_mac_details'.
260 type BdIPMacDetails struct {
261         Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
262 }
263
264 func (m *BdIPMacDetails) Reset()               { *m = BdIPMacDetails{} }
265 func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
266 func (*BdIPMacDetails) GetCrcString() string   { return "a52f8044" }
267 func (*BdIPMacDetails) GetMessageType() api.MessageType {
268         return api.ReplyMessage
269 }
270
271 func (m *BdIPMacDetails) Size() (size int) {
272         if m == nil {
273                 return 0
274         }
275         size += 4      // m.Entry.BdID
276         size += 1      // m.Entry.IP.Af
277         size += 1 * 16 // m.Entry.IP.Un
278         size += 1 * 6  // m.Entry.Mac
279         return size
280 }
281 func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
282         if b == nil {
283                 b = make([]byte, m.Size())
284         }
285         buf := codec.NewBuffer(b)
286         buf.EncodeUint32(m.Entry.BdID)
287         buf.EncodeUint8(uint8(m.Entry.IP.Af))
288         buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
289         buf.EncodeBytes(m.Entry.Mac[:], 6)
290         return buf.Bytes(), nil
291 }
292 func (m *BdIPMacDetails) Unmarshal(b []byte) error {
293         buf := codec.NewBuffer(b)
294         m.Entry.BdID = buf.DecodeUint32()
295         m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
296         copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
297         copy(m.Entry.Mac[:], buf.DecodeBytes(6))
298         return nil
299 }
300
301 // BdIPMacDump defines message 'bd_ip_mac_dump'.
302 type BdIPMacDump struct {
303         BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
304 }
305
306 func (m *BdIPMacDump) Reset()               { *m = BdIPMacDump{} }
307 func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" }
308 func (*BdIPMacDump) GetCrcString() string   { return "c25fdce6" }
309 func (*BdIPMacDump) GetMessageType() api.MessageType {
310         return api.RequestMessage
311 }
312
313 func (m *BdIPMacDump) Size() (size int) {
314         if m == nil {
315                 return 0
316         }
317         size += 4 // m.BdID
318         return size
319 }
320 func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
321         if b == nil {
322                 b = make([]byte, m.Size())
323         }
324         buf := codec.NewBuffer(b)
325         buf.EncodeUint32(m.BdID)
326         return buf.Bytes(), nil
327 }
328 func (m *BdIPMacDump) Unmarshal(b []byte) error {
329         buf := codec.NewBuffer(b)
330         m.BdID = buf.DecodeUint32()
331         return nil
332 }
333
334 // BdIPMacFlush defines message 'bd_ip_mac_flush'.
335 type BdIPMacFlush struct {
336         BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
337 }
338
339 func (m *BdIPMacFlush) Reset()               { *m = BdIPMacFlush{} }
340 func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" }
341 func (*BdIPMacFlush) GetCrcString() string   { return "c25fdce6" }
342 func (*BdIPMacFlush) GetMessageType() api.MessageType {
343         return api.RequestMessage
344 }
345
346 func (m *BdIPMacFlush) Size() (size int) {
347         if m == nil {
348                 return 0
349         }
350         size += 4 // m.BdID
351         return size
352 }
353 func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
354         if b == nil {
355                 b = make([]byte, m.Size())
356         }
357         buf := codec.NewBuffer(b)
358         buf.EncodeUint32(m.BdID)
359         return buf.Bytes(), nil
360 }
361 func (m *BdIPMacFlush) Unmarshal(b []byte) error {
362         buf := codec.NewBuffer(b)
363         m.BdID = buf.DecodeUint32()
364         return nil
365 }
366
367 // BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
368 type BdIPMacFlushReply struct {
369         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
370 }
371
372 func (m *BdIPMacFlushReply) Reset()               { *m = BdIPMacFlushReply{} }
373 func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" }
374 func (*BdIPMacFlushReply) GetCrcString() string   { return "e8d4e804" }
375 func (*BdIPMacFlushReply) GetMessageType() api.MessageType {
376         return api.ReplyMessage
377 }
378
379 func (m *BdIPMacFlushReply) Size() (size int) {
380         if m == nil {
381                 return 0
382         }
383         size += 4 // m.Retval
384         return size
385 }
386 func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) {
387         if b == nil {
388                 b = make([]byte, m.Size())
389         }
390         buf := codec.NewBuffer(b)
391         buf.EncodeInt32(m.Retval)
392         return buf.Bytes(), nil
393 }
394 func (m *BdIPMacFlushReply) Unmarshal(b []byte) error {
395         buf := codec.NewBuffer(b)
396         m.Retval = buf.DecodeInt32()
397         return nil
398 }
399
400 // BridgeDomainAddDel defines message 'bridge_domain_add_del'.
401 type BridgeDomainAddDel struct {
402         BdID    uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
403         Flood   bool   `binapi:"bool,name=flood" json:"flood,omitempty"`
404         UuFlood bool   `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"`
405         Forward bool   `binapi:"bool,name=forward" json:"forward,omitempty"`
406         Learn   bool   `binapi:"bool,name=learn" json:"learn,omitempty"`
407         ArpTerm bool   `binapi:"bool,name=arp_term" json:"arp_term,omitempty"`
408         ArpUfwd bool   `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"`
409         MacAge  uint8  `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
410         BdTag   string `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"`
411         IsAdd   bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
412 }
413
414 func (m *BridgeDomainAddDel) Reset()               { *m = BridgeDomainAddDel{} }
415 func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" }
416 func (*BridgeDomainAddDel) GetCrcString() string   { return "600b7170" }
417 func (*BridgeDomainAddDel) GetMessageType() api.MessageType {
418         return api.RequestMessage
419 }
420
421 func (m *BridgeDomainAddDel) Size() (size int) {
422         if m == nil {
423                 return 0
424         }
425         size += 4  // m.BdID
426         size += 1  // m.Flood
427         size += 1  // m.UuFlood
428         size += 1  // m.Forward
429         size += 1  // m.Learn
430         size += 1  // m.ArpTerm
431         size += 1  // m.ArpUfwd
432         size += 1  // m.MacAge
433         size += 64 // m.BdTag
434         size += 1  // m.IsAdd
435         return size
436 }
437 func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
438         if b == nil {
439                 b = make([]byte, m.Size())
440         }
441         buf := codec.NewBuffer(b)
442         buf.EncodeUint32(m.BdID)
443         buf.EncodeBool(m.Flood)
444         buf.EncodeBool(m.UuFlood)
445         buf.EncodeBool(m.Forward)
446         buf.EncodeBool(m.Learn)
447         buf.EncodeBool(m.ArpTerm)
448         buf.EncodeBool(m.ArpUfwd)
449         buf.EncodeUint8(m.MacAge)
450         buf.EncodeString(m.BdTag, 64)
451         buf.EncodeBool(m.IsAdd)
452         return buf.Bytes(), nil
453 }
454 func (m *BridgeDomainAddDel) Unmarshal(b []byte) error {
455         buf := codec.NewBuffer(b)
456         m.BdID = buf.DecodeUint32()
457         m.Flood = buf.DecodeBool()
458         m.UuFlood = buf.DecodeBool()
459         m.Forward = buf.DecodeBool()
460         m.Learn = buf.DecodeBool()
461         m.ArpTerm = buf.DecodeBool()
462         m.ArpUfwd = buf.DecodeBool()
463         m.MacAge = buf.DecodeUint8()
464         m.BdTag = buf.DecodeString(64)
465         m.IsAdd = buf.DecodeBool()
466         return nil
467 }
468
469 // BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
470 type BridgeDomainAddDelReply struct {
471         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
472 }
473
474 func (m *BridgeDomainAddDelReply) Reset()               { *m = BridgeDomainAddDelReply{} }
475 func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" }
476 func (*BridgeDomainAddDelReply) GetCrcString() string   { return "e8d4e804" }
477 func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType {
478         return api.ReplyMessage
479 }
480
481 func (m *BridgeDomainAddDelReply) Size() (size int) {
482         if m == nil {
483                 return 0
484         }
485         size += 4 // m.Retval
486         return size
487 }
488 func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) {
489         if b == nil {
490                 b = make([]byte, m.Size())
491         }
492         buf := codec.NewBuffer(b)
493         buf.EncodeInt32(m.Retval)
494         return buf.Bytes(), nil
495 }
496 func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
497         buf := codec.NewBuffer(b)
498         m.Retval = buf.DecodeInt32()
499         return nil
500 }
501
502 // BridgeDomainDetails defines message 'bridge_domain_details'.
503 type BridgeDomainDetails struct {
504         BdID           uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
505         Flood          bool                           `binapi:"bool,name=flood" json:"flood,omitempty"`
506         UuFlood        bool                           `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"`
507         Forward        bool                           `binapi:"bool,name=forward" json:"forward,omitempty"`
508         Learn          bool                           `binapi:"bool,name=learn" json:"learn,omitempty"`
509         ArpTerm        bool                           `binapi:"bool,name=arp_term" json:"arp_term,omitempty"`
510         ArpUfwd        bool                           `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"`
511         MacAge         uint8                          `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
512         BdTag          string                         `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"`
513         BviSwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
514         UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
515         NSwIfs         uint32                         `binapi:"u32,name=n_sw_ifs" json:"-"`
516         SwIfDetails    []BridgeDomainSwIf             `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"`
517 }
518
519 func (m *BridgeDomainDetails) Reset()               { *m = BridgeDomainDetails{} }
520 func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
521 func (*BridgeDomainDetails) GetCrcString() string   { return "979f549d" }
522 func (*BridgeDomainDetails) GetMessageType() api.MessageType {
523         return api.ReplyMessage
524 }
525
526 func (m *BridgeDomainDetails) Size() (size int) {
527         if m == nil {
528                 return 0
529         }
530         size += 4  // m.BdID
531         size += 1  // m.Flood
532         size += 1  // m.UuFlood
533         size += 1  // m.Forward
534         size += 1  // m.Learn
535         size += 1  // m.ArpTerm
536         size += 1  // m.ArpUfwd
537         size += 1  // m.MacAge
538         size += 64 // m.BdTag
539         size += 4  // m.BviSwIfIndex
540         size += 4  // m.UuFwdSwIfIndex
541         size += 4  // m.NSwIfs
542         for j1 := 0; j1 < len(m.SwIfDetails); j1++ {
543                 var s1 BridgeDomainSwIf
544                 _ = s1
545                 if j1 < len(m.SwIfDetails) {
546                         s1 = m.SwIfDetails[j1]
547                 }
548                 size += 4 // s1.Context
549                 size += 4 // s1.SwIfIndex
550                 size += 1 // s1.Shg
551         }
552         return size
553 }
554 func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
555         if b == nil {
556                 b = make([]byte, m.Size())
557         }
558         buf := codec.NewBuffer(b)
559         buf.EncodeUint32(m.BdID)
560         buf.EncodeBool(m.Flood)
561         buf.EncodeBool(m.UuFlood)
562         buf.EncodeBool(m.Forward)
563         buf.EncodeBool(m.Learn)
564         buf.EncodeBool(m.ArpTerm)
565         buf.EncodeBool(m.ArpUfwd)
566         buf.EncodeUint8(m.MacAge)
567         buf.EncodeString(m.BdTag, 64)
568         buf.EncodeUint32(uint32(m.BviSwIfIndex))
569         buf.EncodeUint32(uint32(m.UuFwdSwIfIndex))
570         buf.EncodeUint32(uint32(len(m.SwIfDetails)))
571         for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
572                 var v0 BridgeDomainSwIf // SwIfDetails
573                 if j0 < len(m.SwIfDetails) {
574                         v0 = m.SwIfDetails[j0]
575                 }
576                 buf.EncodeUint32(v0.Context)
577                 buf.EncodeUint32(uint32(v0.SwIfIndex))
578                 buf.EncodeUint8(v0.Shg)
579         }
580         return buf.Bytes(), nil
581 }
582 func (m *BridgeDomainDetails) Unmarshal(b []byte) error {
583         buf := codec.NewBuffer(b)
584         m.BdID = buf.DecodeUint32()
585         m.Flood = buf.DecodeBool()
586         m.UuFlood = buf.DecodeBool()
587         m.Forward = buf.DecodeBool()
588         m.Learn = buf.DecodeBool()
589         m.ArpTerm = buf.DecodeBool()
590         m.ArpUfwd = buf.DecodeBool()
591         m.MacAge = buf.DecodeUint8()
592         m.BdTag = buf.DecodeString(64)
593         m.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
594         m.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
595         m.NSwIfs = buf.DecodeUint32()
596         m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs)
597         for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
598                 m.SwIfDetails[j0].Context = buf.DecodeUint32()
599                 m.SwIfDetails[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
600                 m.SwIfDetails[j0].Shg = buf.DecodeUint8()
601         }
602         return nil
603 }
604
605 // BridgeDomainDump defines message 'bridge_domain_dump'.
606 type BridgeDomainDump struct {
607         BdID      uint32                         `binapi:"u32,name=bd_id,default=4294967295" json:"bd_id,omitempty"`
608         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
609 }
610
611 func (m *BridgeDomainDump) Reset()               { *m = BridgeDomainDump{} }
612 func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" }
613 func (*BridgeDomainDump) GetCrcString() string   { return "74396a43" }
614 func (*BridgeDomainDump) GetMessageType() api.MessageType {
615         return api.RequestMessage
616 }
617
618 func (m *BridgeDomainDump) Size() (size int) {
619         if m == nil {
620                 return 0
621         }
622         size += 4 // m.BdID
623         size += 4 // m.SwIfIndex
624         return size
625 }
626 func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
627         if b == nil {
628                 b = make([]byte, m.Size())
629         }
630         buf := codec.NewBuffer(b)
631         buf.EncodeUint32(m.BdID)
632         buf.EncodeUint32(uint32(m.SwIfIndex))
633         return buf.Bytes(), nil
634 }
635 func (m *BridgeDomainDump) Unmarshal(b []byte) error {
636         buf := codec.NewBuffer(b)
637         m.BdID = buf.DecodeUint32()
638         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
639         return nil
640 }
641
642 // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
643 type BridgeDomainSetMacAge struct {
644         BdID   uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
645         MacAge uint8  `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
646 }
647
648 func (m *BridgeDomainSetMacAge) Reset()               { *m = BridgeDomainSetMacAge{} }
649 func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
650 func (*BridgeDomainSetMacAge) GetCrcString() string   { return "b537ad7b" }
651 func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
652         return api.RequestMessage
653 }
654
655 func (m *BridgeDomainSetMacAge) Size() (size int) {
656         if m == nil {
657                 return 0
658         }
659         size += 4 // m.BdID
660         size += 1 // m.MacAge
661         return size
662 }
663 func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
664         if b == nil {
665                 b = make([]byte, m.Size())
666         }
667         buf := codec.NewBuffer(b)
668         buf.EncodeUint32(m.BdID)
669         buf.EncodeUint8(m.MacAge)
670         return buf.Bytes(), nil
671 }
672 func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
673         buf := codec.NewBuffer(b)
674         m.BdID = buf.DecodeUint32()
675         m.MacAge = buf.DecodeUint8()
676         return nil
677 }
678
679 // BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
680 type BridgeDomainSetMacAgeReply struct {
681         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
682 }
683
684 func (m *BridgeDomainSetMacAgeReply) Reset()               { *m = BridgeDomainSetMacAgeReply{} }
685 func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
686 func (*BridgeDomainSetMacAgeReply) GetCrcString() string   { return "e8d4e804" }
687 func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
688         return api.ReplyMessage
689 }
690
691 func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
692         if m == nil {
693                 return 0
694         }
695         size += 4 // m.Retval
696         return size
697 }
698 func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) {
699         if b == nil {
700                 b = make([]byte, m.Size())
701         }
702         buf := codec.NewBuffer(b)
703         buf.EncodeInt32(m.Retval)
704         return buf.Bytes(), nil
705 }
706 func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
707         buf := codec.NewBuffer(b)
708         m.Retval = buf.DecodeInt32()
709         return nil
710 }
711
712 // BridgeFlags defines message 'bridge_flags'.
713 type BridgeFlags struct {
714         BdID  uint32  `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
715         IsSet bool    `binapi:"bool,name=is_set" json:"is_set,omitempty"`
716         Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
717 }
718
719 func (m *BridgeFlags) Reset()               { *m = BridgeFlags{} }
720 func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
721 func (*BridgeFlags) GetCrcString() string   { return "1b0c5fbd" }
722 func (*BridgeFlags) GetMessageType() api.MessageType {
723         return api.RequestMessage
724 }
725
726 func (m *BridgeFlags) Size() (size int) {
727         if m == nil {
728                 return 0
729         }
730         size += 4 // m.BdID
731         size += 1 // m.IsSet
732         size += 4 // m.Flags
733         return size
734 }
735 func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
736         if b == nil {
737                 b = make([]byte, m.Size())
738         }
739         buf := codec.NewBuffer(b)
740         buf.EncodeUint32(m.BdID)
741         buf.EncodeBool(m.IsSet)
742         buf.EncodeUint32(uint32(m.Flags))
743         return buf.Bytes(), nil
744 }
745 func (m *BridgeFlags) Unmarshal(b []byte) error {
746         buf := codec.NewBuffer(b)
747         m.BdID = buf.DecodeUint32()
748         m.IsSet = buf.DecodeBool()
749         m.Flags = BdFlags(buf.DecodeUint32())
750         return nil
751 }
752
753 // BridgeFlagsReply defines message 'bridge_flags_reply'.
754 type BridgeFlagsReply struct {
755         Retval                 int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
756         ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
757 }
758
759 func (m *BridgeFlagsReply) Reset()               { *m = BridgeFlagsReply{} }
760 func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
761 func (*BridgeFlagsReply) GetCrcString() string   { return "29b2a2b3" }
762 func (*BridgeFlagsReply) GetMessageType() api.MessageType {
763         return api.ReplyMessage
764 }
765
766 func (m *BridgeFlagsReply) Size() (size int) {
767         if m == nil {
768                 return 0
769         }
770         size += 4 // m.Retval
771         size += 4 // m.ResultingFeatureBitmap
772         return size
773 }
774 func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
775         if b == nil {
776                 b = make([]byte, m.Size())
777         }
778         buf := codec.NewBuffer(b)
779         buf.EncodeInt32(m.Retval)
780         buf.EncodeUint32(m.ResultingFeatureBitmap)
781         return buf.Bytes(), nil
782 }
783 func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
784         buf := codec.NewBuffer(b)
785         m.Retval = buf.DecodeInt32()
786         m.ResultingFeatureBitmap = buf.DecodeUint32()
787         return nil
788 }
789
790 // BviCreate defines message 'bvi_create'.
791 type BviCreate struct {
792         Mac          ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
793         UserInstance uint32                    `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"`
794 }
795
796 func (m *BviCreate) Reset()               { *m = BviCreate{} }
797 func (*BviCreate) GetMessageName() string { return "bvi_create" }
798 func (*BviCreate) GetCrcString() string   { return "f5398559" }
799 func (*BviCreate) GetMessageType() api.MessageType {
800         return api.RequestMessage
801 }
802
803 func (m *BviCreate) Size() (size int) {
804         if m == nil {
805                 return 0
806         }
807         size += 1 * 6 // m.Mac
808         size += 4     // m.UserInstance
809         return size
810 }
811 func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
812         if b == nil {
813                 b = make([]byte, m.Size())
814         }
815         buf := codec.NewBuffer(b)
816         buf.EncodeBytes(m.Mac[:], 6)
817         buf.EncodeUint32(m.UserInstance)
818         return buf.Bytes(), nil
819 }
820 func (m *BviCreate) Unmarshal(b []byte) error {
821         buf := codec.NewBuffer(b)
822         copy(m.Mac[:], buf.DecodeBytes(6))
823         m.UserInstance = buf.DecodeUint32()
824         return nil
825 }
826
827 // BviCreateReply defines message 'bvi_create_reply'.
828 type BviCreateReply struct {
829         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
830         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
831 }
832
833 func (m *BviCreateReply) Reset()               { *m = BviCreateReply{} }
834 func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
835 func (*BviCreateReply) GetCrcString() string   { return "5383d31f" }
836 func (*BviCreateReply) GetMessageType() api.MessageType {
837         return api.ReplyMessage
838 }
839
840 func (m *BviCreateReply) Size() (size int) {
841         if m == nil {
842                 return 0
843         }
844         size += 4 // m.Retval
845         size += 4 // m.SwIfIndex
846         return size
847 }
848 func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
849         if b == nil {
850                 b = make([]byte, m.Size())
851         }
852         buf := codec.NewBuffer(b)
853         buf.EncodeInt32(m.Retval)
854         buf.EncodeUint32(uint32(m.SwIfIndex))
855         return buf.Bytes(), nil
856 }
857 func (m *BviCreateReply) Unmarshal(b []byte) error {
858         buf := codec.NewBuffer(b)
859         m.Retval = buf.DecodeInt32()
860         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
861         return nil
862 }
863
864 // BviDelete defines message 'bvi_delete'.
865 type BviDelete struct {
866         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
867 }
868
869 func (m *BviDelete) Reset()               { *m = BviDelete{} }
870 func (*BviDelete) GetMessageName() string { return "bvi_delete" }
871 func (*BviDelete) GetCrcString() string   { return "f9e6675e" }
872 func (*BviDelete) GetMessageType() api.MessageType {
873         return api.RequestMessage
874 }
875
876 func (m *BviDelete) Size() (size int) {
877         if m == nil {
878                 return 0
879         }
880         size += 4 // m.SwIfIndex
881         return size
882 }
883 func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
884         if b == nil {
885                 b = make([]byte, m.Size())
886         }
887         buf := codec.NewBuffer(b)
888         buf.EncodeUint32(uint32(m.SwIfIndex))
889         return buf.Bytes(), nil
890 }
891 func (m *BviDelete) Unmarshal(b []byte) error {
892         buf := codec.NewBuffer(b)
893         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
894         return nil
895 }
896
897 // BviDeleteReply defines message 'bvi_delete_reply'.
898 type BviDeleteReply struct {
899         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
900 }
901
902 func (m *BviDeleteReply) Reset()               { *m = BviDeleteReply{} }
903 func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
904 func (*BviDeleteReply) GetCrcString() string   { return "e8d4e804" }
905 func (*BviDeleteReply) GetMessageType() api.MessageType {
906         return api.ReplyMessage
907 }
908
909 func (m *BviDeleteReply) Size() (size int) {
910         if m == nil {
911                 return 0
912         }
913         size += 4 // m.Retval
914         return size
915 }
916 func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) {
917         if b == nil {
918                 b = make([]byte, m.Size())
919         }
920         buf := codec.NewBuffer(b)
921         buf.EncodeInt32(m.Retval)
922         return buf.Bytes(), nil
923 }
924 func (m *BviDeleteReply) Unmarshal(b []byte) error {
925         buf := codec.NewBuffer(b)
926         m.Retval = buf.DecodeInt32()
927         return nil
928 }
929
930 // L2ArpTermEvent defines message 'l2_arp_term_event'.
931 type L2ArpTermEvent struct {
932         PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
933         IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
934         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
935         Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
936 }
937
938 func (m *L2ArpTermEvent) Reset()               { *m = L2ArpTermEvent{} }
939 func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
940 func (*L2ArpTermEvent) GetCrcString() string   { return "85ff71ea" }
941 func (*L2ArpTermEvent) GetMessageType() api.MessageType {
942         return api.EventMessage
943 }
944
945 func (m *L2ArpTermEvent) Size() (size int) {
946         if m == nil {
947                 return 0
948         }
949         size += 4      // m.PID
950         size += 1      // m.IP.Af
951         size += 1 * 16 // m.IP.Un
952         size += 4      // m.SwIfIndex
953         size += 1 * 6  // m.Mac
954         return size
955 }
956 func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
957         if b == nil {
958                 b = make([]byte, m.Size())
959         }
960         buf := codec.NewBuffer(b)
961         buf.EncodeUint32(m.PID)
962         buf.EncodeUint8(uint8(m.IP.Af))
963         buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
964         buf.EncodeUint32(uint32(m.SwIfIndex))
965         buf.EncodeBytes(m.Mac[:], 6)
966         return buf.Bytes(), nil
967 }
968 func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
969         buf := codec.NewBuffer(b)
970         m.PID = buf.DecodeUint32()
971         m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
972         copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
973         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
974         copy(m.Mac[:], buf.DecodeBytes(6))
975         return nil
976 }
977
978 // L2FibClearTable defines message 'l2_fib_clear_table'.
979 type L2FibClearTable struct{}
980
981 func (m *L2FibClearTable) Reset()               { *m = L2FibClearTable{} }
982 func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
983 func (*L2FibClearTable) GetCrcString() string   { return "51077d14" }
984 func (*L2FibClearTable) GetMessageType() api.MessageType {
985         return api.RequestMessage
986 }
987
988 func (m *L2FibClearTable) Size() (size int) {
989         if m == nil {
990                 return 0
991         }
992         return size
993 }
994 func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
995         if b == nil {
996                 b = make([]byte, m.Size())
997         }
998         buf := codec.NewBuffer(b)
999         return buf.Bytes(), nil
1000 }
1001 func (m *L2FibClearTable) Unmarshal(b []byte) error {
1002         return nil
1003 }
1004
1005 // L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
1006 type L2FibClearTableReply struct {
1007         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1008 }
1009
1010 func (m *L2FibClearTableReply) Reset()               { *m = L2FibClearTableReply{} }
1011 func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
1012 func (*L2FibClearTableReply) GetCrcString() string   { return "e8d4e804" }
1013 func (*L2FibClearTableReply) GetMessageType() api.MessageType {
1014         return api.ReplyMessage
1015 }
1016
1017 func (m *L2FibClearTableReply) Size() (size int) {
1018         if m == nil {
1019                 return 0
1020         }
1021         size += 4 // m.Retval
1022         return size
1023 }
1024 func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) {
1025         if b == nil {
1026                 b = make([]byte, m.Size())
1027         }
1028         buf := codec.NewBuffer(b)
1029         buf.EncodeInt32(m.Retval)
1030         return buf.Bytes(), nil
1031 }
1032 func (m *L2FibClearTableReply) Unmarshal(b []byte) error {
1033         buf := codec.NewBuffer(b)
1034         m.Retval = buf.DecodeInt32()
1035         return nil
1036 }
1037
1038 // L2FibTableDetails defines message 'l2_fib_table_details'.
1039 type L2FibTableDetails struct {
1040         BdID      uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1041         Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1042         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1043         StaticMac bool                           `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
1044         FilterMac bool                           `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
1045         BviMac    bool                           `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
1046 }
1047
1048 func (m *L2FibTableDetails) Reset()               { *m = L2FibTableDetails{} }
1049 func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
1050 func (*L2FibTableDetails) GetCrcString() string   { return "e8d2fc72" }
1051 func (*L2FibTableDetails) GetMessageType() api.MessageType {
1052         return api.ReplyMessage
1053 }
1054
1055 func (m *L2FibTableDetails) Size() (size int) {
1056         if m == nil {
1057                 return 0
1058         }
1059         size += 4     // m.BdID
1060         size += 1 * 6 // m.Mac
1061         size += 4     // m.SwIfIndex
1062         size += 1     // m.StaticMac
1063         size += 1     // m.FilterMac
1064         size += 1     // m.BviMac
1065         return size
1066 }
1067 func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
1068         if b == nil {
1069                 b = make([]byte, m.Size())
1070         }
1071         buf := codec.NewBuffer(b)
1072         buf.EncodeUint32(m.BdID)
1073         buf.EncodeBytes(m.Mac[:], 6)
1074         buf.EncodeUint32(uint32(m.SwIfIndex))
1075         buf.EncodeBool(m.StaticMac)
1076         buf.EncodeBool(m.FilterMac)
1077         buf.EncodeBool(m.BviMac)
1078         return buf.Bytes(), nil
1079 }
1080 func (m *L2FibTableDetails) Unmarshal(b []byte) error {
1081         buf := codec.NewBuffer(b)
1082         m.BdID = buf.DecodeUint32()
1083         copy(m.Mac[:], buf.DecodeBytes(6))
1084         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1085         m.StaticMac = buf.DecodeBool()
1086         m.FilterMac = buf.DecodeBool()
1087         m.BviMac = buf.DecodeBool()
1088         return nil
1089 }
1090
1091 // L2FibTableDump defines message 'l2_fib_table_dump'.
1092 type L2FibTableDump struct {
1093         BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1094 }
1095
1096 func (m *L2FibTableDump) Reset()               { *m = L2FibTableDump{} }
1097 func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
1098 func (*L2FibTableDump) GetCrcString() string   { return "c25fdce6" }
1099 func (*L2FibTableDump) GetMessageType() api.MessageType {
1100         return api.RequestMessage
1101 }
1102
1103 func (m *L2FibTableDump) Size() (size int) {
1104         if m == nil {
1105                 return 0
1106         }
1107         size += 4 // m.BdID
1108         return size
1109 }
1110 func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
1111         if b == nil {
1112                 b = make([]byte, m.Size())
1113         }
1114         buf := codec.NewBuffer(b)
1115         buf.EncodeUint32(m.BdID)
1116         return buf.Bytes(), nil
1117 }
1118 func (m *L2FibTableDump) Unmarshal(b []byte) error {
1119         buf := codec.NewBuffer(b)
1120         m.BdID = buf.DecodeUint32()
1121         return nil
1122 }
1123
1124 // L2Flags defines message 'l2_flags'.
1125 type L2Flags struct {
1126         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1127         IsSet         bool                           `binapi:"bool,name=is_set" json:"is_set,omitempty"`
1128         FeatureBitmap uint32                         `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
1129 }
1130
1131 func (m *L2Flags) Reset()               { *m = L2Flags{} }
1132 func (*L2Flags) GetMessageName() string { return "l2_flags" }
1133 func (*L2Flags) GetCrcString() string   { return "fc41cfe8" }
1134 func (*L2Flags) GetMessageType() api.MessageType {
1135         return api.RequestMessage
1136 }
1137
1138 func (m *L2Flags) Size() (size int) {
1139         if m == nil {
1140                 return 0
1141         }
1142         size += 4 // m.SwIfIndex
1143         size += 1 // m.IsSet
1144         size += 4 // m.FeatureBitmap
1145         return size
1146 }
1147 func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
1148         if b == nil {
1149                 b = make([]byte, m.Size())
1150         }
1151         buf := codec.NewBuffer(b)
1152         buf.EncodeUint32(uint32(m.SwIfIndex))
1153         buf.EncodeBool(m.IsSet)
1154         buf.EncodeUint32(m.FeatureBitmap)
1155         return buf.Bytes(), nil
1156 }
1157 func (m *L2Flags) Unmarshal(b []byte) error {
1158         buf := codec.NewBuffer(b)
1159         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1160         m.IsSet = buf.DecodeBool()
1161         m.FeatureBitmap = buf.DecodeUint32()
1162         return nil
1163 }
1164
1165 // L2FlagsReply defines message 'l2_flags_reply'.
1166 type L2FlagsReply struct {
1167         Retval                 int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1168         ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
1169 }
1170
1171 func (m *L2FlagsReply) Reset()               { *m = L2FlagsReply{} }
1172 func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
1173 func (*L2FlagsReply) GetCrcString() string   { return "29b2a2b3" }
1174 func (*L2FlagsReply) GetMessageType() api.MessageType {
1175         return api.ReplyMessage
1176 }
1177
1178 func (m *L2FlagsReply) Size() (size int) {
1179         if m == nil {
1180                 return 0
1181         }
1182         size += 4 // m.Retval
1183         size += 4 // m.ResultingFeatureBitmap
1184         return size
1185 }
1186 func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
1187         if b == nil {
1188                 b = make([]byte, m.Size())
1189         }
1190         buf := codec.NewBuffer(b)
1191         buf.EncodeInt32(m.Retval)
1192         buf.EncodeUint32(m.ResultingFeatureBitmap)
1193         return buf.Bytes(), nil
1194 }
1195 func (m *L2FlagsReply) Unmarshal(b []byte) error {
1196         buf := codec.NewBuffer(b)
1197         m.Retval = buf.DecodeInt32()
1198         m.ResultingFeatureBitmap = buf.DecodeUint32()
1199         return nil
1200 }
1201
1202 // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
1203 type L2InterfaceEfpFilter struct {
1204         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1205         EnableDisable bool                           `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
1206 }
1207
1208 func (m *L2InterfaceEfpFilter) Reset()               { *m = L2InterfaceEfpFilter{} }
1209 func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
1210 func (*L2InterfaceEfpFilter) GetCrcString() string   { return "5501adee" }
1211 func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
1212         return api.RequestMessage
1213 }
1214
1215 func (m *L2InterfaceEfpFilter) Size() (size int) {
1216         if m == nil {
1217                 return 0
1218         }
1219         size += 4 // m.SwIfIndex
1220         size += 1 // m.EnableDisable
1221         return size
1222 }
1223 func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
1224         if b == nil {
1225                 b = make([]byte, m.Size())
1226         }
1227         buf := codec.NewBuffer(b)
1228         buf.EncodeUint32(uint32(m.SwIfIndex))
1229         buf.EncodeBool(m.EnableDisable)
1230         return buf.Bytes(), nil
1231 }
1232 func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
1233         buf := codec.NewBuffer(b)
1234         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1235         m.EnableDisable = buf.DecodeBool()
1236         return nil
1237 }
1238
1239 // L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
1240 type L2InterfaceEfpFilterReply struct {
1241         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1242 }
1243
1244 func (m *L2InterfaceEfpFilterReply) Reset()               { *m = L2InterfaceEfpFilterReply{} }
1245 func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
1246 func (*L2InterfaceEfpFilterReply) GetCrcString() string   { return "e8d4e804" }
1247 func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
1248         return api.ReplyMessage
1249 }
1250
1251 func (m *L2InterfaceEfpFilterReply) Size() (size int) {
1252         if m == nil {
1253                 return 0
1254         }
1255         size += 4 // m.Retval
1256         return size
1257 }
1258 func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) {
1259         if b == nil {
1260                 b = make([]byte, m.Size())
1261         }
1262         buf := codec.NewBuffer(b)
1263         buf.EncodeInt32(m.Retval)
1264         return buf.Bytes(), nil
1265 }
1266 func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
1267         buf := codec.NewBuffer(b)
1268         m.Retval = buf.DecodeInt32()
1269         return nil
1270 }
1271
1272 // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
1273 type L2InterfacePbbTagRewrite struct {
1274         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1275         VtrOp     uint32                         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1276         OuterTag  uint16                         `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1277         BDmac     ethernet_types.MacAddress      `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1278         BSmac     ethernet_types.MacAddress      `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1279         BVlanid   uint16                         `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1280         ISid      uint32                         `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1281 }
1282
1283 func (m *L2InterfacePbbTagRewrite) Reset()               { *m = L2InterfacePbbTagRewrite{} }
1284 func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
1285 func (*L2InterfacePbbTagRewrite) GetCrcString() string   { return "612efa5a" }
1286 func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
1287         return api.RequestMessage
1288 }
1289
1290 func (m *L2InterfacePbbTagRewrite) Size() (size int) {
1291         if m == nil {
1292                 return 0
1293         }
1294         size += 4     // m.SwIfIndex
1295         size += 4     // m.VtrOp
1296         size += 2     // m.OuterTag
1297         size += 1 * 6 // m.BDmac
1298         size += 1 * 6 // m.BSmac
1299         size += 2     // m.BVlanid
1300         size += 4     // m.ISid
1301         return size
1302 }
1303 func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
1304         if b == nil {
1305                 b = make([]byte, m.Size())
1306         }
1307         buf := codec.NewBuffer(b)
1308         buf.EncodeUint32(uint32(m.SwIfIndex))
1309         buf.EncodeUint32(m.VtrOp)
1310         buf.EncodeUint16(m.OuterTag)
1311         buf.EncodeBytes(m.BDmac[:], 6)
1312         buf.EncodeBytes(m.BSmac[:], 6)
1313         buf.EncodeUint16(m.BVlanid)
1314         buf.EncodeUint32(m.ISid)
1315         return buf.Bytes(), nil
1316 }
1317 func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
1318         buf := codec.NewBuffer(b)
1319         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1320         m.VtrOp = buf.DecodeUint32()
1321         m.OuterTag = buf.DecodeUint16()
1322         copy(m.BDmac[:], buf.DecodeBytes(6))
1323         copy(m.BSmac[:], buf.DecodeBytes(6))
1324         m.BVlanid = buf.DecodeUint16()
1325         m.ISid = buf.DecodeUint32()
1326         return nil
1327 }
1328
1329 // L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
1330 type L2InterfacePbbTagRewriteReply struct {
1331         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1332 }
1333
1334 func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
1335 func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
1336         return "l2_interface_pbb_tag_rewrite_reply"
1337 }
1338 func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
1339 func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
1340         return api.ReplyMessage
1341 }
1342
1343 func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
1344         if m == nil {
1345                 return 0
1346         }
1347         size += 4 // m.Retval
1348         return size
1349 }
1350 func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) {
1351         if b == nil {
1352                 b = make([]byte, m.Size())
1353         }
1354         buf := codec.NewBuffer(b)
1355         buf.EncodeInt32(m.Retval)
1356         return buf.Bytes(), nil
1357 }
1358 func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
1359         buf := codec.NewBuffer(b)
1360         m.Retval = buf.DecodeInt32()
1361         return nil
1362 }
1363
1364 // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
1365 type L2InterfaceVlanTagRewrite struct {
1366         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1367         VtrOp     uint32                         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1368         PushDot1q uint32                         `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
1369         Tag1      uint32                         `binapi:"u32,name=tag1" json:"tag1,omitempty"`
1370         Tag2      uint32                         `binapi:"u32,name=tag2" json:"tag2,omitempty"`
1371 }
1372
1373 func (m *L2InterfaceVlanTagRewrite) Reset()               { *m = L2InterfaceVlanTagRewrite{} }
1374 func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
1375 func (*L2InterfaceVlanTagRewrite) GetCrcString() string   { return "62cc0bbc" }
1376 func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
1377         return api.RequestMessage
1378 }
1379
1380 func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
1381         if m == nil {
1382                 return 0
1383         }
1384         size += 4 // m.SwIfIndex
1385         size += 4 // m.VtrOp
1386         size += 4 // m.PushDot1q
1387         size += 4 // m.Tag1
1388         size += 4 // m.Tag2
1389         return size
1390 }
1391 func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
1392         if b == nil {
1393                 b = make([]byte, m.Size())
1394         }
1395         buf := codec.NewBuffer(b)
1396         buf.EncodeUint32(uint32(m.SwIfIndex))
1397         buf.EncodeUint32(m.VtrOp)
1398         buf.EncodeUint32(m.PushDot1q)
1399         buf.EncodeUint32(m.Tag1)
1400         buf.EncodeUint32(m.Tag2)
1401         return buf.Bytes(), nil
1402 }
1403 func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
1404         buf := codec.NewBuffer(b)
1405         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1406         m.VtrOp = buf.DecodeUint32()
1407         m.PushDot1q = buf.DecodeUint32()
1408         m.Tag1 = buf.DecodeUint32()
1409         m.Tag2 = buf.DecodeUint32()
1410         return nil
1411 }
1412
1413 // L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
1414 type L2InterfaceVlanTagRewriteReply struct {
1415         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1416 }
1417
1418 func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
1419 func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
1420         return "l2_interface_vlan_tag_rewrite_reply"
1421 }
1422 func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
1423 func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
1424         return api.ReplyMessage
1425 }
1426
1427 func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
1428         if m == nil {
1429                 return 0
1430         }
1431         size += 4 // m.Retval
1432         return size
1433 }
1434 func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) {
1435         if b == nil {
1436                 b = make([]byte, m.Size())
1437         }
1438         buf := codec.NewBuffer(b)
1439         buf.EncodeInt32(m.Retval)
1440         return buf.Bytes(), nil
1441 }
1442 func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
1443         buf := codec.NewBuffer(b)
1444         m.Retval = buf.DecodeInt32()
1445         return nil
1446 }
1447
1448 // L2MacsEvent defines message 'l2_macs_event'.
1449 type L2MacsEvent struct {
1450         PID   uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
1451         NMacs uint32     `binapi:"u32,name=n_macs" json:"-"`
1452         Mac   []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
1453 }
1454
1455 func (m *L2MacsEvent) Reset()               { *m = L2MacsEvent{} }
1456 func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
1457 func (*L2MacsEvent) GetCrcString() string   { return "2eadfc8b" }
1458 func (*L2MacsEvent) GetMessageType() api.MessageType {
1459         return api.EventMessage
1460 }
1461
1462 func (m *L2MacsEvent) Size() (size int) {
1463         if m == nil {
1464                 return 0
1465         }
1466         size += 4 // m.PID
1467         size += 4 // m.NMacs
1468         for j1 := 0; j1 < len(m.Mac); j1++ {
1469                 var s1 MacEntry
1470                 _ = s1
1471                 if j1 < len(m.Mac) {
1472                         s1 = m.Mac[j1]
1473                 }
1474                 size += 4     // s1.SwIfIndex
1475                 size += 1 * 6 // s1.MacAddr
1476                 size += 4     // s1.Action
1477                 size += 1     // s1.Flags
1478         }
1479         return size
1480 }
1481 func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
1482         if b == nil {
1483                 b = make([]byte, m.Size())
1484         }
1485         buf := codec.NewBuffer(b)
1486         buf.EncodeUint32(m.PID)
1487         buf.EncodeUint32(uint32(len(m.Mac)))
1488         for j0 := 0; j0 < len(m.Mac); j0++ {
1489                 var v0 MacEntry // Mac
1490                 if j0 < len(m.Mac) {
1491                         v0 = m.Mac[j0]
1492                 }
1493                 buf.EncodeUint32(uint32(v0.SwIfIndex))
1494                 buf.EncodeBytes(v0.MacAddr[:], 6)
1495                 buf.EncodeUint32(uint32(v0.Action))
1496                 buf.EncodeUint8(v0.Flags)
1497         }
1498         return buf.Bytes(), nil
1499 }
1500 func (m *L2MacsEvent) Unmarshal(b []byte) error {
1501         buf := codec.NewBuffer(b)
1502         m.PID = buf.DecodeUint32()
1503         m.NMacs = buf.DecodeUint32()
1504         m.Mac = make([]MacEntry, m.NMacs)
1505         for j0 := 0; j0 < len(m.Mac); j0++ {
1506                 m.Mac[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1507                 copy(m.Mac[j0].MacAddr[:], buf.DecodeBytes(6))
1508                 m.Mac[j0].Action = MacEventAction(buf.DecodeUint32())
1509                 m.Mac[j0].Flags = buf.DecodeUint8()
1510         }
1511         return nil
1512 }
1513
1514 // L2PatchAddDel defines message 'l2_patch_add_del'.
1515 type L2PatchAddDel struct {
1516         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
1517         TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
1518         IsAdd       bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1519 }
1520
1521 func (m *L2PatchAddDel) Reset()               { *m = L2PatchAddDel{} }
1522 func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
1523 func (*L2PatchAddDel) GetCrcString() string   { return "522f3445" }
1524 func (*L2PatchAddDel) GetMessageType() api.MessageType {
1525         return api.RequestMessage
1526 }
1527
1528 func (m *L2PatchAddDel) Size() (size int) {
1529         if m == nil {
1530                 return 0
1531         }
1532         size += 4 // m.RxSwIfIndex
1533         size += 4 // m.TxSwIfIndex
1534         size += 1 // m.IsAdd
1535         return size
1536 }
1537 func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
1538         if b == nil {
1539                 b = make([]byte, m.Size())
1540         }
1541         buf := codec.NewBuffer(b)
1542         buf.EncodeUint32(uint32(m.RxSwIfIndex))
1543         buf.EncodeUint32(uint32(m.TxSwIfIndex))
1544         buf.EncodeBool(m.IsAdd)
1545         return buf.Bytes(), nil
1546 }
1547 func (m *L2PatchAddDel) Unmarshal(b []byte) error {
1548         buf := codec.NewBuffer(b)
1549         m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1550         m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1551         m.IsAdd = buf.DecodeBool()
1552         return nil
1553 }
1554
1555 // L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
1556 type L2PatchAddDelReply struct {
1557         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1558 }
1559
1560 func (m *L2PatchAddDelReply) Reset()               { *m = L2PatchAddDelReply{} }
1561 func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
1562 func (*L2PatchAddDelReply) GetCrcString() string   { return "e8d4e804" }
1563 func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
1564         return api.ReplyMessage
1565 }
1566
1567 func (m *L2PatchAddDelReply) Size() (size int) {
1568         if m == nil {
1569                 return 0
1570         }
1571         size += 4 // m.Retval
1572         return size
1573 }
1574 func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) {
1575         if b == nil {
1576                 b = make([]byte, m.Size())
1577         }
1578         buf := codec.NewBuffer(b)
1579         buf.EncodeInt32(m.Retval)
1580         return buf.Bytes(), nil
1581 }
1582 func (m *L2PatchAddDelReply) Unmarshal(b []byte) error {
1583         buf := codec.NewBuffer(b)
1584         m.Retval = buf.DecodeInt32()
1585         return nil
1586 }
1587
1588 // L2XconnectDetails defines message 'l2_xconnect_details'.
1589 type L2XconnectDetails struct {
1590         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
1591         TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
1592 }
1593
1594 func (m *L2XconnectDetails) Reset()               { *m = L2XconnectDetails{} }
1595 func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
1596 func (*L2XconnectDetails) GetCrcString() string   { return "c8aa6b37" }
1597 func (*L2XconnectDetails) GetMessageType() api.MessageType {
1598         return api.ReplyMessage
1599 }
1600
1601 func (m *L2XconnectDetails) Size() (size int) {
1602         if m == nil {
1603                 return 0
1604         }
1605         size += 4 // m.RxSwIfIndex
1606         size += 4 // m.TxSwIfIndex
1607         return size
1608 }
1609 func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
1610         if b == nil {
1611                 b = make([]byte, m.Size())
1612         }
1613         buf := codec.NewBuffer(b)
1614         buf.EncodeUint32(uint32(m.RxSwIfIndex))
1615         buf.EncodeUint32(uint32(m.TxSwIfIndex))
1616         return buf.Bytes(), nil
1617 }
1618 func (m *L2XconnectDetails) Unmarshal(b []byte) error {
1619         buf := codec.NewBuffer(b)
1620         m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1621         m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1622         return nil
1623 }
1624
1625 // L2XconnectDump defines message 'l2_xconnect_dump'.
1626 type L2XconnectDump struct{}
1627
1628 func (m *L2XconnectDump) Reset()               { *m = L2XconnectDump{} }
1629 func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
1630 func (*L2XconnectDump) GetCrcString() string   { return "51077d14" }
1631 func (*L2XconnectDump) GetMessageType() api.MessageType {
1632         return api.RequestMessage
1633 }
1634
1635 func (m *L2XconnectDump) Size() (size int) {
1636         if m == nil {
1637                 return 0
1638         }
1639         return size
1640 }
1641 func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
1642         if b == nil {
1643                 b = make([]byte, m.Size())
1644         }
1645         buf := codec.NewBuffer(b)
1646         return buf.Bytes(), nil
1647 }
1648 func (m *L2XconnectDump) Unmarshal(b []byte) error {
1649         return nil
1650 }
1651
1652 // L2fibAddDel defines message 'l2fib_add_del'.
1653 type L2fibAddDel struct {
1654         Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1655         BdID      uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1656         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1657         IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1658         StaticMac bool                           `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
1659         FilterMac bool                           `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
1660         BviMac    bool                           `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
1661 }
1662
1663 func (m *L2fibAddDel) Reset()               { *m = L2fibAddDel{} }
1664 func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
1665 func (*L2fibAddDel) GetCrcString() string   { return "f29d796c" }
1666 func (*L2fibAddDel) GetMessageType() api.MessageType {
1667         return api.RequestMessage
1668 }
1669
1670 func (m *L2fibAddDel) Size() (size int) {
1671         if m == nil {
1672                 return 0
1673         }
1674         size += 1 * 6 // m.Mac
1675         size += 4     // m.BdID
1676         size += 4     // m.SwIfIndex
1677         size += 1     // m.IsAdd
1678         size += 1     // m.StaticMac
1679         size += 1     // m.FilterMac
1680         size += 1     // m.BviMac
1681         return size
1682 }
1683 func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
1684         if b == nil {
1685                 b = make([]byte, m.Size())
1686         }
1687         buf := codec.NewBuffer(b)
1688         buf.EncodeBytes(m.Mac[:], 6)
1689         buf.EncodeUint32(m.BdID)
1690         buf.EncodeUint32(uint32(m.SwIfIndex))
1691         buf.EncodeBool(m.IsAdd)
1692         buf.EncodeBool(m.StaticMac)
1693         buf.EncodeBool(m.FilterMac)
1694         buf.EncodeBool(m.BviMac)
1695         return buf.Bytes(), nil
1696 }
1697 func (m *L2fibAddDel) Unmarshal(b []byte) error {
1698         buf := codec.NewBuffer(b)
1699         copy(m.Mac[:], buf.DecodeBytes(6))
1700         m.BdID = buf.DecodeUint32()
1701         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1702         m.IsAdd = buf.DecodeBool()
1703         m.StaticMac = buf.DecodeBool()
1704         m.FilterMac = buf.DecodeBool()
1705         m.BviMac = buf.DecodeBool()
1706         return nil
1707 }
1708
1709 // L2fibAddDelReply defines message 'l2fib_add_del_reply'.
1710 type L2fibAddDelReply struct {
1711         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1712 }
1713
1714 func (m *L2fibAddDelReply) Reset()               { *m = L2fibAddDelReply{} }
1715 func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
1716 func (*L2fibAddDelReply) GetCrcString() string   { return "e8d4e804" }
1717 func (*L2fibAddDelReply) GetMessageType() api.MessageType {
1718         return api.ReplyMessage
1719 }
1720
1721 func (m *L2fibAddDelReply) Size() (size int) {
1722         if m == nil {
1723                 return 0
1724         }
1725         size += 4 // m.Retval
1726         return size
1727 }
1728 func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) {
1729         if b == nil {
1730                 b = make([]byte, m.Size())
1731         }
1732         buf := codec.NewBuffer(b)
1733         buf.EncodeInt32(m.Retval)
1734         return buf.Bytes(), nil
1735 }
1736 func (m *L2fibAddDelReply) Unmarshal(b []byte) error {
1737         buf := codec.NewBuffer(b)
1738         m.Retval = buf.DecodeInt32()
1739         return nil
1740 }
1741
1742 // L2fibFlushAll defines message 'l2fib_flush_all'.
1743 type L2fibFlushAll struct{}
1744
1745 func (m *L2fibFlushAll) Reset()               { *m = L2fibFlushAll{} }
1746 func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
1747 func (*L2fibFlushAll) GetCrcString() string   { return "51077d14" }
1748 func (*L2fibFlushAll) GetMessageType() api.MessageType {
1749         return api.RequestMessage
1750 }
1751
1752 func (m *L2fibFlushAll) Size() (size int) {
1753         if m == nil {
1754                 return 0
1755         }
1756         return size
1757 }
1758 func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
1759         if b == nil {
1760                 b = make([]byte, m.Size())
1761         }
1762         buf := codec.NewBuffer(b)
1763         return buf.Bytes(), nil
1764 }
1765 func (m *L2fibFlushAll) Unmarshal(b []byte) error {
1766         return nil
1767 }
1768
1769 // L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
1770 type L2fibFlushAllReply struct {
1771         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1772 }
1773
1774 func (m *L2fibFlushAllReply) Reset()               { *m = L2fibFlushAllReply{} }
1775 func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
1776 func (*L2fibFlushAllReply) GetCrcString() string   { return "e8d4e804" }
1777 func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
1778         return api.ReplyMessage
1779 }
1780
1781 func (m *L2fibFlushAllReply) Size() (size int) {
1782         if m == nil {
1783                 return 0
1784         }
1785         size += 4 // m.Retval
1786         return size
1787 }
1788 func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) {
1789         if b == nil {
1790                 b = make([]byte, m.Size())
1791         }
1792         buf := codec.NewBuffer(b)
1793         buf.EncodeInt32(m.Retval)
1794         return buf.Bytes(), nil
1795 }
1796 func (m *L2fibFlushAllReply) Unmarshal(b []byte) error {
1797         buf := codec.NewBuffer(b)
1798         m.Retval = buf.DecodeInt32()
1799         return nil
1800 }
1801
1802 // L2fibFlushBd defines message 'l2fib_flush_bd'.
1803 type L2fibFlushBd struct {
1804         BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1805 }
1806
1807 func (m *L2fibFlushBd) Reset()               { *m = L2fibFlushBd{} }
1808 func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
1809 func (*L2fibFlushBd) GetCrcString() string   { return "c25fdce6" }
1810 func (*L2fibFlushBd) GetMessageType() api.MessageType {
1811         return api.RequestMessage
1812 }
1813
1814 func (m *L2fibFlushBd) Size() (size int) {
1815         if m == nil {
1816                 return 0
1817         }
1818         size += 4 // m.BdID
1819         return size
1820 }
1821 func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
1822         if b == nil {
1823                 b = make([]byte, m.Size())
1824         }
1825         buf := codec.NewBuffer(b)
1826         buf.EncodeUint32(m.BdID)
1827         return buf.Bytes(), nil
1828 }
1829 func (m *L2fibFlushBd) Unmarshal(b []byte) error {
1830         buf := codec.NewBuffer(b)
1831         m.BdID = buf.DecodeUint32()
1832         return nil
1833 }
1834
1835 // L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
1836 type L2fibFlushBdReply struct {
1837         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1838 }
1839
1840 func (m *L2fibFlushBdReply) Reset()               { *m = L2fibFlushBdReply{} }
1841 func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
1842 func (*L2fibFlushBdReply) GetCrcString() string   { return "e8d4e804" }
1843 func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
1844         return api.ReplyMessage
1845 }
1846
1847 func (m *L2fibFlushBdReply) Size() (size int) {
1848         if m == nil {
1849                 return 0
1850         }
1851         size += 4 // m.Retval
1852         return size
1853 }
1854 func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) {
1855         if b == nil {
1856                 b = make([]byte, m.Size())
1857         }
1858         buf := codec.NewBuffer(b)
1859         buf.EncodeInt32(m.Retval)
1860         return buf.Bytes(), nil
1861 }
1862 func (m *L2fibFlushBdReply) Unmarshal(b []byte) error {
1863         buf := codec.NewBuffer(b)
1864         m.Retval = buf.DecodeInt32()
1865         return nil
1866 }
1867
1868 // L2fibFlushInt defines message 'l2fib_flush_int'.
1869 type L2fibFlushInt struct {
1870         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1871 }
1872
1873 func (m *L2fibFlushInt) Reset()               { *m = L2fibFlushInt{} }
1874 func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
1875 func (*L2fibFlushInt) GetCrcString() string   { return "f9e6675e" }
1876 func (*L2fibFlushInt) GetMessageType() api.MessageType {
1877         return api.RequestMessage
1878 }
1879
1880 func (m *L2fibFlushInt) Size() (size int) {
1881         if m == nil {
1882                 return 0
1883         }
1884         size += 4 // m.SwIfIndex
1885         return size
1886 }
1887 func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
1888         if b == nil {
1889                 b = make([]byte, m.Size())
1890         }
1891         buf := codec.NewBuffer(b)
1892         buf.EncodeUint32(uint32(m.SwIfIndex))
1893         return buf.Bytes(), nil
1894 }
1895 func (m *L2fibFlushInt) Unmarshal(b []byte) error {
1896         buf := codec.NewBuffer(b)
1897         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1898         return nil
1899 }
1900
1901 // L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
1902 type L2fibFlushIntReply struct {
1903         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1904 }
1905
1906 func (m *L2fibFlushIntReply) Reset()               { *m = L2fibFlushIntReply{} }
1907 func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
1908 func (*L2fibFlushIntReply) GetCrcString() string   { return "e8d4e804" }
1909 func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
1910         return api.ReplyMessage
1911 }
1912
1913 func (m *L2fibFlushIntReply) Size() (size int) {
1914         if m == nil {
1915                 return 0
1916         }
1917         size += 4 // m.Retval
1918         return size
1919 }
1920 func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) {
1921         if b == nil {
1922                 b = make([]byte, m.Size())
1923         }
1924         buf := codec.NewBuffer(b)
1925         buf.EncodeInt32(m.Retval)
1926         return buf.Bytes(), nil
1927 }
1928 func (m *L2fibFlushIntReply) Unmarshal(b []byte) error {
1929         buf := codec.NewBuffer(b)
1930         m.Retval = buf.DecodeInt32()
1931         return nil
1932 }
1933
1934 // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
1935 type SwInterfaceSetL2Bridge struct {
1936         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
1937         BdID        uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1938         PortType    L2PortType                     `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
1939         Shg         uint8                          `binapi:"u8,name=shg" json:"shg,omitempty"`
1940         Enable      bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
1941 }
1942
1943 func (m *SwInterfaceSetL2Bridge) Reset()               { *m = SwInterfaceSetL2Bridge{} }
1944 func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
1945 func (*SwInterfaceSetL2Bridge) GetCrcString() string   { return "2e483cd0" }
1946 func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
1947         return api.RequestMessage
1948 }
1949
1950 func (m *SwInterfaceSetL2Bridge) Size() (size int) {
1951         if m == nil {
1952                 return 0
1953         }
1954         size += 4 // m.RxSwIfIndex
1955         size += 4 // m.BdID
1956         size += 4 // m.PortType
1957         size += 1 // m.Shg
1958         size += 1 // m.Enable
1959         return size
1960 }
1961 func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
1962         if b == nil {
1963                 b = make([]byte, m.Size())
1964         }
1965         buf := codec.NewBuffer(b)
1966         buf.EncodeUint32(uint32(m.RxSwIfIndex))
1967         buf.EncodeUint32(m.BdID)
1968         buf.EncodeUint32(uint32(m.PortType))
1969         buf.EncodeUint8(m.Shg)
1970         buf.EncodeBool(m.Enable)
1971         return buf.Bytes(), nil
1972 }
1973 func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
1974         buf := codec.NewBuffer(b)
1975         m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1976         m.BdID = buf.DecodeUint32()
1977         m.PortType = L2PortType(buf.DecodeUint32())
1978         m.Shg = buf.DecodeUint8()
1979         m.Enable = buf.DecodeBool()
1980         return nil
1981 }
1982
1983 // SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
1984 type SwInterfaceSetL2BridgeReply struct {
1985         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1986 }
1987
1988 func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
1989 func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
1990         return "sw_interface_set_l2_bridge_reply"
1991 }
1992 func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
1993 func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
1994         return api.ReplyMessage
1995 }
1996
1997 func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
1998         if m == nil {
1999                 return 0
2000         }
2001         size += 4 // m.Retval
2002         return size
2003 }
2004 func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) {
2005         if b == nil {
2006                 b = make([]byte, m.Size())
2007         }
2008         buf := codec.NewBuffer(b)
2009         buf.EncodeInt32(m.Retval)
2010         return buf.Bytes(), nil
2011 }
2012 func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
2013         buf := codec.NewBuffer(b)
2014         m.Retval = buf.DecodeInt32()
2015         return nil
2016 }
2017
2018 // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
2019 type SwInterfaceSetL2Xconnect struct {
2020         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2021         TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
2022         Enable      bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
2023 }
2024
2025 func (m *SwInterfaceSetL2Xconnect) Reset()               { *m = SwInterfaceSetL2Xconnect{} }
2026 func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
2027 func (*SwInterfaceSetL2Xconnect) GetCrcString() string   { return "1aaa2dbb" }
2028 func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
2029         return api.RequestMessage
2030 }
2031
2032 func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
2033         if m == nil {
2034                 return 0
2035         }
2036         size += 4 // m.RxSwIfIndex
2037         size += 4 // m.TxSwIfIndex
2038         size += 1 // m.Enable
2039         return size
2040 }
2041 func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
2042         if b == nil {
2043                 b = make([]byte, m.Size())
2044         }
2045         buf := codec.NewBuffer(b)
2046         buf.EncodeUint32(uint32(m.RxSwIfIndex))
2047         buf.EncodeUint32(uint32(m.TxSwIfIndex))
2048         buf.EncodeBool(m.Enable)
2049         return buf.Bytes(), nil
2050 }
2051 func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
2052         buf := codec.NewBuffer(b)
2053         m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2054         m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2055         m.Enable = buf.DecodeBool()
2056         return nil
2057 }
2058
2059 // SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
2060 type SwInterfaceSetL2XconnectReply struct {
2061         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2062 }
2063
2064 func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
2065 func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
2066         return "sw_interface_set_l2_xconnect_reply"
2067 }
2068 func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
2069 func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
2070         return api.ReplyMessage
2071 }
2072
2073 func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
2074         if m == nil {
2075                 return 0
2076         }
2077         size += 4 // m.Retval
2078         return size
2079 }
2080 func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) {
2081         if b == nil {
2082                 b = make([]byte, m.Size())
2083         }
2084         buf := codec.NewBuffer(b)
2085         buf.EncodeInt32(m.Retval)
2086         return buf.Bytes(), nil
2087 }
2088 func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
2089         buf := codec.NewBuffer(b)
2090         m.Retval = buf.DecodeInt32()
2091         return nil
2092 }
2093
2094 // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
2095 type SwInterfaceSetVpath struct {
2096         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2097         Enable    bool                           `binapi:"bool,name=enable,default=4.294967295e+09" json:"enable,omitempty"`
2098 }
2099
2100 func (m *SwInterfaceSetVpath) Reset()               { *m = SwInterfaceSetVpath{} }
2101 func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
2102 func (*SwInterfaceSetVpath) GetCrcString() string   { return "ae6cfcfb" }
2103 func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
2104         return api.RequestMessage
2105 }
2106
2107 func (m *SwInterfaceSetVpath) Size() (size int) {
2108         if m == nil {
2109                 return 0
2110         }
2111         size += 4 // m.SwIfIndex
2112         size += 1 // m.Enable
2113         return size
2114 }
2115 func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
2116         if b == nil {
2117                 b = make([]byte, m.Size())
2118         }
2119         buf := codec.NewBuffer(b)
2120         buf.EncodeUint32(uint32(m.SwIfIndex))
2121         buf.EncodeBool(m.Enable)
2122         return buf.Bytes(), nil
2123 }
2124 func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
2125         buf := codec.NewBuffer(b)
2126         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2127         m.Enable = buf.DecodeBool()
2128         return nil
2129 }
2130
2131 // SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
2132 type SwInterfaceSetVpathReply struct {
2133         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2134 }
2135
2136 func (m *SwInterfaceSetVpathReply) Reset()               { *m = SwInterfaceSetVpathReply{} }
2137 func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
2138 func (*SwInterfaceSetVpathReply) GetCrcString() string   { return "e8d4e804" }
2139 func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
2140         return api.ReplyMessage
2141 }
2142
2143 func (m *SwInterfaceSetVpathReply) Size() (size int) {
2144         if m == nil {
2145                 return 0
2146         }
2147         size += 4 // m.Retval
2148         return size
2149 }
2150 func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) {
2151         if b == nil {
2152                 b = make([]byte, m.Size())
2153         }
2154         buf := codec.NewBuffer(b)
2155         buf.EncodeInt32(m.Retval)
2156         return buf.Bytes(), nil
2157 }
2158 func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
2159         buf := codec.NewBuffer(b)
2160         m.Retval = buf.DecodeInt32()
2161         return nil
2162 }
2163
2164 // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
2165 type WantL2ArpTermEvents struct {
2166         Enable bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
2167         PID    uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2168 }
2169
2170 func (m *WantL2ArpTermEvents) Reset()               { *m = WantL2ArpTermEvents{} }
2171 func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
2172 func (*WantL2ArpTermEvents) GetCrcString() string   { return "3ec6d6c2" }
2173 func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
2174         return api.RequestMessage
2175 }
2176
2177 func (m *WantL2ArpTermEvents) Size() (size int) {
2178         if m == nil {
2179                 return 0
2180         }
2181         size += 1 // m.Enable
2182         size += 4 // m.PID
2183         return size
2184 }
2185 func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
2186         if b == nil {
2187                 b = make([]byte, m.Size())
2188         }
2189         buf := codec.NewBuffer(b)
2190         buf.EncodeBool(m.Enable)
2191         buf.EncodeUint32(m.PID)
2192         return buf.Bytes(), nil
2193 }
2194 func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
2195         buf := codec.NewBuffer(b)
2196         m.Enable = buf.DecodeBool()
2197         m.PID = buf.DecodeUint32()
2198         return nil
2199 }
2200
2201 // WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
2202 type WantL2ArpTermEventsReply struct {
2203         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2204 }
2205
2206 func (m *WantL2ArpTermEventsReply) Reset()               { *m = WantL2ArpTermEventsReply{} }
2207 func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
2208 func (*WantL2ArpTermEventsReply) GetCrcString() string   { return "e8d4e804" }
2209 func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
2210         return api.ReplyMessage
2211 }
2212
2213 func (m *WantL2ArpTermEventsReply) Size() (size int) {
2214         if m == nil {
2215                 return 0
2216         }
2217         size += 4 // m.Retval
2218         return size
2219 }
2220 func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) {
2221         if b == nil {
2222                 b = make([]byte, m.Size())
2223         }
2224         buf := codec.NewBuffer(b)
2225         buf.EncodeInt32(m.Retval)
2226         return buf.Bytes(), nil
2227 }
2228 func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
2229         buf := codec.NewBuffer(b)
2230         m.Retval = buf.DecodeInt32()
2231         return nil
2232 }
2233
2234 // WantL2MacsEvents defines message 'want_l2_macs_events'.
2235 type WantL2MacsEvents struct {
2236         LearnLimit     uint32 `binapi:"u32,name=learn_limit,default=1000" json:"learn_limit,omitempty"`
2237         ScanDelay      uint8  `binapi:"u8,name=scan_delay,default=10" json:"scan_delay,omitempty"`
2238         MaxMacsInEvent uint8  `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"`
2239         EnableDisable  bool   `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
2240         PID            uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2241 }
2242
2243 func (m *WantL2MacsEvents) Reset()               { *m = WantL2MacsEvents{} }
2244 func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
2245 func (*WantL2MacsEvents) GetCrcString() string   { return "9aabdfde" }
2246 func (*WantL2MacsEvents) GetMessageType() api.MessageType {
2247         return api.RequestMessage
2248 }
2249
2250 func (m *WantL2MacsEvents) Size() (size int) {
2251         if m == nil {
2252                 return 0
2253         }
2254         size += 4 // m.LearnLimit
2255         size += 1 // m.ScanDelay
2256         size += 1 // m.MaxMacsInEvent
2257         size += 1 // m.EnableDisable
2258         size += 4 // m.PID
2259         return size
2260 }
2261 func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
2262         if b == nil {
2263                 b = make([]byte, m.Size())
2264         }
2265         buf := codec.NewBuffer(b)
2266         buf.EncodeUint32(m.LearnLimit)
2267         buf.EncodeUint8(m.ScanDelay)
2268         buf.EncodeUint8(m.MaxMacsInEvent)
2269         buf.EncodeBool(m.EnableDisable)
2270         buf.EncodeUint32(m.PID)
2271         return buf.Bytes(), nil
2272 }
2273 func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
2274         buf := codec.NewBuffer(b)
2275         m.LearnLimit = buf.DecodeUint32()
2276         m.ScanDelay = buf.DecodeUint8()
2277         m.MaxMacsInEvent = buf.DecodeUint8()
2278         m.EnableDisable = buf.DecodeBool()
2279         m.PID = buf.DecodeUint32()
2280         return nil
2281 }
2282
2283 // WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
2284 type WantL2MacsEventsReply struct {
2285         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2286 }
2287
2288 func (m *WantL2MacsEventsReply) Reset()               { *m = WantL2MacsEventsReply{} }
2289 func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
2290 func (*WantL2MacsEventsReply) GetCrcString() string   { return "e8d4e804" }
2291 func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
2292         return api.ReplyMessage
2293 }
2294
2295 func (m *WantL2MacsEventsReply) Size() (size int) {
2296         if m == nil {
2297                 return 0
2298         }
2299         size += 4 // m.Retval
2300         return size
2301 }
2302 func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) {
2303         if b == nil {
2304                 b = make([]byte, m.Size())
2305         }
2306         buf := codec.NewBuffer(b)
2307         buf.EncodeInt32(m.Retval)
2308         return buf.Bytes(), nil
2309 }
2310 func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error {
2311         buf := codec.NewBuffer(b)
2312         m.Retval = buf.DecodeInt32()
2313         return nil
2314 }
2315
2316 func init() { file_l2_binapi_init() }
2317 func file_l2_binapi_init() {
2318         api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_5f2b84e2")
2319         api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
2320         api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_a52f8044")
2321         api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
2322         api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
2323         api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
2324         api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_600b7170")
2325         api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
2326         api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_979f549d")
2327         api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_74396a43")
2328         api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
2329         api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
2330         api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_1b0c5fbd")
2331         api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
2332         api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
2333         api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_5383d31f")
2334         api.RegisterMessage((*BviDelete)(nil), "bvi_delete_f9e6675e")
2335         api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
2336         api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_85ff71ea")
2337         api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
2338         api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
2339         api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_e8d2fc72")
2340         api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
2341         api.RegisterMessage((*L2Flags)(nil), "l2_flags_fc41cfe8")
2342         api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
2343         api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_5501adee")
2344         api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
2345         api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_612efa5a")
2346         api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
2347         api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_62cc0bbc")
2348         api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
2349         api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_2eadfc8b")
2350         api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_522f3445")
2351         api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
2352         api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_c8aa6b37")
2353         api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
2354         api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_f29d796c")
2355         api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
2356         api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
2357         api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
2358         api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
2359         api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
2360         api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_f9e6675e")
2361         api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
2362         api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_2e483cd0")
2363         api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
2364         api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_1aaa2dbb")
2365         api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
2366         api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_ae6cfcfb")
2367         api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
2368         api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
2369         api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
2370         api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
2371         api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
2372 }
2373
2374 // Messages returns list of all messages in this module.
2375 func AllMessages() []api.Message {
2376         return []api.Message{
2377                 (*BdIPMacAddDel)(nil),
2378                 (*BdIPMacAddDelReply)(nil),
2379                 (*BdIPMacDetails)(nil),
2380                 (*BdIPMacDump)(nil),
2381                 (*BdIPMacFlush)(nil),
2382                 (*BdIPMacFlushReply)(nil),
2383                 (*BridgeDomainAddDel)(nil),
2384                 (*BridgeDomainAddDelReply)(nil),
2385                 (*BridgeDomainDetails)(nil),
2386                 (*BridgeDomainDump)(nil),
2387                 (*BridgeDomainSetMacAge)(nil),
2388                 (*BridgeDomainSetMacAgeReply)(nil),
2389                 (*BridgeFlags)(nil),
2390                 (*BridgeFlagsReply)(nil),
2391                 (*BviCreate)(nil),
2392                 (*BviCreateReply)(nil),
2393                 (*BviDelete)(nil),
2394                 (*BviDeleteReply)(nil),
2395                 (*L2ArpTermEvent)(nil),
2396                 (*L2FibClearTable)(nil),
2397                 (*L2FibClearTableReply)(nil),
2398                 (*L2FibTableDetails)(nil),
2399                 (*L2FibTableDump)(nil),
2400                 (*L2Flags)(nil),
2401                 (*L2FlagsReply)(nil),
2402                 (*L2InterfaceEfpFilter)(nil),
2403                 (*L2InterfaceEfpFilterReply)(nil),
2404                 (*L2InterfacePbbTagRewrite)(nil),
2405                 (*L2InterfacePbbTagRewriteReply)(nil),
2406                 (*L2InterfaceVlanTagRewrite)(nil),
2407                 (*L2InterfaceVlanTagRewriteReply)(nil),
2408                 (*L2MacsEvent)(nil),
2409                 (*L2PatchAddDel)(nil),
2410                 (*L2PatchAddDelReply)(nil),
2411                 (*L2XconnectDetails)(nil),
2412                 (*L2XconnectDump)(nil),
2413                 (*L2fibAddDel)(nil),
2414                 (*L2fibAddDelReply)(nil),
2415                 (*L2fibFlushAll)(nil),
2416                 (*L2fibFlushAllReply)(nil),
2417                 (*L2fibFlushBd)(nil),
2418                 (*L2fibFlushBdReply)(nil),
2419                 (*L2fibFlushInt)(nil),
2420                 (*L2fibFlushIntReply)(nil),
2421                 (*SwInterfaceSetL2Bridge)(nil),
2422                 (*SwInterfaceSetL2BridgeReply)(nil),
2423                 (*SwInterfaceSetL2Xconnect)(nil),
2424                 (*SwInterfaceSetL2XconnectReply)(nil),
2425                 (*SwInterfaceSetVpath)(nil),
2426                 (*SwInterfaceSetVpathReply)(nil),
2427                 (*WantL2ArpTermEvents)(nil),
2428                 (*WantL2ArpTermEventsReply)(nil),
2429                 (*WantL2MacsEvents)(nil),
2430                 (*WantL2MacsEventsReply)(nil),
2431         }
2432 }