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