1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/core/l2.api.json
7 // Package l2 contains generated bindings for API file l2.api.
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"
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
35 VersionCrc = 0xfc6b8fd2
38 // BdFlags defines enum 'bd_flags'.
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
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",
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,
72 func (x BdFlags) String() string {
73 s, ok := BdFlags_name[uint32(x)]
77 str := func(n uint32) string {
78 s, ok := BdFlags_name[uint32(n)]
82 return "BdFlags(" + strconv.Itoa(int(n)) + ")"
84 for i := uint32(0); i <= 32; i++ {
99 // L2PortType defines enum 'l2_port_type'.
100 type L2PortType uint32
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
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",
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,
121 func (x L2PortType) String() string {
122 s, ok := L2PortType_name[uint32(x)]
126 return "L2PortType(" + strconv.Itoa(int(x)) + ")"
129 // MacEventAction defines enum 'mac_event_action'.
130 type MacEventAction uint32
133 MAC_EVENT_ACTION_API_ADD MacEventAction = 0
134 MAC_EVENT_ACTION_API_DELETE MacEventAction = 1
135 MAC_EVENT_ACTION_API_MOVE MacEventAction = 2
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",
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,
151 func (x MacEventAction) String() string {
152 s, ok := MacEventAction_name[uint32(x)]
156 return "MacEventAction(" + strconv.Itoa(int(x)) + ")"
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"`
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"`
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"`
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"`
187 func (m *BdIPMacAddDel) Reset() { *m = BdIPMacAddDel{} }
188 func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
189 func (*BdIPMacAddDel) GetCrcString() string { return "0257c869" }
190 func (*BdIPMacAddDel) GetMessageType() api.MessageType {
191 return api.RequestMessage
194 func (m *BdIPMacAddDel) Size() (size int) {
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
205 func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
207 b = make([]byte, m.Size())
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
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))
227 // BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
228 type BdIPMacAddDelReply struct {
229 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
239 func (m *BdIPMacAddDelReply) Size() (size int) {
243 size += 4 // m.Retval
246 func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) {
248 b = make([]byte, m.Size())
250 buf := codec.NewBuffer(b)
251 buf.EncodeInt32(m.Retval)
252 return buf.Bytes(), nil
254 func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error {
255 buf := codec.NewBuffer(b)
256 m.Retval = buf.DecodeInt32()
260 // BdIPMacDetails defines message 'bd_ip_mac_details'.
261 type BdIPMacDetails struct {
262 Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
265 func (m *BdIPMacDetails) Reset() { *m = BdIPMacDetails{} }
266 func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
267 func (*BdIPMacDetails) GetCrcString() string { return "545af86a" }
268 func (*BdIPMacDetails) GetMessageType() api.MessageType {
269 return api.ReplyMessage
272 func (m *BdIPMacDetails) Size() (size int) {
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
282 func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
284 b = make([]byte, m.Size())
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
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))
302 // BdIPMacDump defines message 'bd_ip_mac_dump'.
303 type BdIPMacDump struct {
304 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
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
314 func (m *BdIPMacDump) Size() (size int) {
321 func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
323 b = make([]byte, m.Size())
325 buf := codec.NewBuffer(b)
326 buf.EncodeUint32(m.BdID)
327 return buf.Bytes(), nil
329 func (m *BdIPMacDump) Unmarshal(b []byte) error {
330 buf := codec.NewBuffer(b)
331 m.BdID = buf.DecodeUint32()
335 // BdIPMacFlush defines message 'bd_ip_mac_flush'.
336 type BdIPMacFlush struct {
337 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
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
347 func (m *BdIPMacFlush) Size() (size int) {
354 func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
356 b = make([]byte, m.Size())
358 buf := codec.NewBuffer(b)
359 buf.EncodeUint32(m.BdID)
360 return buf.Bytes(), nil
362 func (m *BdIPMacFlush) Unmarshal(b []byte) error {
363 buf := codec.NewBuffer(b)
364 m.BdID = buf.DecodeUint32()
368 // BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
369 type BdIPMacFlushReply struct {
370 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
380 func (m *BdIPMacFlushReply) Size() (size int) {
384 size += 4 // m.Retval
387 func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) {
389 b = make([]byte, m.Size())
391 buf := codec.NewBuffer(b)
392 buf.EncodeInt32(m.Retval)
393 return buf.Bytes(), nil
395 func (m *BdIPMacFlushReply) Unmarshal(b []byte) error {
396 buf := codec.NewBuffer(b)
397 m.Retval = buf.DecodeInt32()
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"`
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
422 func (m *BridgeDomainAddDel) Size() (size int) {
428 size += 1 // m.UuFlood
429 size += 1 // m.Forward
431 size += 1 // m.ArpTerm
432 size += 1 // m.ArpUfwd
433 size += 1 // m.MacAge
434 size += 64 // m.BdTag
438 func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
440 b = make([]byte, m.Size())
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
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()
470 // BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
471 type BridgeDomainAddDelReply struct {
472 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
482 func (m *BridgeDomainAddDelReply) Size() (size int) {
486 size += 4 // m.Retval
489 func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) {
491 b = make([]byte, m.Size())
493 buf := codec.NewBuffer(b)
494 buf.EncodeInt32(m.Retval)
495 return buf.Bytes(), nil
497 func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
498 buf := codec.NewBuffer(b)
499 m.Retval = buf.DecodeInt32()
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"`
520 func (m *BridgeDomainDetails) Reset() { *m = BridgeDomainDetails{} }
521 func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
522 func (*BridgeDomainDetails) GetCrcString() string { return "0fa506fd" }
523 func (*BridgeDomainDetails) GetMessageType() api.MessageType {
524 return api.ReplyMessage
527 func (m *BridgeDomainDetails) Size() (size int) {
533 size += 1 // m.UuFlood
534 size += 1 // m.Forward
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
546 if j1 < len(m.SwIfDetails) {
547 s1 = m.SwIfDetails[j1]
549 size += 4 // s1.Context
550 size += 4 // s1.SwIfIndex
555 func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
557 b = make([]byte, m.Size())
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]
577 buf.EncodeUint32(v0.Context)
578 buf.EncodeUint32(uint32(v0.SwIfIndex))
579 buf.EncodeUint8(v0.Shg)
581 return buf.Bytes(), nil
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()
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"`
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
619 func (m *BridgeDomainDump) Size() (size int) {
624 size += 4 // m.SwIfIndex
627 func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
629 b = make([]byte, m.Size())
631 buf := codec.NewBuffer(b)
632 buf.EncodeUint32(m.BdID)
633 buf.EncodeUint32(uint32(m.SwIfIndex))
634 return buf.Bytes(), nil
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())
643 // BridgeDomainSetDefaultLearnLimit defines message 'bridge_domain_set_default_learn_limit'.
644 type BridgeDomainSetDefaultLearnLimit struct {
645 LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
648 func (m *BridgeDomainSetDefaultLearnLimit) Reset() { *m = BridgeDomainSetDefaultLearnLimit{} }
649 func (*BridgeDomainSetDefaultLearnLimit) GetMessageName() string {
650 return "bridge_domain_set_default_learn_limit"
652 func (*BridgeDomainSetDefaultLearnLimit) GetCrcString() string { return "f097ffce" }
653 func (*BridgeDomainSetDefaultLearnLimit) GetMessageType() api.MessageType {
654 return api.RequestMessage
657 func (m *BridgeDomainSetDefaultLearnLimit) Size() (size int) {
661 size += 4 // m.LearnLimit
664 func (m *BridgeDomainSetDefaultLearnLimit) Marshal(b []byte) ([]byte, error) {
666 b = make([]byte, m.Size())
668 buf := codec.NewBuffer(b)
669 buf.EncodeUint32(m.LearnLimit)
670 return buf.Bytes(), nil
672 func (m *BridgeDomainSetDefaultLearnLimit) Unmarshal(b []byte) error {
673 buf := codec.NewBuffer(b)
674 m.LearnLimit = buf.DecodeUint32()
678 // BridgeDomainSetDefaultLearnLimitReply defines message 'bridge_domain_set_default_learn_limit_reply'.
679 type BridgeDomainSetDefaultLearnLimitReply struct {
680 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
683 func (m *BridgeDomainSetDefaultLearnLimitReply) Reset() { *m = BridgeDomainSetDefaultLearnLimitReply{} }
684 func (*BridgeDomainSetDefaultLearnLimitReply) GetMessageName() string {
685 return "bridge_domain_set_default_learn_limit_reply"
687 func (*BridgeDomainSetDefaultLearnLimitReply) GetCrcString() string { return "e8d4e804" }
688 func (*BridgeDomainSetDefaultLearnLimitReply) GetMessageType() api.MessageType {
689 return api.ReplyMessage
692 func (m *BridgeDomainSetDefaultLearnLimitReply) Size() (size int) {
696 size += 4 // m.Retval
699 func (m *BridgeDomainSetDefaultLearnLimitReply) Marshal(b []byte) ([]byte, error) {
701 b = make([]byte, m.Size())
703 buf := codec.NewBuffer(b)
704 buf.EncodeInt32(m.Retval)
705 return buf.Bytes(), nil
707 func (m *BridgeDomainSetDefaultLearnLimitReply) Unmarshal(b []byte) error {
708 buf := codec.NewBuffer(b)
709 m.Retval = buf.DecodeInt32()
713 // BridgeDomainSetLearnLimit defines message 'bridge_domain_set_learn_limit'.
714 type BridgeDomainSetLearnLimit struct {
715 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
716 LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
719 func (m *BridgeDomainSetLearnLimit) Reset() { *m = BridgeDomainSetLearnLimit{} }
720 func (*BridgeDomainSetLearnLimit) GetMessageName() string { return "bridge_domain_set_learn_limit" }
721 func (*BridgeDomainSetLearnLimit) GetCrcString() string { return "89c52b5f" }
722 func (*BridgeDomainSetLearnLimit) GetMessageType() api.MessageType {
723 return api.RequestMessage
726 func (m *BridgeDomainSetLearnLimit) Size() (size int) {
731 size += 4 // m.LearnLimit
734 func (m *BridgeDomainSetLearnLimit) Marshal(b []byte) ([]byte, error) {
736 b = make([]byte, m.Size())
738 buf := codec.NewBuffer(b)
739 buf.EncodeUint32(m.BdID)
740 buf.EncodeUint32(m.LearnLimit)
741 return buf.Bytes(), nil
743 func (m *BridgeDomainSetLearnLimit) Unmarshal(b []byte) error {
744 buf := codec.NewBuffer(b)
745 m.BdID = buf.DecodeUint32()
746 m.LearnLimit = buf.DecodeUint32()
750 // BridgeDomainSetLearnLimitReply defines message 'bridge_domain_set_learn_limit_reply'.
751 type BridgeDomainSetLearnLimitReply struct {
752 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
755 func (m *BridgeDomainSetLearnLimitReply) Reset() { *m = BridgeDomainSetLearnLimitReply{} }
756 func (*BridgeDomainSetLearnLimitReply) GetMessageName() string {
757 return "bridge_domain_set_learn_limit_reply"
759 func (*BridgeDomainSetLearnLimitReply) GetCrcString() string { return "e8d4e804" }
760 func (*BridgeDomainSetLearnLimitReply) GetMessageType() api.MessageType {
761 return api.ReplyMessage
764 func (m *BridgeDomainSetLearnLimitReply) Size() (size int) {
768 size += 4 // m.Retval
771 func (m *BridgeDomainSetLearnLimitReply) Marshal(b []byte) ([]byte, error) {
773 b = make([]byte, m.Size())
775 buf := codec.NewBuffer(b)
776 buf.EncodeInt32(m.Retval)
777 return buf.Bytes(), nil
779 func (m *BridgeDomainSetLearnLimitReply) Unmarshal(b []byte) error {
780 buf := codec.NewBuffer(b)
781 m.Retval = buf.DecodeInt32()
785 // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
786 type BridgeDomainSetMacAge struct {
787 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
788 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
791 func (m *BridgeDomainSetMacAge) Reset() { *m = BridgeDomainSetMacAge{} }
792 func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
793 func (*BridgeDomainSetMacAge) GetCrcString() string { return "b537ad7b" }
794 func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
795 return api.RequestMessage
798 func (m *BridgeDomainSetMacAge) Size() (size int) {
803 size += 1 // m.MacAge
806 func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
808 b = make([]byte, m.Size())
810 buf := codec.NewBuffer(b)
811 buf.EncodeUint32(m.BdID)
812 buf.EncodeUint8(m.MacAge)
813 return buf.Bytes(), nil
815 func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
816 buf := codec.NewBuffer(b)
817 m.BdID = buf.DecodeUint32()
818 m.MacAge = buf.DecodeUint8()
822 // BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
823 type BridgeDomainSetMacAgeReply struct {
824 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
827 func (m *BridgeDomainSetMacAgeReply) Reset() { *m = BridgeDomainSetMacAgeReply{} }
828 func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
829 func (*BridgeDomainSetMacAgeReply) GetCrcString() string { return "e8d4e804" }
830 func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
831 return api.ReplyMessage
834 func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
838 size += 4 // m.Retval
841 func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) {
843 b = make([]byte, m.Size())
845 buf := codec.NewBuffer(b)
846 buf.EncodeInt32(m.Retval)
847 return buf.Bytes(), nil
849 func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
850 buf := codec.NewBuffer(b)
851 m.Retval = buf.DecodeInt32()
855 // BridgeFlags defines message 'bridge_flags'.
856 type BridgeFlags struct {
857 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
858 IsSet bool `binapi:"bool,name=is_set" json:"is_set,omitempty"`
859 Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
862 func (m *BridgeFlags) Reset() { *m = BridgeFlags{} }
863 func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
864 func (*BridgeFlags) GetCrcString() string { return "1b0c5fbd" }
865 func (*BridgeFlags) GetMessageType() api.MessageType {
866 return api.RequestMessage
869 func (m *BridgeFlags) Size() (size int) {
878 func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
880 b = make([]byte, m.Size())
882 buf := codec.NewBuffer(b)
883 buf.EncodeUint32(m.BdID)
884 buf.EncodeBool(m.IsSet)
885 buf.EncodeUint32(uint32(m.Flags))
886 return buf.Bytes(), nil
888 func (m *BridgeFlags) Unmarshal(b []byte) error {
889 buf := codec.NewBuffer(b)
890 m.BdID = buf.DecodeUint32()
891 m.IsSet = buf.DecodeBool()
892 m.Flags = BdFlags(buf.DecodeUint32())
896 // BridgeFlagsReply defines message 'bridge_flags_reply'.
897 type BridgeFlagsReply struct {
898 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
899 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
902 func (m *BridgeFlagsReply) Reset() { *m = BridgeFlagsReply{} }
903 func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
904 func (*BridgeFlagsReply) GetCrcString() string { return "29b2a2b3" }
905 func (*BridgeFlagsReply) GetMessageType() api.MessageType {
906 return api.ReplyMessage
909 func (m *BridgeFlagsReply) Size() (size int) {
913 size += 4 // m.Retval
914 size += 4 // m.ResultingFeatureBitmap
917 func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
919 b = make([]byte, m.Size())
921 buf := codec.NewBuffer(b)
922 buf.EncodeInt32(m.Retval)
923 buf.EncodeUint32(m.ResultingFeatureBitmap)
924 return buf.Bytes(), nil
926 func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
927 buf := codec.NewBuffer(b)
928 m.Retval = buf.DecodeInt32()
929 m.ResultingFeatureBitmap = buf.DecodeUint32()
933 // BviCreate defines message 'bvi_create'.
934 type BviCreate struct {
935 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
936 UserInstance uint32 `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"`
939 func (m *BviCreate) Reset() { *m = BviCreate{} }
940 func (*BviCreate) GetMessageName() string { return "bvi_create" }
941 func (*BviCreate) GetCrcString() string { return "f5398559" }
942 func (*BviCreate) GetMessageType() api.MessageType {
943 return api.RequestMessage
946 func (m *BviCreate) Size() (size int) {
950 size += 1 * 6 // m.Mac
951 size += 4 // m.UserInstance
954 func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
956 b = make([]byte, m.Size())
958 buf := codec.NewBuffer(b)
959 buf.EncodeBytes(m.Mac[:], 6)
960 buf.EncodeUint32(m.UserInstance)
961 return buf.Bytes(), nil
963 func (m *BviCreate) Unmarshal(b []byte) error {
964 buf := codec.NewBuffer(b)
965 copy(m.Mac[:], buf.DecodeBytes(6))
966 m.UserInstance = buf.DecodeUint32()
970 // BviCreateReply defines message 'bvi_create_reply'.
971 type BviCreateReply struct {
972 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
973 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
976 func (m *BviCreateReply) Reset() { *m = BviCreateReply{} }
977 func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
978 func (*BviCreateReply) GetCrcString() string { return "5383d31f" }
979 func (*BviCreateReply) GetMessageType() api.MessageType {
980 return api.ReplyMessage
983 func (m *BviCreateReply) Size() (size int) {
987 size += 4 // m.Retval
988 size += 4 // m.SwIfIndex
991 func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
993 b = make([]byte, m.Size())
995 buf := codec.NewBuffer(b)
996 buf.EncodeInt32(m.Retval)
997 buf.EncodeUint32(uint32(m.SwIfIndex))
998 return buf.Bytes(), nil
1000 func (m *BviCreateReply) Unmarshal(b []byte) error {
1001 buf := codec.NewBuffer(b)
1002 m.Retval = buf.DecodeInt32()
1003 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1007 // BviDelete defines message 'bvi_delete'.
1008 type BviDelete struct {
1009 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1012 func (m *BviDelete) Reset() { *m = BviDelete{} }
1013 func (*BviDelete) GetMessageName() string { return "bvi_delete" }
1014 func (*BviDelete) GetCrcString() string { return "f9e6675e" }
1015 func (*BviDelete) GetMessageType() api.MessageType {
1016 return api.RequestMessage
1019 func (m *BviDelete) Size() (size int) {
1023 size += 4 // m.SwIfIndex
1026 func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
1028 b = make([]byte, m.Size())
1030 buf := codec.NewBuffer(b)
1031 buf.EncodeUint32(uint32(m.SwIfIndex))
1032 return buf.Bytes(), nil
1034 func (m *BviDelete) Unmarshal(b []byte) error {
1035 buf := codec.NewBuffer(b)
1036 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1040 // BviDeleteReply defines message 'bvi_delete_reply'.
1041 type BviDeleteReply struct {
1042 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1045 func (m *BviDeleteReply) Reset() { *m = BviDeleteReply{} }
1046 func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
1047 func (*BviDeleteReply) GetCrcString() string { return "e8d4e804" }
1048 func (*BviDeleteReply) GetMessageType() api.MessageType {
1049 return api.ReplyMessage
1052 func (m *BviDeleteReply) Size() (size int) {
1056 size += 4 // m.Retval
1059 func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) {
1061 b = make([]byte, m.Size())
1063 buf := codec.NewBuffer(b)
1064 buf.EncodeInt32(m.Retval)
1065 return buf.Bytes(), nil
1067 func (m *BviDeleteReply) Unmarshal(b []byte) error {
1068 buf := codec.NewBuffer(b)
1069 m.Retval = buf.DecodeInt32()
1073 // L2ArpTermEvent defines message 'l2_arp_term_event'.
1074 type L2ArpTermEvent struct {
1075 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1076 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
1077 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1078 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1081 func (m *L2ArpTermEvent) Reset() { *m = L2ArpTermEvent{} }
1082 func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
1083 func (*L2ArpTermEvent) GetCrcString() string { return "6963e07a" }
1084 func (*L2ArpTermEvent) GetMessageType() api.MessageType {
1085 return api.EventMessage
1088 func (m *L2ArpTermEvent) Size() (size int) {
1093 size += 1 // m.IP.Af
1094 size += 1 * 16 // m.IP.Un
1095 size += 4 // m.SwIfIndex
1096 size += 1 * 6 // m.Mac
1099 func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
1101 b = make([]byte, m.Size())
1103 buf := codec.NewBuffer(b)
1104 buf.EncodeUint32(m.PID)
1105 buf.EncodeUint8(uint8(m.IP.Af))
1106 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
1107 buf.EncodeUint32(uint32(m.SwIfIndex))
1108 buf.EncodeBytes(m.Mac[:], 6)
1109 return buf.Bytes(), nil
1111 func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
1112 buf := codec.NewBuffer(b)
1113 m.PID = buf.DecodeUint32()
1114 m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
1115 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1116 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1117 copy(m.Mac[:], buf.DecodeBytes(6))
1121 // L2FibClearTable defines message 'l2_fib_clear_table'.
1122 type L2FibClearTable struct{}
1124 func (m *L2FibClearTable) Reset() { *m = L2FibClearTable{} }
1125 func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
1126 func (*L2FibClearTable) GetCrcString() string { return "51077d14" }
1127 func (*L2FibClearTable) GetMessageType() api.MessageType {
1128 return api.RequestMessage
1131 func (m *L2FibClearTable) Size() (size int) {
1137 func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
1139 b = make([]byte, m.Size())
1141 buf := codec.NewBuffer(b)
1142 return buf.Bytes(), nil
1144 func (m *L2FibClearTable) Unmarshal(b []byte) error {
1148 // L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
1149 type L2FibClearTableReply struct {
1150 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1153 func (m *L2FibClearTableReply) Reset() { *m = L2FibClearTableReply{} }
1154 func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
1155 func (*L2FibClearTableReply) GetCrcString() string { return "e8d4e804" }
1156 func (*L2FibClearTableReply) GetMessageType() api.MessageType {
1157 return api.ReplyMessage
1160 func (m *L2FibClearTableReply) Size() (size int) {
1164 size += 4 // m.Retval
1167 func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) {
1169 b = make([]byte, m.Size())
1171 buf := codec.NewBuffer(b)
1172 buf.EncodeInt32(m.Retval)
1173 return buf.Bytes(), nil
1175 func (m *L2FibClearTableReply) Unmarshal(b []byte) error {
1176 buf := codec.NewBuffer(b)
1177 m.Retval = buf.DecodeInt32()
1181 // L2FibTableDetails defines message 'l2_fib_table_details'.
1182 type L2FibTableDetails struct {
1183 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1184 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1185 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1186 StaticMac bool `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
1187 FilterMac bool `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
1188 BviMac bool `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
1191 func (m *L2FibTableDetails) Reset() { *m = L2FibTableDetails{} }
1192 func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
1193 func (*L2FibTableDetails) GetCrcString() string { return "a44ef6b8" }
1194 func (*L2FibTableDetails) GetMessageType() api.MessageType {
1195 return api.ReplyMessage
1198 func (m *L2FibTableDetails) Size() (size int) {
1203 size += 1 * 6 // m.Mac
1204 size += 4 // m.SwIfIndex
1205 size += 1 // m.StaticMac
1206 size += 1 // m.FilterMac
1207 size += 1 // m.BviMac
1210 func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
1212 b = make([]byte, m.Size())
1214 buf := codec.NewBuffer(b)
1215 buf.EncodeUint32(m.BdID)
1216 buf.EncodeBytes(m.Mac[:], 6)
1217 buf.EncodeUint32(uint32(m.SwIfIndex))
1218 buf.EncodeBool(m.StaticMac)
1219 buf.EncodeBool(m.FilterMac)
1220 buf.EncodeBool(m.BviMac)
1221 return buf.Bytes(), nil
1223 func (m *L2FibTableDetails) Unmarshal(b []byte) error {
1224 buf := codec.NewBuffer(b)
1225 m.BdID = buf.DecodeUint32()
1226 copy(m.Mac[:], buf.DecodeBytes(6))
1227 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1228 m.StaticMac = buf.DecodeBool()
1229 m.FilterMac = buf.DecodeBool()
1230 m.BviMac = buf.DecodeBool()
1234 // L2FibTableDump defines message 'l2_fib_table_dump'.
1235 type L2FibTableDump struct {
1236 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1239 func (m *L2FibTableDump) Reset() { *m = L2FibTableDump{} }
1240 func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
1241 func (*L2FibTableDump) GetCrcString() string { return "c25fdce6" }
1242 func (*L2FibTableDump) GetMessageType() api.MessageType {
1243 return api.RequestMessage
1246 func (m *L2FibTableDump) Size() (size int) {
1253 func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
1255 b = make([]byte, m.Size())
1257 buf := codec.NewBuffer(b)
1258 buf.EncodeUint32(m.BdID)
1259 return buf.Bytes(), nil
1261 func (m *L2FibTableDump) Unmarshal(b []byte) error {
1262 buf := codec.NewBuffer(b)
1263 m.BdID = buf.DecodeUint32()
1267 // L2Flags defines message 'l2_flags'.
1268 type L2Flags struct {
1269 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1270 IsSet bool `binapi:"bool,name=is_set" json:"is_set,omitempty"`
1271 FeatureBitmap uint32 `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
1274 func (m *L2Flags) Reset() { *m = L2Flags{} }
1275 func (*L2Flags) GetMessageName() string { return "l2_flags" }
1276 func (*L2Flags) GetCrcString() string { return "fc41cfe8" }
1277 func (*L2Flags) GetMessageType() api.MessageType {
1278 return api.RequestMessage
1281 func (m *L2Flags) Size() (size int) {
1285 size += 4 // m.SwIfIndex
1286 size += 1 // m.IsSet
1287 size += 4 // m.FeatureBitmap
1290 func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
1292 b = make([]byte, m.Size())
1294 buf := codec.NewBuffer(b)
1295 buf.EncodeUint32(uint32(m.SwIfIndex))
1296 buf.EncodeBool(m.IsSet)
1297 buf.EncodeUint32(m.FeatureBitmap)
1298 return buf.Bytes(), nil
1300 func (m *L2Flags) Unmarshal(b []byte) error {
1301 buf := codec.NewBuffer(b)
1302 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1303 m.IsSet = buf.DecodeBool()
1304 m.FeatureBitmap = buf.DecodeUint32()
1308 // L2FlagsReply defines message 'l2_flags_reply'.
1309 type L2FlagsReply struct {
1310 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1311 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
1314 func (m *L2FlagsReply) Reset() { *m = L2FlagsReply{} }
1315 func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
1316 func (*L2FlagsReply) GetCrcString() string { return "29b2a2b3" }
1317 func (*L2FlagsReply) GetMessageType() api.MessageType {
1318 return api.ReplyMessage
1321 func (m *L2FlagsReply) Size() (size int) {
1325 size += 4 // m.Retval
1326 size += 4 // m.ResultingFeatureBitmap
1329 func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
1331 b = make([]byte, m.Size())
1333 buf := codec.NewBuffer(b)
1334 buf.EncodeInt32(m.Retval)
1335 buf.EncodeUint32(m.ResultingFeatureBitmap)
1336 return buf.Bytes(), nil
1338 func (m *L2FlagsReply) Unmarshal(b []byte) error {
1339 buf := codec.NewBuffer(b)
1340 m.Retval = buf.DecodeInt32()
1341 m.ResultingFeatureBitmap = buf.DecodeUint32()
1345 // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
1346 type L2InterfaceEfpFilter struct {
1347 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1348 EnableDisable bool `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
1351 func (m *L2InterfaceEfpFilter) Reset() { *m = L2InterfaceEfpFilter{} }
1352 func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
1353 func (*L2InterfaceEfpFilter) GetCrcString() string { return "5501adee" }
1354 func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
1355 return api.RequestMessage
1358 func (m *L2InterfaceEfpFilter) Size() (size int) {
1362 size += 4 // m.SwIfIndex
1363 size += 1 // m.EnableDisable
1366 func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
1368 b = make([]byte, m.Size())
1370 buf := codec.NewBuffer(b)
1371 buf.EncodeUint32(uint32(m.SwIfIndex))
1372 buf.EncodeBool(m.EnableDisable)
1373 return buf.Bytes(), nil
1375 func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
1376 buf := codec.NewBuffer(b)
1377 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1378 m.EnableDisable = buf.DecodeBool()
1382 // L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
1383 type L2InterfaceEfpFilterReply struct {
1384 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1387 func (m *L2InterfaceEfpFilterReply) Reset() { *m = L2InterfaceEfpFilterReply{} }
1388 func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
1389 func (*L2InterfaceEfpFilterReply) GetCrcString() string { return "e8d4e804" }
1390 func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
1391 return api.ReplyMessage
1394 func (m *L2InterfaceEfpFilterReply) Size() (size int) {
1398 size += 4 // m.Retval
1401 func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) {
1403 b = make([]byte, m.Size())
1405 buf := codec.NewBuffer(b)
1406 buf.EncodeInt32(m.Retval)
1407 return buf.Bytes(), nil
1409 func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
1410 buf := codec.NewBuffer(b)
1411 m.Retval = buf.DecodeInt32()
1415 // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
1416 type L2InterfacePbbTagRewrite struct {
1417 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1418 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1419 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1420 BDmac ethernet_types.MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1421 BSmac ethernet_types.MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1422 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1423 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1426 func (m *L2InterfacePbbTagRewrite) Reset() { *m = L2InterfacePbbTagRewrite{} }
1427 func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
1428 func (*L2InterfacePbbTagRewrite) GetCrcString() string { return "38e802a8" }
1429 func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
1430 return api.RequestMessage
1433 func (m *L2InterfacePbbTagRewrite) Size() (size int) {
1437 size += 4 // m.SwIfIndex
1438 size += 4 // m.VtrOp
1439 size += 2 // m.OuterTag
1440 size += 1 * 6 // m.BDmac
1441 size += 1 * 6 // m.BSmac
1442 size += 2 // m.BVlanid
1446 func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
1448 b = make([]byte, m.Size())
1450 buf := codec.NewBuffer(b)
1451 buf.EncodeUint32(uint32(m.SwIfIndex))
1452 buf.EncodeUint32(m.VtrOp)
1453 buf.EncodeUint16(m.OuterTag)
1454 buf.EncodeBytes(m.BDmac[:], 6)
1455 buf.EncodeBytes(m.BSmac[:], 6)
1456 buf.EncodeUint16(m.BVlanid)
1457 buf.EncodeUint32(m.ISid)
1458 return buf.Bytes(), nil
1460 func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
1461 buf := codec.NewBuffer(b)
1462 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1463 m.VtrOp = buf.DecodeUint32()
1464 m.OuterTag = buf.DecodeUint16()
1465 copy(m.BDmac[:], buf.DecodeBytes(6))
1466 copy(m.BSmac[:], buf.DecodeBytes(6))
1467 m.BVlanid = buf.DecodeUint16()
1468 m.ISid = buf.DecodeUint32()
1472 // L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
1473 type L2InterfacePbbTagRewriteReply struct {
1474 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1477 func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
1478 func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
1479 return "l2_interface_pbb_tag_rewrite_reply"
1481 func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
1482 func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
1483 return api.ReplyMessage
1486 func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
1490 size += 4 // m.Retval
1493 func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) {
1495 b = make([]byte, m.Size())
1497 buf := codec.NewBuffer(b)
1498 buf.EncodeInt32(m.Retval)
1499 return buf.Bytes(), nil
1501 func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
1502 buf := codec.NewBuffer(b)
1503 m.Retval = buf.DecodeInt32()
1507 // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
1508 type L2InterfaceVlanTagRewrite struct {
1509 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1510 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1511 PushDot1q uint32 `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
1512 Tag1 uint32 `binapi:"u32,name=tag1" json:"tag1,omitempty"`
1513 Tag2 uint32 `binapi:"u32,name=tag2" json:"tag2,omitempty"`
1516 func (m *L2InterfaceVlanTagRewrite) Reset() { *m = L2InterfaceVlanTagRewrite{} }
1517 func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
1518 func (*L2InterfaceVlanTagRewrite) GetCrcString() string { return "62cc0bbc" }
1519 func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
1520 return api.RequestMessage
1523 func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
1527 size += 4 // m.SwIfIndex
1528 size += 4 // m.VtrOp
1529 size += 4 // m.PushDot1q
1534 func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
1536 b = make([]byte, m.Size())
1538 buf := codec.NewBuffer(b)
1539 buf.EncodeUint32(uint32(m.SwIfIndex))
1540 buf.EncodeUint32(m.VtrOp)
1541 buf.EncodeUint32(m.PushDot1q)
1542 buf.EncodeUint32(m.Tag1)
1543 buf.EncodeUint32(m.Tag2)
1544 return buf.Bytes(), nil
1546 func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
1547 buf := codec.NewBuffer(b)
1548 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1549 m.VtrOp = buf.DecodeUint32()
1550 m.PushDot1q = buf.DecodeUint32()
1551 m.Tag1 = buf.DecodeUint32()
1552 m.Tag2 = buf.DecodeUint32()
1556 // L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
1557 type L2InterfaceVlanTagRewriteReply struct {
1558 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1561 func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
1562 func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
1563 return "l2_interface_vlan_tag_rewrite_reply"
1565 func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
1566 func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
1567 return api.ReplyMessage
1570 func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
1574 size += 4 // m.Retval
1577 func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) {
1579 b = make([]byte, m.Size())
1581 buf := codec.NewBuffer(b)
1582 buf.EncodeInt32(m.Retval)
1583 return buf.Bytes(), nil
1585 func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
1586 buf := codec.NewBuffer(b)
1587 m.Retval = buf.DecodeInt32()
1591 // L2MacsEvent defines message 'l2_macs_event'.
1592 type L2MacsEvent struct {
1593 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1594 NMacs uint32 `binapi:"u32,name=n_macs" json:"-"`
1595 Mac []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
1598 func (m *L2MacsEvent) Reset() { *m = L2MacsEvent{} }
1599 func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
1600 func (*L2MacsEvent) GetCrcString() string { return "44b8fd64" }
1601 func (*L2MacsEvent) GetMessageType() api.MessageType {
1602 return api.EventMessage
1605 func (m *L2MacsEvent) Size() (size int) {
1610 size += 4 // m.NMacs
1611 for j1 := 0; j1 < len(m.Mac); j1++ {
1614 if j1 < len(m.Mac) {
1617 size += 4 // s1.SwIfIndex
1618 size += 1 * 6 // s1.MacAddr
1619 size += 4 // s1.Action
1620 size += 1 // s1.Flags
1624 func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
1626 b = make([]byte, m.Size())
1628 buf := codec.NewBuffer(b)
1629 buf.EncodeUint32(m.PID)
1630 buf.EncodeUint32(uint32(len(m.Mac)))
1631 for j0 := 0; j0 < len(m.Mac); j0++ {
1632 var v0 MacEntry // Mac
1633 if j0 < len(m.Mac) {
1636 buf.EncodeUint32(uint32(v0.SwIfIndex))
1637 buf.EncodeBytes(v0.MacAddr[:], 6)
1638 buf.EncodeUint32(uint32(v0.Action))
1639 buf.EncodeUint8(v0.Flags)
1641 return buf.Bytes(), nil
1643 func (m *L2MacsEvent) Unmarshal(b []byte) error {
1644 buf := codec.NewBuffer(b)
1645 m.PID = buf.DecodeUint32()
1646 m.NMacs = buf.DecodeUint32()
1647 m.Mac = make([]MacEntry, m.NMacs)
1648 for j0 := 0; j0 < len(m.Mac); j0++ {
1649 m.Mac[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1650 copy(m.Mac[j0].MacAddr[:], buf.DecodeBytes(6))
1651 m.Mac[j0].Action = MacEventAction(buf.DecodeUint32())
1652 m.Mac[j0].Flags = buf.DecodeUint8()
1657 // L2PatchAddDel defines message 'l2_patch_add_del'.
1658 type L2PatchAddDel struct {
1659 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
1660 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
1661 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1664 func (m *L2PatchAddDel) Reset() { *m = L2PatchAddDel{} }
1665 func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
1666 func (*L2PatchAddDel) GetCrcString() string { return "a1f6a6f3" }
1667 func (*L2PatchAddDel) GetMessageType() api.MessageType {
1668 return api.RequestMessage
1671 func (m *L2PatchAddDel) Size() (size int) {
1675 size += 4 // m.RxSwIfIndex
1676 size += 4 // m.TxSwIfIndex
1677 size += 1 // m.IsAdd
1680 func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
1682 b = make([]byte, m.Size())
1684 buf := codec.NewBuffer(b)
1685 buf.EncodeUint32(uint32(m.RxSwIfIndex))
1686 buf.EncodeUint32(uint32(m.TxSwIfIndex))
1687 buf.EncodeBool(m.IsAdd)
1688 return buf.Bytes(), nil
1690 func (m *L2PatchAddDel) Unmarshal(b []byte) error {
1691 buf := codec.NewBuffer(b)
1692 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1693 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1694 m.IsAdd = buf.DecodeBool()
1698 // L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
1699 type L2PatchAddDelReply struct {
1700 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1703 func (m *L2PatchAddDelReply) Reset() { *m = L2PatchAddDelReply{} }
1704 func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
1705 func (*L2PatchAddDelReply) GetCrcString() string { return "e8d4e804" }
1706 func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
1707 return api.ReplyMessage
1710 func (m *L2PatchAddDelReply) Size() (size int) {
1714 size += 4 // m.Retval
1717 func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) {
1719 b = make([]byte, m.Size())
1721 buf := codec.NewBuffer(b)
1722 buf.EncodeInt32(m.Retval)
1723 return buf.Bytes(), nil
1725 func (m *L2PatchAddDelReply) Unmarshal(b []byte) error {
1726 buf := codec.NewBuffer(b)
1727 m.Retval = buf.DecodeInt32()
1731 // L2XconnectDetails defines message 'l2_xconnect_details'.
1732 type L2XconnectDetails struct {
1733 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
1734 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
1737 func (m *L2XconnectDetails) Reset() { *m = L2XconnectDetails{} }
1738 func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
1739 func (*L2XconnectDetails) GetCrcString() string { return "472b6b67" }
1740 func (*L2XconnectDetails) GetMessageType() api.MessageType {
1741 return api.ReplyMessage
1744 func (m *L2XconnectDetails) Size() (size int) {
1748 size += 4 // m.RxSwIfIndex
1749 size += 4 // m.TxSwIfIndex
1752 func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
1754 b = make([]byte, m.Size())
1756 buf := codec.NewBuffer(b)
1757 buf.EncodeUint32(uint32(m.RxSwIfIndex))
1758 buf.EncodeUint32(uint32(m.TxSwIfIndex))
1759 return buf.Bytes(), nil
1761 func (m *L2XconnectDetails) Unmarshal(b []byte) error {
1762 buf := codec.NewBuffer(b)
1763 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1764 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1768 // L2XconnectDump defines message 'l2_xconnect_dump'.
1769 type L2XconnectDump struct{}
1771 func (m *L2XconnectDump) Reset() { *m = L2XconnectDump{} }
1772 func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
1773 func (*L2XconnectDump) GetCrcString() string { return "51077d14" }
1774 func (*L2XconnectDump) GetMessageType() api.MessageType {
1775 return api.RequestMessage
1778 func (m *L2XconnectDump) Size() (size int) {
1784 func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
1786 b = make([]byte, m.Size())
1788 buf := codec.NewBuffer(b)
1789 return buf.Bytes(), nil
1791 func (m *L2XconnectDump) Unmarshal(b []byte) error {
1795 // L2fibAddDel defines message 'l2fib_add_del'.
1796 type L2fibAddDel struct {
1797 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1798 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1799 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1800 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1801 StaticMac bool `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
1802 FilterMac bool `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
1803 BviMac bool `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
1806 func (m *L2fibAddDel) Reset() { *m = L2fibAddDel{} }
1807 func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
1808 func (*L2fibAddDel) GetCrcString() string { return "eddda487" }
1809 func (*L2fibAddDel) GetMessageType() api.MessageType {
1810 return api.RequestMessage
1813 func (m *L2fibAddDel) Size() (size int) {
1817 size += 1 * 6 // m.Mac
1819 size += 4 // m.SwIfIndex
1820 size += 1 // m.IsAdd
1821 size += 1 // m.StaticMac
1822 size += 1 // m.FilterMac
1823 size += 1 // m.BviMac
1826 func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
1828 b = make([]byte, m.Size())
1830 buf := codec.NewBuffer(b)
1831 buf.EncodeBytes(m.Mac[:], 6)
1832 buf.EncodeUint32(m.BdID)
1833 buf.EncodeUint32(uint32(m.SwIfIndex))
1834 buf.EncodeBool(m.IsAdd)
1835 buf.EncodeBool(m.StaticMac)
1836 buf.EncodeBool(m.FilterMac)
1837 buf.EncodeBool(m.BviMac)
1838 return buf.Bytes(), nil
1840 func (m *L2fibAddDel) Unmarshal(b []byte) error {
1841 buf := codec.NewBuffer(b)
1842 copy(m.Mac[:], buf.DecodeBytes(6))
1843 m.BdID = buf.DecodeUint32()
1844 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1845 m.IsAdd = buf.DecodeBool()
1846 m.StaticMac = buf.DecodeBool()
1847 m.FilterMac = buf.DecodeBool()
1848 m.BviMac = buf.DecodeBool()
1852 // L2fibAddDelReply defines message 'l2fib_add_del_reply'.
1853 type L2fibAddDelReply struct {
1854 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1857 func (m *L2fibAddDelReply) Reset() { *m = L2fibAddDelReply{} }
1858 func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
1859 func (*L2fibAddDelReply) GetCrcString() string { return "e8d4e804" }
1860 func (*L2fibAddDelReply) GetMessageType() api.MessageType {
1861 return api.ReplyMessage
1864 func (m *L2fibAddDelReply) Size() (size int) {
1868 size += 4 // m.Retval
1871 func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) {
1873 b = make([]byte, m.Size())
1875 buf := codec.NewBuffer(b)
1876 buf.EncodeInt32(m.Retval)
1877 return buf.Bytes(), nil
1879 func (m *L2fibAddDelReply) Unmarshal(b []byte) error {
1880 buf := codec.NewBuffer(b)
1881 m.Retval = buf.DecodeInt32()
1885 // L2fibFlushAll defines message 'l2fib_flush_all'.
1886 type L2fibFlushAll struct{}
1888 func (m *L2fibFlushAll) Reset() { *m = L2fibFlushAll{} }
1889 func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
1890 func (*L2fibFlushAll) GetCrcString() string { return "51077d14" }
1891 func (*L2fibFlushAll) GetMessageType() api.MessageType {
1892 return api.RequestMessage
1895 func (m *L2fibFlushAll) Size() (size int) {
1901 func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
1903 b = make([]byte, m.Size())
1905 buf := codec.NewBuffer(b)
1906 return buf.Bytes(), nil
1908 func (m *L2fibFlushAll) Unmarshal(b []byte) error {
1912 // L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
1913 type L2fibFlushAllReply struct {
1914 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1917 func (m *L2fibFlushAllReply) Reset() { *m = L2fibFlushAllReply{} }
1918 func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
1919 func (*L2fibFlushAllReply) GetCrcString() string { return "e8d4e804" }
1920 func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
1921 return api.ReplyMessage
1924 func (m *L2fibFlushAllReply) Size() (size int) {
1928 size += 4 // m.Retval
1931 func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) {
1933 b = make([]byte, m.Size())
1935 buf := codec.NewBuffer(b)
1936 buf.EncodeInt32(m.Retval)
1937 return buf.Bytes(), nil
1939 func (m *L2fibFlushAllReply) Unmarshal(b []byte) error {
1940 buf := codec.NewBuffer(b)
1941 m.Retval = buf.DecodeInt32()
1945 // L2fibFlushBd defines message 'l2fib_flush_bd'.
1946 type L2fibFlushBd struct {
1947 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1950 func (m *L2fibFlushBd) Reset() { *m = L2fibFlushBd{} }
1951 func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
1952 func (*L2fibFlushBd) GetCrcString() string { return "c25fdce6" }
1953 func (*L2fibFlushBd) GetMessageType() api.MessageType {
1954 return api.RequestMessage
1957 func (m *L2fibFlushBd) Size() (size int) {
1964 func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
1966 b = make([]byte, m.Size())
1968 buf := codec.NewBuffer(b)
1969 buf.EncodeUint32(m.BdID)
1970 return buf.Bytes(), nil
1972 func (m *L2fibFlushBd) Unmarshal(b []byte) error {
1973 buf := codec.NewBuffer(b)
1974 m.BdID = buf.DecodeUint32()
1978 // L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
1979 type L2fibFlushBdReply struct {
1980 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1983 func (m *L2fibFlushBdReply) Reset() { *m = L2fibFlushBdReply{} }
1984 func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
1985 func (*L2fibFlushBdReply) GetCrcString() string { return "e8d4e804" }
1986 func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
1987 return api.ReplyMessage
1990 func (m *L2fibFlushBdReply) Size() (size int) {
1994 size += 4 // m.Retval
1997 func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) {
1999 b = make([]byte, m.Size())
2001 buf := codec.NewBuffer(b)
2002 buf.EncodeInt32(m.Retval)
2003 return buf.Bytes(), nil
2005 func (m *L2fibFlushBdReply) Unmarshal(b []byte) error {
2006 buf := codec.NewBuffer(b)
2007 m.Retval = buf.DecodeInt32()
2011 // L2fibFlushInt defines message 'l2fib_flush_int'.
2012 type L2fibFlushInt struct {
2013 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2016 func (m *L2fibFlushInt) Reset() { *m = L2fibFlushInt{} }
2017 func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
2018 func (*L2fibFlushInt) GetCrcString() string { return "f9e6675e" }
2019 func (*L2fibFlushInt) GetMessageType() api.MessageType {
2020 return api.RequestMessage
2023 func (m *L2fibFlushInt) Size() (size int) {
2027 size += 4 // m.SwIfIndex
2030 func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
2032 b = make([]byte, m.Size())
2034 buf := codec.NewBuffer(b)
2035 buf.EncodeUint32(uint32(m.SwIfIndex))
2036 return buf.Bytes(), nil
2038 func (m *L2fibFlushInt) Unmarshal(b []byte) error {
2039 buf := codec.NewBuffer(b)
2040 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2044 // L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
2045 type L2fibFlushIntReply struct {
2046 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2049 func (m *L2fibFlushIntReply) Reset() { *m = L2fibFlushIntReply{} }
2050 func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
2051 func (*L2fibFlushIntReply) GetCrcString() string { return "e8d4e804" }
2052 func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
2053 return api.ReplyMessage
2056 func (m *L2fibFlushIntReply) Size() (size int) {
2060 size += 4 // m.Retval
2063 func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) {
2065 b = make([]byte, m.Size())
2067 buf := codec.NewBuffer(b)
2068 buf.EncodeInt32(m.Retval)
2069 return buf.Bytes(), nil
2071 func (m *L2fibFlushIntReply) Unmarshal(b []byte) error {
2072 buf := codec.NewBuffer(b)
2073 m.Retval = buf.DecodeInt32()
2077 // L2fibSetScanDelay defines message 'l2fib_set_scan_delay'.
2078 type L2fibSetScanDelay struct {
2079 ScanDelay uint16 `binapi:"u16,name=scan_delay,default=10" json:"scan_delay,omitempty"`
2082 func (m *L2fibSetScanDelay) Reset() { *m = L2fibSetScanDelay{} }
2083 func (*L2fibSetScanDelay) GetMessageName() string { return "l2fib_set_scan_delay" }
2084 func (*L2fibSetScanDelay) GetCrcString() string { return "a3b968a4" }
2085 func (*L2fibSetScanDelay) GetMessageType() api.MessageType {
2086 return api.RequestMessage
2089 func (m *L2fibSetScanDelay) Size() (size int) {
2093 size += 2 // m.ScanDelay
2096 func (m *L2fibSetScanDelay) Marshal(b []byte) ([]byte, error) {
2098 b = make([]byte, m.Size())
2100 buf := codec.NewBuffer(b)
2101 buf.EncodeUint16(m.ScanDelay)
2102 return buf.Bytes(), nil
2104 func (m *L2fibSetScanDelay) Unmarshal(b []byte) error {
2105 buf := codec.NewBuffer(b)
2106 m.ScanDelay = buf.DecodeUint16()
2110 // L2fibSetScanDelayReply defines message 'l2fib_set_scan_delay_reply'.
2111 type L2fibSetScanDelayReply struct {
2112 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2115 func (m *L2fibSetScanDelayReply) Reset() { *m = L2fibSetScanDelayReply{} }
2116 func (*L2fibSetScanDelayReply) GetMessageName() string { return "l2fib_set_scan_delay_reply" }
2117 func (*L2fibSetScanDelayReply) GetCrcString() string { return "e8d4e804" }
2118 func (*L2fibSetScanDelayReply) GetMessageType() api.MessageType {
2119 return api.ReplyMessage
2122 func (m *L2fibSetScanDelayReply) Size() (size int) {
2126 size += 4 // m.Retval
2129 func (m *L2fibSetScanDelayReply) Marshal(b []byte) ([]byte, error) {
2131 b = make([]byte, m.Size())
2133 buf := codec.NewBuffer(b)
2134 buf.EncodeInt32(m.Retval)
2135 return buf.Bytes(), nil
2137 func (m *L2fibSetScanDelayReply) Unmarshal(b []byte) error {
2138 buf := codec.NewBuffer(b)
2139 m.Retval = buf.DecodeInt32()
2143 // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
2144 type SwInterfaceSetL2Bridge struct {
2145 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2146 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
2147 PortType L2PortType `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
2148 Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
2149 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
2152 func (m *SwInterfaceSetL2Bridge) Reset() { *m = SwInterfaceSetL2Bridge{} }
2153 func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
2154 func (*SwInterfaceSetL2Bridge) GetCrcString() string { return "d0678b13" }
2155 func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
2156 return api.RequestMessage
2159 func (m *SwInterfaceSetL2Bridge) Size() (size int) {
2163 size += 4 // m.RxSwIfIndex
2165 size += 4 // m.PortType
2167 size += 1 // m.Enable
2170 func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
2172 b = make([]byte, m.Size())
2174 buf := codec.NewBuffer(b)
2175 buf.EncodeUint32(uint32(m.RxSwIfIndex))
2176 buf.EncodeUint32(m.BdID)
2177 buf.EncodeUint32(uint32(m.PortType))
2178 buf.EncodeUint8(m.Shg)
2179 buf.EncodeBool(m.Enable)
2180 return buf.Bytes(), nil
2182 func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
2183 buf := codec.NewBuffer(b)
2184 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2185 m.BdID = buf.DecodeUint32()
2186 m.PortType = L2PortType(buf.DecodeUint32())
2187 m.Shg = buf.DecodeUint8()
2188 m.Enable = buf.DecodeBool()
2192 // SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
2193 type SwInterfaceSetL2BridgeReply struct {
2194 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2197 func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
2198 func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
2199 return "sw_interface_set_l2_bridge_reply"
2201 func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
2202 func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
2203 return api.ReplyMessage
2206 func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
2210 size += 4 // m.Retval
2213 func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) {
2215 b = make([]byte, m.Size())
2217 buf := codec.NewBuffer(b)
2218 buf.EncodeInt32(m.Retval)
2219 return buf.Bytes(), nil
2221 func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
2222 buf := codec.NewBuffer(b)
2223 m.Retval = buf.DecodeInt32()
2227 // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
2228 type SwInterfaceSetL2Xconnect struct {
2229 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2230 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
2231 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
2234 func (m *SwInterfaceSetL2Xconnect) Reset() { *m = SwInterfaceSetL2Xconnect{} }
2235 func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
2236 func (*SwInterfaceSetL2Xconnect) GetCrcString() string { return "4fa28a85" }
2237 func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
2238 return api.RequestMessage
2241 func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
2245 size += 4 // m.RxSwIfIndex
2246 size += 4 // m.TxSwIfIndex
2247 size += 1 // m.Enable
2250 func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
2252 b = make([]byte, m.Size())
2254 buf := codec.NewBuffer(b)
2255 buf.EncodeUint32(uint32(m.RxSwIfIndex))
2256 buf.EncodeUint32(uint32(m.TxSwIfIndex))
2257 buf.EncodeBool(m.Enable)
2258 return buf.Bytes(), nil
2260 func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
2261 buf := codec.NewBuffer(b)
2262 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2263 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2264 m.Enable = buf.DecodeBool()
2268 // SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
2269 type SwInterfaceSetL2XconnectReply struct {
2270 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2273 func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
2274 func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
2275 return "sw_interface_set_l2_xconnect_reply"
2277 func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
2278 func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
2279 return api.ReplyMessage
2282 func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
2286 size += 4 // m.Retval
2289 func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) {
2291 b = make([]byte, m.Size())
2293 buf := codec.NewBuffer(b)
2294 buf.EncodeInt32(m.Retval)
2295 return buf.Bytes(), nil
2297 func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
2298 buf := codec.NewBuffer(b)
2299 m.Retval = buf.DecodeInt32()
2303 // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
2304 type SwInterfaceSetVpath struct {
2305 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2306 Enable bool `binapi:"bool,name=enable,default=4.294967295e+09" json:"enable,omitempty"`
2309 func (m *SwInterfaceSetVpath) Reset() { *m = SwInterfaceSetVpath{} }
2310 func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
2311 func (*SwInterfaceSetVpath) GetCrcString() string { return "ae6cfcfb" }
2312 func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
2313 return api.RequestMessage
2316 func (m *SwInterfaceSetVpath) Size() (size int) {
2320 size += 4 // m.SwIfIndex
2321 size += 1 // m.Enable
2324 func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
2326 b = make([]byte, m.Size())
2328 buf := codec.NewBuffer(b)
2329 buf.EncodeUint32(uint32(m.SwIfIndex))
2330 buf.EncodeBool(m.Enable)
2331 return buf.Bytes(), nil
2333 func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
2334 buf := codec.NewBuffer(b)
2335 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2336 m.Enable = buf.DecodeBool()
2340 // SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
2341 type SwInterfaceSetVpathReply struct {
2342 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2345 func (m *SwInterfaceSetVpathReply) Reset() { *m = SwInterfaceSetVpathReply{} }
2346 func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
2347 func (*SwInterfaceSetVpathReply) GetCrcString() string { return "e8d4e804" }
2348 func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
2349 return api.ReplyMessage
2352 func (m *SwInterfaceSetVpathReply) Size() (size int) {
2356 size += 4 // m.Retval
2359 func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) {
2361 b = make([]byte, m.Size())
2363 buf := codec.NewBuffer(b)
2364 buf.EncodeInt32(m.Retval)
2365 return buf.Bytes(), nil
2367 func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
2368 buf := codec.NewBuffer(b)
2369 m.Retval = buf.DecodeInt32()
2373 // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
2374 type WantL2ArpTermEvents struct {
2375 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2376 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2379 func (m *WantL2ArpTermEvents) Reset() { *m = WantL2ArpTermEvents{} }
2380 func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
2381 func (*WantL2ArpTermEvents) GetCrcString() string { return "3ec6d6c2" }
2382 func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
2383 return api.RequestMessage
2386 func (m *WantL2ArpTermEvents) Size() (size int) {
2390 size += 1 // m.Enable
2394 func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
2396 b = make([]byte, m.Size())
2398 buf := codec.NewBuffer(b)
2399 buf.EncodeBool(m.Enable)
2400 buf.EncodeUint32(m.PID)
2401 return buf.Bytes(), nil
2403 func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
2404 buf := codec.NewBuffer(b)
2405 m.Enable = buf.DecodeBool()
2406 m.PID = buf.DecodeUint32()
2410 // WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
2411 type WantL2ArpTermEventsReply struct {
2412 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2415 func (m *WantL2ArpTermEventsReply) Reset() { *m = WantL2ArpTermEventsReply{} }
2416 func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
2417 func (*WantL2ArpTermEventsReply) GetCrcString() string { return "e8d4e804" }
2418 func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
2419 return api.ReplyMessage
2422 func (m *WantL2ArpTermEventsReply) Size() (size int) {
2426 size += 4 // m.Retval
2429 func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) {
2431 b = make([]byte, m.Size())
2433 buf := codec.NewBuffer(b)
2434 buf.EncodeInt32(m.Retval)
2435 return buf.Bytes(), nil
2437 func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
2438 buf := codec.NewBuffer(b)
2439 m.Retval = buf.DecodeInt32()
2443 // WantL2MacsEvents defines message 'want_l2_macs_events'.
2444 // Deprecated: the message will be removed in the future versions
2445 type WantL2MacsEvents struct {
2446 LearnLimit uint32 `binapi:"u32,name=learn_limit,default=1000" json:"learn_limit,omitempty"`
2447 ScanDelay uint8 `binapi:"u8,name=scan_delay,default=10" json:"scan_delay,omitempty"`
2448 MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"`
2449 EnableDisable bool `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
2450 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2453 func (m *WantL2MacsEvents) Reset() { *m = WantL2MacsEvents{} }
2454 func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
2455 func (*WantL2MacsEvents) GetCrcString() string { return "9aabdfde" }
2456 func (*WantL2MacsEvents) GetMessageType() api.MessageType {
2457 return api.RequestMessage
2460 func (m *WantL2MacsEvents) Size() (size int) {
2464 size += 4 // m.LearnLimit
2465 size += 1 // m.ScanDelay
2466 size += 1 // m.MaxMacsInEvent
2467 size += 1 // m.EnableDisable
2471 func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
2473 b = make([]byte, m.Size())
2475 buf := codec.NewBuffer(b)
2476 buf.EncodeUint32(m.LearnLimit)
2477 buf.EncodeUint8(m.ScanDelay)
2478 buf.EncodeUint8(m.MaxMacsInEvent)
2479 buf.EncodeBool(m.EnableDisable)
2480 buf.EncodeUint32(m.PID)
2481 return buf.Bytes(), nil
2483 func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
2484 buf := codec.NewBuffer(b)
2485 m.LearnLimit = buf.DecodeUint32()
2486 m.ScanDelay = buf.DecodeUint8()
2487 m.MaxMacsInEvent = buf.DecodeUint8()
2488 m.EnableDisable = buf.DecodeBool()
2489 m.PID = buf.DecodeUint32()
2493 // WantL2MacsEvents2 defines message 'want_l2_macs_events2'.
2494 type WantL2MacsEvents2 struct {
2495 MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"`
2496 EnableDisable bool `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
2497 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2500 func (m *WantL2MacsEvents2) Reset() { *m = WantL2MacsEvents2{} }
2501 func (*WantL2MacsEvents2) GetMessageName() string { return "want_l2_macs_events2" }
2502 func (*WantL2MacsEvents2) GetCrcString() string { return "cc1377b0" }
2503 func (*WantL2MacsEvents2) GetMessageType() api.MessageType {
2504 return api.RequestMessage
2507 func (m *WantL2MacsEvents2) Size() (size int) {
2511 size += 1 // m.MaxMacsInEvent
2512 size += 1 // m.EnableDisable
2516 func (m *WantL2MacsEvents2) Marshal(b []byte) ([]byte, error) {
2518 b = make([]byte, m.Size())
2520 buf := codec.NewBuffer(b)
2521 buf.EncodeUint8(m.MaxMacsInEvent)
2522 buf.EncodeBool(m.EnableDisable)
2523 buf.EncodeUint32(m.PID)
2524 return buf.Bytes(), nil
2526 func (m *WantL2MacsEvents2) Unmarshal(b []byte) error {
2527 buf := codec.NewBuffer(b)
2528 m.MaxMacsInEvent = buf.DecodeUint8()
2529 m.EnableDisable = buf.DecodeBool()
2530 m.PID = buf.DecodeUint32()
2534 // WantL2MacsEvents2Reply defines message 'want_l2_macs_events2_reply'.
2535 type WantL2MacsEvents2Reply struct {
2536 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2539 func (m *WantL2MacsEvents2Reply) Reset() { *m = WantL2MacsEvents2Reply{} }
2540 func (*WantL2MacsEvents2Reply) GetMessageName() string { return "want_l2_macs_events2_reply" }
2541 func (*WantL2MacsEvents2Reply) GetCrcString() string { return "e8d4e804" }
2542 func (*WantL2MacsEvents2Reply) GetMessageType() api.MessageType {
2543 return api.ReplyMessage
2546 func (m *WantL2MacsEvents2Reply) Size() (size int) {
2550 size += 4 // m.Retval
2553 func (m *WantL2MacsEvents2Reply) Marshal(b []byte) ([]byte, error) {
2555 b = make([]byte, m.Size())
2557 buf := codec.NewBuffer(b)
2558 buf.EncodeInt32(m.Retval)
2559 return buf.Bytes(), nil
2561 func (m *WantL2MacsEvents2Reply) Unmarshal(b []byte) error {
2562 buf := codec.NewBuffer(b)
2563 m.Retval = buf.DecodeInt32()
2567 // WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
2568 // Deprecated: the message will be removed in the future versions
2569 type WantL2MacsEventsReply struct {
2570 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2573 func (m *WantL2MacsEventsReply) Reset() { *m = WantL2MacsEventsReply{} }
2574 func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
2575 func (*WantL2MacsEventsReply) GetCrcString() string { return "e8d4e804" }
2576 func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
2577 return api.ReplyMessage
2580 func (m *WantL2MacsEventsReply) Size() (size int) {
2584 size += 4 // m.Retval
2587 func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) {
2589 b = make([]byte, m.Size())
2591 buf := codec.NewBuffer(b)
2592 buf.EncodeInt32(m.Retval)
2593 return buf.Bytes(), nil
2595 func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error {
2596 buf := codec.NewBuffer(b)
2597 m.Retval = buf.DecodeInt32()
2601 func init() { file_l2_binapi_init() }
2602 func file_l2_binapi_init() {
2603 api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_0257c869")
2604 api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
2605 api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_545af86a")
2606 api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
2607 api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
2608 api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
2609 api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_600b7170")
2610 api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
2611 api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_0fa506fd")
2612 api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_74396a43")
2613 api.RegisterMessage((*BridgeDomainSetDefaultLearnLimit)(nil), "bridge_domain_set_default_learn_limit_f097ffce")
2614 api.RegisterMessage((*BridgeDomainSetDefaultLearnLimitReply)(nil), "bridge_domain_set_default_learn_limit_reply_e8d4e804")
2615 api.RegisterMessage((*BridgeDomainSetLearnLimit)(nil), "bridge_domain_set_learn_limit_89c52b5f")
2616 api.RegisterMessage((*BridgeDomainSetLearnLimitReply)(nil), "bridge_domain_set_learn_limit_reply_e8d4e804")
2617 api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
2618 api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
2619 api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_1b0c5fbd")
2620 api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
2621 api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
2622 api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_5383d31f")
2623 api.RegisterMessage((*BviDelete)(nil), "bvi_delete_f9e6675e")
2624 api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
2625 api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_6963e07a")
2626 api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
2627 api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
2628 api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_a44ef6b8")
2629 api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
2630 api.RegisterMessage((*L2Flags)(nil), "l2_flags_fc41cfe8")
2631 api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
2632 api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_5501adee")
2633 api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
2634 api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_38e802a8")
2635 api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
2636 api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_62cc0bbc")
2637 api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
2638 api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_44b8fd64")
2639 api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_a1f6a6f3")
2640 api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
2641 api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_472b6b67")
2642 api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
2643 api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_eddda487")
2644 api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
2645 api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
2646 api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
2647 api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
2648 api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
2649 api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_f9e6675e")
2650 api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
2651 api.RegisterMessage((*L2fibSetScanDelay)(nil), "l2fib_set_scan_delay_a3b968a4")
2652 api.RegisterMessage((*L2fibSetScanDelayReply)(nil), "l2fib_set_scan_delay_reply_e8d4e804")
2653 api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_d0678b13")
2654 api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
2655 api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_4fa28a85")
2656 api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
2657 api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_ae6cfcfb")
2658 api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
2659 api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
2660 api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
2661 api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
2662 api.RegisterMessage((*WantL2MacsEvents2)(nil), "want_l2_macs_events2_cc1377b0")
2663 api.RegisterMessage((*WantL2MacsEvents2Reply)(nil), "want_l2_macs_events2_reply_e8d4e804")
2664 api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
2667 // Messages returns list of all messages in this module.
2668 func AllMessages() []api.Message {
2669 return []api.Message{
2670 (*BdIPMacAddDel)(nil),
2671 (*BdIPMacAddDelReply)(nil),
2672 (*BdIPMacDetails)(nil),
2673 (*BdIPMacDump)(nil),
2674 (*BdIPMacFlush)(nil),
2675 (*BdIPMacFlushReply)(nil),
2676 (*BridgeDomainAddDel)(nil),
2677 (*BridgeDomainAddDelReply)(nil),
2678 (*BridgeDomainDetails)(nil),
2679 (*BridgeDomainDump)(nil),
2680 (*BridgeDomainSetDefaultLearnLimit)(nil),
2681 (*BridgeDomainSetDefaultLearnLimitReply)(nil),
2682 (*BridgeDomainSetLearnLimit)(nil),
2683 (*BridgeDomainSetLearnLimitReply)(nil),
2684 (*BridgeDomainSetMacAge)(nil),
2685 (*BridgeDomainSetMacAgeReply)(nil),
2686 (*BridgeFlags)(nil),
2687 (*BridgeFlagsReply)(nil),
2689 (*BviCreateReply)(nil),
2691 (*BviDeleteReply)(nil),
2692 (*L2ArpTermEvent)(nil),
2693 (*L2FibClearTable)(nil),
2694 (*L2FibClearTableReply)(nil),
2695 (*L2FibTableDetails)(nil),
2696 (*L2FibTableDump)(nil),
2698 (*L2FlagsReply)(nil),
2699 (*L2InterfaceEfpFilter)(nil),
2700 (*L2InterfaceEfpFilterReply)(nil),
2701 (*L2InterfacePbbTagRewrite)(nil),
2702 (*L2InterfacePbbTagRewriteReply)(nil),
2703 (*L2InterfaceVlanTagRewrite)(nil),
2704 (*L2InterfaceVlanTagRewriteReply)(nil),
2705 (*L2MacsEvent)(nil),
2706 (*L2PatchAddDel)(nil),
2707 (*L2PatchAddDelReply)(nil),
2708 (*L2XconnectDetails)(nil),
2709 (*L2XconnectDump)(nil),
2710 (*L2fibAddDel)(nil),
2711 (*L2fibAddDelReply)(nil),
2712 (*L2fibFlushAll)(nil),
2713 (*L2fibFlushAllReply)(nil),
2714 (*L2fibFlushBd)(nil),
2715 (*L2fibFlushBdReply)(nil),
2716 (*L2fibFlushInt)(nil),
2717 (*L2fibFlushIntReply)(nil),
2718 (*L2fibSetScanDelay)(nil),
2719 (*L2fibSetScanDelayReply)(nil),
2720 (*SwInterfaceSetL2Bridge)(nil),
2721 (*SwInterfaceSetL2BridgeReply)(nil),
2722 (*SwInterfaceSetL2Xconnect)(nil),
2723 (*SwInterfaceSetL2XconnectReply)(nil),
2724 (*SwInterfaceSetVpath)(nil),
2725 (*SwInterfaceSetVpathReply)(nil),
2726 (*WantL2ArpTermEvents)(nil),
2727 (*WantL2ArpTermEventsReply)(nil),
2728 (*WantL2MacsEvents)(nil),
2729 (*WantL2MacsEvents2)(nil),
2730 (*WantL2MacsEvents2Reply)(nil),
2731 (*WantL2MacsEventsReply)(nil),