1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: /usr/share/vpp/api/core/interface.api.json
7 // Package interfaces contains generated bindings for API file interface.api.
15 api "git.fd.io/govpp.git/api"
16 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
17 interface_types "git.fd.io/govpp.git/binapi/interface_types"
18 ip_types "git.fd.io/govpp.git/binapi/ip_types"
19 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0x13ab947a
34 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
35 type CollectDetailedInterfaceStats struct {
36 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
37 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
40 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
41 func (*CollectDetailedInterfaceStats) GetMessageName() string {
42 return "collect_detailed_interface_stats"
44 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
45 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
46 return api.RequestMessage
49 func (m *CollectDetailedInterfaceStats) Size() (size int) {
53 size += 4 // m.SwIfIndex
54 size += 1 // m.EnableDisable
57 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
59 b = make([]byte, m.Size())
61 buf := codec.NewBuffer(b)
62 buf.EncodeUint32(uint32(m.SwIfIndex))
63 buf.EncodeBool(m.EnableDisable)
64 return buf.Bytes(), nil
66 func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error {
67 buf := codec.NewBuffer(b)
68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
69 m.EnableDisable = buf.DecodeBool()
73 // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'.
74 type CollectDetailedInterfaceStatsReply struct {
75 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
78 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
79 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
80 return "collect_detailed_interface_stats_reply"
82 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
83 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType {
84 return api.ReplyMessage
87 func (m *CollectDetailedInterfaceStatsReply) Size() (size int) {
94 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
96 b = make([]byte, m.Size())
98 buf := codec.NewBuffer(b)
99 buf.EncodeInt32(m.Retval)
100 return buf.Bytes(), nil
102 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error {
103 buf := codec.NewBuffer(b)
104 m.Retval = buf.DecodeInt32()
108 // CreateLoopback defines message 'create_loopback'.
109 type CreateLoopback struct {
110 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
113 func (m *CreateLoopback) Reset() { *m = CreateLoopback{} }
114 func (*CreateLoopback) GetMessageName() string { return "create_loopback" }
115 func (*CreateLoopback) GetCrcString() string { return "42bb5d22" }
116 func (*CreateLoopback) GetMessageType() api.MessageType {
117 return api.RequestMessage
120 func (m *CreateLoopback) Size() (size int) {
124 size += 1 * 6 // m.MacAddress
127 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
129 b = make([]byte, m.Size())
131 buf := codec.NewBuffer(b)
132 buf.EncodeBytes(m.MacAddress[:], 6)
133 return buf.Bytes(), nil
135 func (m *CreateLoopback) Unmarshal(b []byte) error {
136 buf := codec.NewBuffer(b)
137 copy(m.MacAddress[:], buf.DecodeBytes(6))
141 // CreateLoopbackInstance defines message 'create_loopback_instance'.
142 type CreateLoopbackInstance struct {
143 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
144 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
145 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
148 func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} }
149 func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" }
150 func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" }
151 func (*CreateLoopbackInstance) GetMessageType() api.MessageType {
152 return api.RequestMessage
155 func (m *CreateLoopbackInstance) Size() (size int) {
159 size += 1 * 6 // m.MacAddress
160 size += 1 // m.IsSpecified
161 size += 4 // m.UserInstance
164 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
166 b = make([]byte, m.Size())
168 buf := codec.NewBuffer(b)
169 buf.EncodeBytes(m.MacAddress[:], 6)
170 buf.EncodeBool(m.IsSpecified)
171 buf.EncodeUint32(m.UserInstance)
172 return buf.Bytes(), nil
174 func (m *CreateLoopbackInstance) Unmarshal(b []byte) error {
175 buf := codec.NewBuffer(b)
176 copy(m.MacAddress[:], buf.DecodeBytes(6))
177 m.IsSpecified = buf.DecodeBool()
178 m.UserInstance = buf.DecodeUint32()
182 // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'.
183 type CreateLoopbackInstanceReply struct {
184 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
185 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
188 func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
189 func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" }
190 func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" }
191 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 func (m *CreateLoopbackInstanceReply) Size() (size int) {
199 size += 4 // m.Retval
200 size += 4 // m.SwIfIndex
203 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
205 b = make([]byte, m.Size())
207 buf := codec.NewBuffer(b)
208 buf.EncodeInt32(m.Retval)
209 buf.EncodeUint32(uint32(m.SwIfIndex))
210 return buf.Bytes(), nil
212 func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error {
213 buf := codec.NewBuffer(b)
214 m.Retval = buf.DecodeInt32()
215 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
219 // CreateLoopbackReply defines message 'create_loopback_reply'.
220 type CreateLoopbackReply struct {
221 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
222 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
225 func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
226 func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" }
227 func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" }
228 func (*CreateLoopbackReply) GetMessageType() api.MessageType {
229 return api.ReplyMessage
232 func (m *CreateLoopbackReply) Size() (size int) {
236 size += 4 // m.Retval
237 size += 4 // m.SwIfIndex
240 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
242 b = make([]byte, m.Size())
244 buf := codec.NewBuffer(b)
245 buf.EncodeInt32(m.Retval)
246 buf.EncodeUint32(uint32(m.SwIfIndex))
247 return buf.Bytes(), nil
249 func (m *CreateLoopbackReply) Unmarshal(b []byte) error {
250 buf := codec.NewBuffer(b)
251 m.Retval = buf.DecodeInt32()
252 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
256 // CreateSubif defines message 'create_subif'.
257 type CreateSubif struct {
258 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
259 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
260 SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
261 OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
262 InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
265 func (m *CreateSubif) Reset() { *m = CreateSubif{} }
266 func (*CreateSubif) GetMessageName() string { return "create_subif" }
267 func (*CreateSubif) GetCrcString() string { return "790ca755" }
268 func (*CreateSubif) GetMessageType() api.MessageType {
269 return api.RequestMessage
272 func (m *CreateSubif) Size() (size int) {
276 size += 4 // m.SwIfIndex
278 size += 4 // m.SubIfFlags
279 size += 2 // m.OuterVlanID
280 size += 2 // m.InnerVlanID
283 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
285 b = make([]byte, m.Size())
287 buf := codec.NewBuffer(b)
288 buf.EncodeUint32(uint32(m.SwIfIndex))
289 buf.EncodeUint32(m.SubID)
290 buf.EncodeUint32(uint32(m.SubIfFlags))
291 buf.EncodeUint16(m.OuterVlanID)
292 buf.EncodeUint16(m.InnerVlanID)
293 return buf.Bytes(), nil
295 func (m *CreateSubif) Unmarshal(b []byte) error {
296 buf := codec.NewBuffer(b)
297 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
298 m.SubID = buf.DecodeUint32()
299 m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32())
300 m.OuterVlanID = buf.DecodeUint16()
301 m.InnerVlanID = buf.DecodeUint16()
305 // CreateSubifReply defines message 'create_subif_reply'.
306 type CreateSubifReply struct {
307 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
308 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
311 func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
312 func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" }
313 func (*CreateSubifReply) GetCrcString() string { return "5383d31f" }
314 func (*CreateSubifReply) GetMessageType() api.MessageType {
315 return api.ReplyMessage
318 func (m *CreateSubifReply) Size() (size int) {
322 size += 4 // m.Retval
323 size += 4 // m.SwIfIndex
326 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
328 b = make([]byte, m.Size())
330 buf := codec.NewBuffer(b)
331 buf.EncodeInt32(m.Retval)
332 buf.EncodeUint32(uint32(m.SwIfIndex))
333 return buf.Bytes(), nil
335 func (m *CreateSubifReply) Unmarshal(b []byte) error {
336 buf := codec.NewBuffer(b)
337 m.Retval = buf.DecodeInt32()
338 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
342 // CreateVlanSubif defines message 'create_vlan_subif'.
343 type CreateVlanSubif struct {
344 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
345 VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
348 func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
349 func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" }
350 func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" }
351 func (*CreateVlanSubif) GetMessageType() api.MessageType {
352 return api.RequestMessage
355 func (m *CreateVlanSubif) Size() (size int) {
359 size += 4 // m.SwIfIndex
360 size += 4 // m.VlanID
363 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
365 b = make([]byte, m.Size())
367 buf := codec.NewBuffer(b)
368 buf.EncodeUint32(uint32(m.SwIfIndex))
369 buf.EncodeUint32(m.VlanID)
370 return buf.Bytes(), nil
372 func (m *CreateVlanSubif) Unmarshal(b []byte) error {
373 buf := codec.NewBuffer(b)
374 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
375 m.VlanID = buf.DecodeUint32()
379 // CreateVlanSubifReply defines message 'create_vlan_subif_reply'.
380 type CreateVlanSubifReply struct {
381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
382 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
385 func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
386 func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" }
387 func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" }
388 func (*CreateVlanSubifReply) GetMessageType() api.MessageType {
389 return api.ReplyMessage
392 func (m *CreateVlanSubifReply) Size() (size int) {
396 size += 4 // m.Retval
397 size += 4 // m.SwIfIndex
400 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
402 b = make([]byte, m.Size())
404 buf := codec.NewBuffer(b)
405 buf.EncodeInt32(m.Retval)
406 buf.EncodeUint32(uint32(m.SwIfIndex))
407 return buf.Bytes(), nil
409 func (m *CreateVlanSubifReply) Unmarshal(b []byte) error {
410 buf := codec.NewBuffer(b)
411 m.Retval = buf.DecodeInt32()
412 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
416 // DeleteLoopback defines message 'delete_loopback'.
417 type DeleteLoopback struct {
418 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
421 func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
422 func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" }
423 func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" }
424 func (*DeleteLoopback) GetMessageType() api.MessageType {
425 return api.RequestMessage
428 func (m *DeleteLoopback) Size() (size int) {
432 size += 4 // m.SwIfIndex
435 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
437 b = make([]byte, m.Size())
439 buf := codec.NewBuffer(b)
440 buf.EncodeUint32(uint32(m.SwIfIndex))
441 return buf.Bytes(), nil
443 func (m *DeleteLoopback) Unmarshal(b []byte) error {
444 buf := codec.NewBuffer(b)
445 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
449 // DeleteLoopbackReply defines message 'delete_loopback_reply'.
450 type DeleteLoopbackReply struct {
451 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
454 func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} }
455 func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" }
456 func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" }
457 func (*DeleteLoopbackReply) GetMessageType() api.MessageType {
458 return api.ReplyMessage
461 func (m *DeleteLoopbackReply) Size() (size int) {
465 size += 4 // m.Retval
468 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
470 b = make([]byte, m.Size())
472 buf := codec.NewBuffer(b)
473 buf.EncodeInt32(m.Retval)
474 return buf.Bytes(), nil
476 func (m *DeleteLoopbackReply) Unmarshal(b []byte) error {
477 buf := codec.NewBuffer(b)
478 m.Retval = buf.DecodeInt32()
482 // DeleteSubif defines message 'delete_subif'.
483 type DeleteSubif struct {
484 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
487 func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
488 func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
489 func (*DeleteSubif) GetCrcString() string { return "f9e6675e" }
490 func (*DeleteSubif) GetMessageType() api.MessageType {
491 return api.RequestMessage
494 func (m *DeleteSubif) Size() (size int) {
498 size += 4 // m.SwIfIndex
501 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
503 b = make([]byte, m.Size())
505 buf := codec.NewBuffer(b)
506 buf.EncodeUint32(uint32(m.SwIfIndex))
507 return buf.Bytes(), nil
509 func (m *DeleteSubif) Unmarshal(b []byte) error {
510 buf := codec.NewBuffer(b)
511 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
515 // DeleteSubifReply defines message 'delete_subif_reply'.
516 type DeleteSubifReply struct {
517 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
520 func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} }
521 func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" }
522 func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" }
523 func (*DeleteSubifReply) GetMessageType() api.MessageType {
524 return api.ReplyMessage
527 func (m *DeleteSubifReply) Size() (size int) {
531 size += 4 // m.Retval
534 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
536 b = make([]byte, m.Size())
538 buf := codec.NewBuffer(b)
539 buf.EncodeInt32(m.Retval)
540 return buf.Bytes(), nil
542 func (m *DeleteSubifReply) Unmarshal(b []byte) error {
543 buf := codec.NewBuffer(b)
544 m.Retval = buf.DecodeInt32()
548 // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'.
549 type HwInterfaceSetMtu struct {
550 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
551 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
554 func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
555 func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" }
556 func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" }
557 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType {
558 return api.RequestMessage
561 func (m *HwInterfaceSetMtu) Size() (size int) {
565 size += 4 // m.SwIfIndex
569 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
571 b = make([]byte, m.Size())
573 buf := codec.NewBuffer(b)
574 buf.EncodeUint32(uint32(m.SwIfIndex))
575 buf.EncodeUint16(m.Mtu)
576 return buf.Bytes(), nil
578 func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error {
579 buf := codec.NewBuffer(b)
580 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
581 m.Mtu = buf.DecodeUint16()
585 // HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'.
586 type HwInterfaceSetMtuReply struct {
587 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
590 func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} }
591 func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" }
592 func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
593 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType {
594 return api.ReplyMessage
597 func (m *HwInterfaceSetMtuReply) Size() (size int) {
601 size += 4 // m.Retval
604 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
606 b = make([]byte, m.Size())
608 buf := codec.NewBuffer(b)
609 buf.EncodeInt32(m.Retval)
610 return buf.Bytes(), nil
612 func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error {
613 buf := codec.NewBuffer(b)
614 m.Retval = buf.DecodeInt32()
618 // InterfaceNameRenumber defines message 'interface_name_renumber'.
619 type InterfaceNameRenumber struct {
620 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
621 NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
624 func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
625 func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" }
626 func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" }
627 func (*InterfaceNameRenumber) GetMessageType() api.MessageType {
628 return api.RequestMessage
631 func (m *InterfaceNameRenumber) Size() (size int) {
635 size += 4 // m.SwIfIndex
636 size += 4 // m.NewShowDevInstance
639 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
641 b = make([]byte, m.Size())
643 buf := codec.NewBuffer(b)
644 buf.EncodeUint32(uint32(m.SwIfIndex))
645 buf.EncodeUint32(m.NewShowDevInstance)
646 return buf.Bytes(), nil
648 func (m *InterfaceNameRenumber) Unmarshal(b []byte) error {
649 buf := codec.NewBuffer(b)
650 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
651 m.NewShowDevInstance = buf.DecodeUint32()
655 // InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'.
656 type InterfaceNameRenumberReply struct {
657 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
660 func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} }
661 func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" }
662 func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" }
663 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType {
664 return api.ReplyMessage
667 func (m *InterfaceNameRenumberReply) Size() (size int) {
671 size += 4 // m.Retval
674 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
676 b = make([]byte, m.Size())
678 buf := codec.NewBuffer(b)
679 buf.EncodeInt32(m.Retval)
680 return buf.Bytes(), nil
682 func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error {
683 buf := codec.NewBuffer(b)
684 m.Retval = buf.DecodeInt32()
688 // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'.
689 type SwInterfaceAddDelAddress struct {
690 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
691 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
692 DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
693 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
696 func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
697 func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" }
698 func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5463d73b" }
699 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType {
700 return api.RequestMessage
703 func (m *SwInterfaceAddDelAddress) Size() (size int) {
707 size += 4 // m.SwIfIndex
709 size += 1 // m.DelAll
710 size += 1 // m.Prefix.Address.Af
711 size += 1 * 16 // m.Prefix.Address.Un
712 size += 1 // m.Prefix.Len
715 func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
717 b = make([]byte, m.Size())
719 buf := codec.NewBuffer(b)
720 buf.EncodeUint32(uint32(m.SwIfIndex))
721 buf.EncodeBool(m.IsAdd)
722 buf.EncodeBool(m.DelAll)
723 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
724 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
725 buf.EncodeUint8(m.Prefix.Len)
726 return buf.Bytes(), nil
728 func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error {
729 buf := codec.NewBuffer(b)
730 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
731 m.IsAdd = buf.DecodeBool()
732 m.DelAll = buf.DecodeBool()
733 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
734 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
735 m.Prefix.Len = buf.DecodeUint8()
739 // SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'.
740 type SwInterfaceAddDelAddressReply struct {
741 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
744 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
745 func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
746 return "sw_interface_add_del_address_reply"
748 func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
749 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType {
750 return api.ReplyMessage
753 func (m *SwInterfaceAddDelAddressReply) Size() (size int) {
757 size += 4 // m.Retval
760 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
762 b = make([]byte, m.Size())
764 buf := codec.NewBuffer(b)
765 buf.EncodeInt32(m.Retval)
766 return buf.Bytes(), nil
768 func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error {
769 buf := codec.NewBuffer(b)
770 m.Retval = buf.DecodeInt32()
774 // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'.
775 type SwInterfaceAddDelMacAddress struct {
776 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
777 Addr ethernet_types.MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
778 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
781 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
782 func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
783 return "sw_interface_add_del_mac_address"
785 func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
786 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType {
787 return api.RequestMessage
790 func (m *SwInterfaceAddDelMacAddress) Size() (size int) {
794 size += 4 // m.SwIfIndex
795 size += 1 * 6 // m.Addr
799 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
801 b = make([]byte, m.Size())
803 buf := codec.NewBuffer(b)
804 buf.EncodeUint32(m.SwIfIndex)
805 buf.EncodeBytes(m.Addr[:], 6)
806 buf.EncodeUint8(m.IsAdd)
807 return buf.Bytes(), nil
809 func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error {
810 buf := codec.NewBuffer(b)
811 m.SwIfIndex = buf.DecodeUint32()
812 copy(m.Addr[:], buf.DecodeBytes(6))
813 m.IsAdd = buf.DecodeUint8()
817 // SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'.
818 type SwInterfaceAddDelMacAddressReply struct {
819 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
822 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
823 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
824 return "sw_interface_add_del_mac_address_reply"
826 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
827 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType {
828 return api.ReplyMessage
831 func (m *SwInterfaceAddDelMacAddressReply) Size() (size int) {
835 size += 4 // m.Retval
838 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
840 b = make([]byte, m.Size())
842 buf := codec.NewBuffer(b)
843 buf.EncodeInt32(m.Retval)
844 return buf.Bytes(), nil
846 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error {
847 buf := codec.NewBuffer(b)
848 m.Retval = buf.DecodeInt32()
852 // SwInterfaceAddressReplaceBegin defines message 'sw_interface_address_replace_begin'.
853 type SwInterfaceAddressReplaceBegin struct{}
855 func (m *SwInterfaceAddressReplaceBegin) Reset() { *m = SwInterfaceAddressReplaceBegin{} }
856 func (*SwInterfaceAddressReplaceBegin) GetMessageName() string {
857 return "sw_interface_address_replace_begin"
859 func (*SwInterfaceAddressReplaceBegin) GetCrcString() string { return "51077d14" }
860 func (*SwInterfaceAddressReplaceBegin) GetMessageType() api.MessageType {
861 return api.RequestMessage
864 func (m *SwInterfaceAddressReplaceBegin) Size() (size int) {
870 func (m *SwInterfaceAddressReplaceBegin) Marshal(b []byte) ([]byte, error) {
872 b = make([]byte, m.Size())
874 buf := codec.NewBuffer(b)
875 return buf.Bytes(), nil
877 func (m *SwInterfaceAddressReplaceBegin) Unmarshal(b []byte) error {
881 // SwInterfaceAddressReplaceBeginReply defines message 'sw_interface_address_replace_begin_reply'.
882 type SwInterfaceAddressReplaceBeginReply struct {
883 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
886 func (m *SwInterfaceAddressReplaceBeginReply) Reset() { *m = SwInterfaceAddressReplaceBeginReply{} }
887 func (*SwInterfaceAddressReplaceBeginReply) GetMessageName() string {
888 return "sw_interface_address_replace_begin_reply"
890 func (*SwInterfaceAddressReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
891 func (*SwInterfaceAddressReplaceBeginReply) GetMessageType() api.MessageType {
892 return api.ReplyMessage
895 func (m *SwInterfaceAddressReplaceBeginReply) Size() (size int) {
899 size += 4 // m.Retval
902 func (m *SwInterfaceAddressReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
904 b = make([]byte, m.Size())
906 buf := codec.NewBuffer(b)
907 buf.EncodeInt32(m.Retval)
908 return buf.Bytes(), nil
910 func (m *SwInterfaceAddressReplaceBeginReply) Unmarshal(b []byte) error {
911 buf := codec.NewBuffer(b)
912 m.Retval = buf.DecodeInt32()
916 // SwInterfaceAddressReplaceEnd defines message 'sw_interface_address_replace_end'.
917 type SwInterfaceAddressReplaceEnd struct{}
919 func (m *SwInterfaceAddressReplaceEnd) Reset() { *m = SwInterfaceAddressReplaceEnd{} }
920 func (*SwInterfaceAddressReplaceEnd) GetMessageName() string {
921 return "sw_interface_address_replace_end"
923 func (*SwInterfaceAddressReplaceEnd) GetCrcString() string { return "51077d14" }
924 func (*SwInterfaceAddressReplaceEnd) GetMessageType() api.MessageType {
925 return api.RequestMessage
928 func (m *SwInterfaceAddressReplaceEnd) Size() (size int) {
934 func (m *SwInterfaceAddressReplaceEnd) Marshal(b []byte) ([]byte, error) {
936 b = make([]byte, m.Size())
938 buf := codec.NewBuffer(b)
939 return buf.Bytes(), nil
941 func (m *SwInterfaceAddressReplaceEnd) Unmarshal(b []byte) error {
945 // SwInterfaceAddressReplaceEndReply defines message 'sw_interface_address_replace_end_reply'.
946 type SwInterfaceAddressReplaceEndReply struct {
947 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
950 func (m *SwInterfaceAddressReplaceEndReply) Reset() { *m = SwInterfaceAddressReplaceEndReply{} }
951 func (*SwInterfaceAddressReplaceEndReply) GetMessageName() string {
952 return "sw_interface_address_replace_end_reply"
954 func (*SwInterfaceAddressReplaceEndReply) GetCrcString() string { return "e8d4e804" }
955 func (*SwInterfaceAddressReplaceEndReply) GetMessageType() api.MessageType {
956 return api.ReplyMessage
959 func (m *SwInterfaceAddressReplaceEndReply) Size() (size int) {
963 size += 4 // m.Retval
966 func (m *SwInterfaceAddressReplaceEndReply) Marshal(b []byte) ([]byte, error) {
968 b = make([]byte, m.Size())
970 buf := codec.NewBuffer(b)
971 buf.EncodeInt32(m.Retval)
972 return buf.Bytes(), nil
974 func (m *SwInterfaceAddressReplaceEndReply) Unmarshal(b []byte) error {
975 buf := codec.NewBuffer(b)
976 m.Retval = buf.DecodeInt32()
980 // SwInterfaceClearStats defines message 'sw_interface_clear_stats'.
981 type SwInterfaceClearStats struct {
982 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
985 func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
986 func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" }
987 func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" }
988 func (*SwInterfaceClearStats) GetMessageType() api.MessageType {
989 return api.RequestMessage
992 func (m *SwInterfaceClearStats) Size() (size int) {
996 size += 4 // m.SwIfIndex
999 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
1001 b = make([]byte, m.Size())
1003 buf := codec.NewBuffer(b)
1004 buf.EncodeUint32(uint32(m.SwIfIndex))
1005 return buf.Bytes(), nil
1007 func (m *SwInterfaceClearStats) Unmarshal(b []byte) error {
1008 buf := codec.NewBuffer(b)
1009 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1013 // SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'.
1014 type SwInterfaceClearStatsReply struct {
1015 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1018 func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} }
1019 func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" }
1020 func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" }
1021 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType {
1022 return api.ReplyMessage
1025 func (m *SwInterfaceClearStatsReply) Size() (size int) {
1029 size += 4 // m.Retval
1032 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
1034 b = make([]byte, m.Size())
1036 buf := codec.NewBuffer(b)
1037 buf.EncodeInt32(m.Retval)
1038 return buf.Bytes(), nil
1040 func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error {
1041 buf := codec.NewBuffer(b)
1042 m.Retval = buf.DecodeInt32()
1046 // SwInterfaceDetails defines message 'sw_interface_details'.
1047 type SwInterfaceDetails struct {
1048 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1049 SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
1050 L2Address ethernet_types.MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
1051 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1052 Type interface_types.IfType `binapi:"if_type,name=type" json:"type,omitempty"`
1053 LinkDuplex interface_types.LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
1054 LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
1055 LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
1056 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1057 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1058 SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
1059 SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
1060 SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
1061 SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1062 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1063 VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
1064 VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
1065 VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
1066 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1067 BDmac ethernet_types.MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1068 BSmac ethernet_types.MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1069 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1070 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1071 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
1072 InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"`
1073 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1076 func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
1077 func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" }
1078 func (*SwInterfaceDetails) GetCrcString() string { return "6c221fc7" }
1079 func (*SwInterfaceDetails) GetMessageType() api.MessageType {
1080 return api.ReplyMessage
1083 func (m *SwInterfaceDetails) Size() (size int) {
1087 size += 4 // m.SwIfIndex
1088 size += 4 // m.SupSwIfIndex
1089 size += 1 * 6 // m.L2Address
1090 size += 4 // m.Flags
1092 size += 4 // m.LinkDuplex
1093 size += 4 // m.LinkSpeed
1094 size += 2 // m.LinkMtu
1095 size += 4 * 4 // m.Mtu
1096 size += 4 // m.SubID
1097 size += 1 // m.SubNumberOfTags
1098 size += 2 // m.SubOuterVlanID
1099 size += 2 // m.SubInnerVlanID
1100 size += 4 // m.SubIfFlags
1101 size += 4 // m.VtrOp
1102 size += 4 // m.VtrPushDot1q
1103 size += 4 // m.VtrTag1
1104 size += 4 // m.VtrTag2
1105 size += 2 // m.OuterTag
1106 size += 1 * 6 // m.BDmac
1107 size += 1 * 6 // m.BSmac
1108 size += 2 // m.BVlanid
1110 size += 64 // m.InterfaceName
1111 size += 64 // m.InterfaceDevType
1115 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1117 b = make([]byte, m.Size())
1119 buf := codec.NewBuffer(b)
1120 buf.EncodeUint32(uint32(m.SwIfIndex))
1121 buf.EncodeUint32(m.SupSwIfIndex)
1122 buf.EncodeBytes(m.L2Address[:], 6)
1123 buf.EncodeUint32(uint32(m.Flags))
1124 buf.EncodeUint32(uint32(m.Type))
1125 buf.EncodeUint32(uint32(m.LinkDuplex))
1126 buf.EncodeUint32(m.LinkSpeed)
1127 buf.EncodeUint16(m.LinkMtu)
1128 for i := 0; i < 4; i++ {
1131 x = uint32(m.Mtu[i])
1135 buf.EncodeUint32(m.SubID)
1136 buf.EncodeUint8(m.SubNumberOfTags)
1137 buf.EncodeUint16(m.SubOuterVlanID)
1138 buf.EncodeUint16(m.SubInnerVlanID)
1139 buf.EncodeUint32(uint32(m.SubIfFlags))
1140 buf.EncodeUint32(m.VtrOp)
1141 buf.EncodeUint32(m.VtrPushDot1q)
1142 buf.EncodeUint32(m.VtrTag1)
1143 buf.EncodeUint32(m.VtrTag2)
1144 buf.EncodeUint16(m.OuterTag)
1145 buf.EncodeBytes(m.BDmac[:], 6)
1146 buf.EncodeBytes(m.BSmac[:], 6)
1147 buf.EncodeUint16(m.BVlanid)
1148 buf.EncodeUint32(m.ISid)
1149 buf.EncodeString(m.InterfaceName, 64)
1150 buf.EncodeString(m.InterfaceDevType, 64)
1151 buf.EncodeString(m.Tag, 64)
1152 return buf.Bytes(), nil
1154 func (m *SwInterfaceDetails) Unmarshal(b []byte) error {
1155 buf := codec.NewBuffer(b)
1156 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1157 m.SupSwIfIndex = buf.DecodeUint32()
1158 copy(m.L2Address[:], buf.DecodeBytes(6))
1159 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1160 m.Type = interface_types.IfType(buf.DecodeUint32())
1161 m.LinkDuplex = interface_types.LinkDuplex(buf.DecodeUint32())
1162 m.LinkSpeed = buf.DecodeUint32()
1163 m.LinkMtu = buf.DecodeUint16()
1164 m.Mtu = make([]uint32, 4)
1165 for i := 0; i < len(m.Mtu); i++ {
1166 m.Mtu[i] = buf.DecodeUint32()
1168 m.SubID = buf.DecodeUint32()
1169 m.SubNumberOfTags = buf.DecodeUint8()
1170 m.SubOuterVlanID = buf.DecodeUint16()
1171 m.SubInnerVlanID = buf.DecodeUint16()
1172 m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32())
1173 m.VtrOp = buf.DecodeUint32()
1174 m.VtrPushDot1q = buf.DecodeUint32()
1175 m.VtrTag1 = buf.DecodeUint32()
1176 m.VtrTag2 = buf.DecodeUint32()
1177 m.OuterTag = buf.DecodeUint16()
1178 copy(m.BDmac[:], buf.DecodeBytes(6))
1179 copy(m.BSmac[:], buf.DecodeBytes(6))
1180 m.BVlanid = buf.DecodeUint16()
1181 m.ISid = buf.DecodeUint32()
1182 m.InterfaceName = buf.DecodeString(64)
1183 m.InterfaceDevType = buf.DecodeString(64)
1184 m.Tag = buf.DecodeString(64)
1188 // SwInterfaceDump defines message 'sw_interface_dump'.
1189 type SwInterfaceDump struct {
1190 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
1191 NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
1192 NameFilter string `binapi:"string[],name=name_filter" json:"name_filter,omitempty"`
1195 func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
1196 func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" }
1197 func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" }
1198 func (*SwInterfaceDump) GetMessageType() api.MessageType {
1199 return api.RequestMessage
1202 func (m *SwInterfaceDump) Size() (size int) {
1206 size += 4 // m.SwIfIndex
1207 size += 1 // m.NameFilterValid
1208 size += 4 + len(m.NameFilter) // m.NameFilter
1211 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
1213 b = make([]byte, m.Size())
1215 buf := codec.NewBuffer(b)
1216 buf.EncodeUint32(uint32(m.SwIfIndex))
1217 buf.EncodeBool(m.NameFilterValid)
1218 buf.EncodeString(m.NameFilter, 0)
1219 return buf.Bytes(), nil
1221 func (m *SwInterfaceDump) Unmarshal(b []byte) error {
1222 buf := codec.NewBuffer(b)
1223 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1224 m.NameFilterValid = buf.DecodeBool()
1225 m.NameFilter = buf.DecodeString(0)
1229 // SwInterfaceEvent defines message 'sw_interface_event'.
1230 type SwInterfaceEvent struct {
1231 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1232 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1233 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1234 Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
1237 func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
1238 func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" }
1239 func (*SwInterfaceEvent) GetCrcString() string { return "2d3d95a7" }
1240 func (*SwInterfaceEvent) GetMessageType() api.MessageType {
1241 return api.EventMessage
1244 func (m *SwInterfaceEvent) Size() (size int) {
1249 size += 4 // m.SwIfIndex
1250 size += 4 // m.Flags
1251 size += 1 // m.Deleted
1254 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
1256 b = make([]byte, m.Size())
1258 buf := codec.NewBuffer(b)
1259 buf.EncodeUint32(m.PID)
1260 buf.EncodeUint32(uint32(m.SwIfIndex))
1261 buf.EncodeUint32(uint32(m.Flags))
1262 buf.EncodeBool(m.Deleted)
1263 return buf.Bytes(), nil
1265 func (m *SwInterfaceEvent) Unmarshal(b []byte) error {
1266 buf := codec.NewBuffer(b)
1267 m.PID = buf.DecodeUint32()
1268 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1269 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1270 m.Deleted = buf.DecodeBool()
1274 // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'.
1275 type SwInterfaceGetMacAddress struct {
1276 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1279 func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
1280 func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" }
1281 func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" }
1282 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType {
1283 return api.RequestMessage
1286 func (m *SwInterfaceGetMacAddress) Size() (size int) {
1290 size += 4 // m.SwIfIndex
1293 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
1295 b = make([]byte, m.Size())
1297 buf := codec.NewBuffer(b)
1298 buf.EncodeUint32(uint32(m.SwIfIndex))
1299 return buf.Bytes(), nil
1301 func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error {
1302 buf := codec.NewBuffer(b)
1303 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1307 // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'.
1308 type SwInterfaceGetMacAddressReply struct {
1309 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1310 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1313 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
1314 func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
1315 return "sw_interface_get_mac_address_reply"
1317 func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
1318 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType {
1319 return api.ReplyMessage
1322 func (m *SwInterfaceGetMacAddressReply) Size() (size int) {
1326 size += 4 // m.Retval
1327 size += 1 * 6 // m.MacAddress
1330 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
1332 b = make([]byte, m.Size())
1334 buf := codec.NewBuffer(b)
1335 buf.EncodeInt32(m.Retval)
1336 buf.EncodeBytes(m.MacAddress[:], 6)
1337 return buf.Bytes(), nil
1339 func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error {
1340 buf := codec.NewBuffer(b)
1341 m.Retval = buf.DecodeInt32()
1342 copy(m.MacAddress[:], buf.DecodeBytes(6))
1346 // SwInterfaceGetTable defines message 'sw_interface_get_table'.
1347 type SwInterfaceGetTable struct {
1348 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1349 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1352 func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
1353 func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" }
1354 func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" }
1355 func (*SwInterfaceGetTable) GetMessageType() api.MessageType {
1356 return api.RequestMessage
1359 func (m *SwInterfaceGetTable) Size() (size int) {
1363 size += 4 // m.SwIfIndex
1364 size += 1 // m.IsIPv6
1367 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
1369 b = make([]byte, m.Size())
1371 buf := codec.NewBuffer(b)
1372 buf.EncodeUint32(uint32(m.SwIfIndex))
1373 buf.EncodeBool(m.IsIPv6)
1374 return buf.Bytes(), nil
1376 func (m *SwInterfaceGetTable) Unmarshal(b []byte) error {
1377 buf := codec.NewBuffer(b)
1378 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1379 m.IsIPv6 = buf.DecodeBool()
1383 // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'.
1384 type SwInterfaceGetTableReply struct {
1385 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1386 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1389 func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} }
1390 func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" }
1391 func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" }
1392 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType {
1393 return api.ReplyMessage
1396 func (m *SwInterfaceGetTableReply) Size() (size int) {
1400 size += 4 // m.Retval
1401 size += 4 // m.VrfID
1404 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
1406 b = make([]byte, m.Size())
1408 buf := codec.NewBuffer(b)
1409 buf.EncodeInt32(m.Retval)
1410 buf.EncodeUint32(m.VrfID)
1411 return buf.Bytes(), nil
1413 func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error {
1414 buf := codec.NewBuffer(b)
1415 m.Retval = buf.DecodeInt32()
1416 m.VrfID = buf.DecodeUint32()
1420 // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'.
1421 type SwInterfaceRxPlacementDetails struct {
1422 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1423 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1424 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
1425 Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
1428 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
1429 func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
1430 return "sw_interface_rx_placement_details"
1432 func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "9e44a7ce" }
1433 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType {
1434 return api.RequestMessage
1437 func (m *SwInterfaceRxPlacementDetails) Size() (size int) {
1441 size += 4 // m.SwIfIndex
1442 size += 4 // m.QueueID
1443 size += 4 // m.WorkerID
1447 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
1449 b = make([]byte, m.Size())
1451 buf := codec.NewBuffer(b)
1452 buf.EncodeUint32(uint32(m.SwIfIndex))
1453 buf.EncodeUint32(m.QueueID)
1454 buf.EncodeUint32(m.WorkerID)
1455 buf.EncodeUint32(uint32(m.Mode))
1456 return buf.Bytes(), nil
1458 func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error {
1459 buf := codec.NewBuffer(b)
1460 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1461 m.QueueID = buf.DecodeUint32()
1462 m.WorkerID = buf.DecodeUint32()
1463 m.Mode = interface_types.RxMode(buf.DecodeUint32())
1467 // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'.
1468 type SwInterfaceRxPlacementDump struct {
1469 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1472 func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
1473 func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" }
1474 func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" }
1475 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType {
1476 return api.RequestMessage
1479 func (m *SwInterfaceRxPlacementDump) Size() (size int) {
1483 size += 4 // m.SwIfIndex
1486 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
1488 b = make([]byte, m.Size())
1490 buf := codec.NewBuffer(b)
1491 buf.EncodeUint32(uint32(m.SwIfIndex))
1492 return buf.Bytes(), nil
1494 func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error {
1495 buf := codec.NewBuffer(b)
1496 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1500 // SwInterfaceSetFlags defines message 'sw_interface_set_flags'.
1501 type SwInterfaceSetFlags struct {
1502 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1503 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1506 func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
1507 func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" }
1508 func (*SwInterfaceSetFlags) GetCrcString() string { return "f5aec1b8" }
1509 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType {
1510 return api.RequestMessage
1513 func (m *SwInterfaceSetFlags) Size() (size int) {
1517 size += 4 // m.SwIfIndex
1518 size += 4 // m.Flags
1521 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
1523 b = make([]byte, m.Size())
1525 buf := codec.NewBuffer(b)
1526 buf.EncodeUint32(uint32(m.SwIfIndex))
1527 buf.EncodeUint32(uint32(m.Flags))
1528 return buf.Bytes(), nil
1530 func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error {
1531 buf := codec.NewBuffer(b)
1532 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1533 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1537 // SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'.
1538 type SwInterfaceSetFlagsReply struct {
1539 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1542 func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} }
1543 func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" }
1544 func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" }
1545 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType {
1546 return api.ReplyMessage
1549 func (m *SwInterfaceSetFlagsReply) Size() (size int) {
1553 size += 4 // m.Retval
1556 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
1558 b = make([]byte, m.Size())
1560 buf := codec.NewBuffer(b)
1561 buf.EncodeInt32(m.Retval)
1562 return buf.Bytes(), nil
1564 func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
1565 buf := codec.NewBuffer(b)
1566 m.Retval = buf.DecodeInt32()
1570 // SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'.
1571 type SwInterfaceSetInterfaceName struct {
1572 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1573 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1576 func (m *SwInterfaceSetInterfaceName) Reset() { *m = SwInterfaceSetInterfaceName{} }
1577 func (*SwInterfaceSetInterfaceName) GetMessageName() string { return "sw_interface_set_interface_name" }
1578 func (*SwInterfaceSetInterfaceName) GetCrcString() string { return "45a1d548" }
1579 func (*SwInterfaceSetInterfaceName) GetMessageType() api.MessageType {
1580 return api.RequestMessage
1583 func (m *SwInterfaceSetInterfaceName) Size() (size int) {
1587 size += 4 // m.SwIfIndex
1588 size += 64 // m.Name
1591 func (m *SwInterfaceSetInterfaceName) Marshal(b []byte) ([]byte, error) {
1593 b = make([]byte, m.Size())
1595 buf := codec.NewBuffer(b)
1596 buf.EncodeUint32(uint32(m.SwIfIndex))
1597 buf.EncodeString(m.Name, 64)
1598 return buf.Bytes(), nil
1600 func (m *SwInterfaceSetInterfaceName) Unmarshal(b []byte) error {
1601 buf := codec.NewBuffer(b)
1602 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1603 m.Name = buf.DecodeString(64)
1607 // SwInterfaceSetInterfaceNameReply defines message 'sw_interface_set_interface_name_reply'.
1608 type SwInterfaceSetInterfaceNameReply struct {
1609 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1612 func (m *SwInterfaceSetInterfaceNameReply) Reset() { *m = SwInterfaceSetInterfaceNameReply{} }
1613 func (*SwInterfaceSetInterfaceNameReply) GetMessageName() string {
1614 return "sw_interface_set_interface_name_reply"
1616 func (*SwInterfaceSetInterfaceNameReply) GetCrcString() string { return "e8d4e804" }
1617 func (*SwInterfaceSetInterfaceNameReply) GetMessageType() api.MessageType {
1618 return api.ReplyMessage
1621 func (m *SwInterfaceSetInterfaceNameReply) Size() (size int) {
1625 size += 4 // m.Retval
1628 func (m *SwInterfaceSetInterfaceNameReply) Marshal(b []byte) ([]byte, error) {
1630 b = make([]byte, m.Size())
1632 buf := codec.NewBuffer(b)
1633 buf.EncodeInt32(m.Retval)
1634 return buf.Bytes(), nil
1636 func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error {
1637 buf := codec.NewBuffer(b)
1638 m.Retval = buf.DecodeInt32()
1642 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
1643 type SwInterfaceSetIPDirectedBroadcast struct {
1644 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1645 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1648 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
1649 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
1650 return "sw_interface_set_ip_directed_broadcast"
1652 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
1653 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
1654 return api.RequestMessage
1657 func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) {
1661 size += 4 // m.SwIfIndex
1662 size += 1 // m.Enable
1665 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
1667 b = make([]byte, m.Size())
1669 buf := codec.NewBuffer(b)
1670 buf.EncodeUint32(uint32(m.SwIfIndex))
1671 buf.EncodeBool(m.Enable)
1672 return buf.Bytes(), nil
1674 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
1675 buf := codec.NewBuffer(b)
1676 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1677 m.Enable = buf.DecodeBool()
1681 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
1682 type SwInterfaceSetIPDirectedBroadcastReply struct {
1683 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1686 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
1687 *m = SwInterfaceSetIPDirectedBroadcastReply{}
1689 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
1690 return "sw_interface_set_ip_directed_broadcast_reply"
1692 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
1693 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
1694 return api.ReplyMessage
1697 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) {
1701 size += 4 // m.Retval
1704 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
1706 b = make([]byte, m.Size())
1708 buf := codec.NewBuffer(b)
1709 buf.EncodeInt32(m.Retval)
1710 return buf.Bytes(), nil
1712 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
1713 buf := codec.NewBuffer(b)
1714 m.Retval = buf.DecodeInt32()
1718 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
1719 type SwInterfaceSetMacAddress struct {
1720 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1721 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1724 func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
1725 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
1726 func (*SwInterfaceSetMacAddress) GetCrcString() string { return "c536e7eb" }
1727 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
1728 return api.RequestMessage
1731 func (m *SwInterfaceSetMacAddress) Size() (size int) {
1735 size += 4 // m.SwIfIndex
1736 size += 1 * 6 // m.MacAddress
1739 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
1741 b = make([]byte, m.Size())
1743 buf := codec.NewBuffer(b)
1744 buf.EncodeUint32(uint32(m.SwIfIndex))
1745 buf.EncodeBytes(m.MacAddress[:], 6)
1746 return buf.Bytes(), nil
1748 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
1749 buf := codec.NewBuffer(b)
1750 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1751 copy(m.MacAddress[:], buf.DecodeBytes(6))
1755 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
1756 type SwInterfaceSetMacAddressReply struct {
1757 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1760 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
1761 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
1762 return "sw_interface_set_mac_address_reply"
1764 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
1765 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
1766 return api.ReplyMessage
1769 func (m *SwInterfaceSetMacAddressReply) Size() (size int) {
1773 size += 4 // m.Retval
1776 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
1778 b = make([]byte, m.Size())
1780 buf := codec.NewBuffer(b)
1781 buf.EncodeInt32(m.Retval)
1782 return buf.Bytes(), nil
1784 func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
1785 buf := codec.NewBuffer(b)
1786 m.Retval = buf.DecodeInt32()
1790 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
1791 type SwInterfaceSetMtu struct {
1792 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1793 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1796 func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
1797 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
1798 func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" }
1799 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
1800 return api.RequestMessage
1803 func (m *SwInterfaceSetMtu) Size() (size int) {
1807 size += 4 // m.SwIfIndex
1808 size += 4 * 4 // m.Mtu
1811 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
1813 b = make([]byte, m.Size())
1815 buf := codec.NewBuffer(b)
1816 buf.EncodeUint32(uint32(m.SwIfIndex))
1817 for i := 0; i < 4; i++ {
1820 x = uint32(m.Mtu[i])
1824 return buf.Bytes(), nil
1826 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
1827 buf := codec.NewBuffer(b)
1828 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1829 m.Mtu = make([]uint32, 4)
1830 for i := 0; i < len(m.Mtu); i++ {
1831 m.Mtu[i] = buf.DecodeUint32()
1836 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
1837 type SwInterfaceSetMtuReply struct {
1838 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1841 func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} }
1842 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
1843 func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
1844 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
1845 return api.ReplyMessage
1848 func (m *SwInterfaceSetMtuReply) Size() (size int) {
1852 size += 4 // m.Retval
1855 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1857 b = make([]byte, m.Size())
1859 buf := codec.NewBuffer(b)
1860 buf.EncodeInt32(m.Retval)
1861 return buf.Bytes(), nil
1863 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
1864 buf := codec.NewBuffer(b)
1865 m.Retval = buf.DecodeInt32()
1869 // SwInterfaceSetPromisc defines message 'sw_interface_set_promisc'.
1870 type SwInterfaceSetPromisc struct {
1871 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1872 PromiscOn bool `binapi:"bool,name=promisc_on" json:"promisc_on,omitempty"`
1875 func (m *SwInterfaceSetPromisc) Reset() { *m = SwInterfaceSetPromisc{} }
1876 func (*SwInterfaceSetPromisc) GetMessageName() string { return "sw_interface_set_promisc" }
1877 func (*SwInterfaceSetPromisc) GetCrcString() string { return "d40860d4" }
1878 func (*SwInterfaceSetPromisc) GetMessageType() api.MessageType {
1879 return api.RequestMessage
1882 func (m *SwInterfaceSetPromisc) Size() (size int) {
1886 size += 4 // m.SwIfIndex
1887 size += 1 // m.PromiscOn
1890 func (m *SwInterfaceSetPromisc) Marshal(b []byte) ([]byte, error) {
1892 b = make([]byte, m.Size())
1894 buf := codec.NewBuffer(b)
1895 buf.EncodeUint32(uint32(m.SwIfIndex))
1896 buf.EncodeBool(m.PromiscOn)
1897 return buf.Bytes(), nil
1899 func (m *SwInterfaceSetPromisc) Unmarshal(b []byte) error {
1900 buf := codec.NewBuffer(b)
1901 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1902 m.PromiscOn = buf.DecodeBool()
1906 // SwInterfaceSetPromiscReply defines message 'sw_interface_set_promisc_reply'.
1907 type SwInterfaceSetPromiscReply struct {
1908 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1911 func (m *SwInterfaceSetPromiscReply) Reset() { *m = SwInterfaceSetPromiscReply{} }
1912 func (*SwInterfaceSetPromiscReply) GetMessageName() string { return "sw_interface_set_promisc_reply" }
1913 func (*SwInterfaceSetPromiscReply) GetCrcString() string { return "e8d4e804" }
1914 func (*SwInterfaceSetPromiscReply) GetMessageType() api.MessageType {
1915 return api.ReplyMessage
1918 func (m *SwInterfaceSetPromiscReply) Size() (size int) {
1922 size += 4 // m.Retval
1925 func (m *SwInterfaceSetPromiscReply) Marshal(b []byte) ([]byte, error) {
1927 b = make([]byte, m.Size())
1929 buf := codec.NewBuffer(b)
1930 buf.EncodeInt32(m.Retval)
1931 return buf.Bytes(), nil
1933 func (m *SwInterfaceSetPromiscReply) Unmarshal(b []byte) error {
1934 buf := codec.NewBuffer(b)
1935 m.Retval = buf.DecodeInt32()
1939 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
1940 type SwInterfaceSetRxMode struct {
1941 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1942 QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
1943 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1944 Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
1947 func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
1948 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
1949 func (*SwInterfaceSetRxMode) GetCrcString() string { return "b04d1cfe" }
1950 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
1951 return api.RequestMessage
1954 func (m *SwInterfaceSetRxMode) Size() (size int) {
1958 size += 4 // m.SwIfIndex
1959 size += 1 // m.QueueIDValid
1960 size += 4 // m.QueueID
1964 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
1966 b = make([]byte, m.Size())
1968 buf := codec.NewBuffer(b)
1969 buf.EncodeUint32(uint32(m.SwIfIndex))
1970 buf.EncodeBool(m.QueueIDValid)
1971 buf.EncodeUint32(m.QueueID)
1972 buf.EncodeUint32(uint32(m.Mode))
1973 return buf.Bytes(), nil
1975 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
1976 buf := codec.NewBuffer(b)
1977 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1978 m.QueueIDValid = buf.DecodeBool()
1979 m.QueueID = buf.DecodeUint32()
1980 m.Mode = interface_types.RxMode(buf.DecodeUint32())
1984 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
1985 type SwInterfaceSetRxModeReply struct {
1986 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1989 func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} }
1990 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
1991 func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" }
1992 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
1993 return api.ReplyMessage
1996 func (m *SwInterfaceSetRxModeReply) Size() (size int) {
2000 size += 4 // m.Retval
2003 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
2005 b = make([]byte, m.Size())
2007 buf := codec.NewBuffer(b)
2008 buf.EncodeInt32(m.Retval)
2009 return buf.Bytes(), nil
2011 func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
2012 buf := codec.NewBuffer(b)
2013 m.Retval = buf.DecodeInt32()
2017 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
2018 type SwInterfaceSetRxPlacement struct {
2019 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2020 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2021 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2022 IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
2025 func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
2026 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
2027 func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" }
2028 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
2029 return api.RequestMessage
2032 func (m *SwInterfaceSetRxPlacement) Size() (size int) {
2036 size += 4 // m.SwIfIndex
2037 size += 4 // m.QueueID
2038 size += 4 // m.WorkerID
2039 size += 1 // m.IsMain
2042 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
2044 b = make([]byte, m.Size())
2046 buf := codec.NewBuffer(b)
2047 buf.EncodeUint32(uint32(m.SwIfIndex))
2048 buf.EncodeUint32(m.QueueID)
2049 buf.EncodeUint32(m.WorkerID)
2050 buf.EncodeBool(m.IsMain)
2051 return buf.Bytes(), nil
2053 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
2054 buf := codec.NewBuffer(b)
2055 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2056 m.QueueID = buf.DecodeUint32()
2057 m.WorkerID = buf.DecodeUint32()
2058 m.IsMain = buf.DecodeBool()
2062 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
2063 type SwInterfaceSetRxPlacementReply struct {
2064 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2067 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
2068 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
2069 return "sw_interface_set_rx_placement_reply"
2071 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
2072 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
2073 return api.ReplyMessage
2076 func (m *SwInterfaceSetRxPlacementReply) Size() (size int) {
2080 size += 4 // m.Retval
2083 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
2085 b = make([]byte, m.Size())
2087 buf := codec.NewBuffer(b)
2088 buf.EncodeInt32(m.Retval)
2089 return buf.Bytes(), nil
2091 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
2092 buf := codec.NewBuffer(b)
2093 m.Retval = buf.DecodeInt32()
2097 // SwInterfaceSetTable defines message 'sw_interface_set_table'.
2098 type SwInterfaceSetTable struct {
2099 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2100 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2101 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2104 func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
2105 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
2106 func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" }
2107 func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
2108 return api.RequestMessage
2111 func (m *SwInterfaceSetTable) Size() (size int) {
2115 size += 4 // m.SwIfIndex
2116 size += 1 // m.IsIPv6
2117 size += 4 // m.VrfID
2120 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
2122 b = make([]byte, m.Size())
2124 buf := codec.NewBuffer(b)
2125 buf.EncodeUint32(uint32(m.SwIfIndex))
2126 buf.EncodeBool(m.IsIPv6)
2127 buf.EncodeUint32(m.VrfID)
2128 return buf.Bytes(), nil
2130 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
2131 buf := codec.NewBuffer(b)
2132 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2133 m.IsIPv6 = buf.DecodeBool()
2134 m.VrfID = buf.DecodeUint32()
2138 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
2139 type SwInterfaceSetTableReply struct {
2140 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2143 func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} }
2144 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
2145 func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" }
2146 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
2147 return api.ReplyMessage
2150 func (m *SwInterfaceSetTableReply) Size() (size int) {
2154 size += 4 // m.Retval
2157 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
2159 b = make([]byte, m.Size())
2161 buf := codec.NewBuffer(b)
2162 buf.EncodeInt32(m.Retval)
2163 return buf.Bytes(), nil
2165 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
2166 buf := codec.NewBuffer(b)
2167 m.Retval = buf.DecodeInt32()
2171 // SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'.
2172 type SwInterfaceSetTxPlacement struct {
2173 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2174 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2175 ArraySize uint32 `binapi:"u32,name=array_size" json:"-"`
2176 Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"`
2179 func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} }
2180 func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" }
2181 func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" }
2182 func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType {
2183 return api.RequestMessage
2186 func (m *SwInterfaceSetTxPlacement) Size() (size int) {
2190 size += 4 // m.SwIfIndex
2191 size += 4 // m.QueueID
2192 size += 4 // m.ArraySize
2193 size += 4 * len(m.Threads) // m.Threads
2196 func (m *SwInterfaceSetTxPlacement) Marshal(b []byte) ([]byte, error) {
2198 b = make([]byte, m.Size())
2200 buf := codec.NewBuffer(b)
2201 buf.EncodeUint32(uint32(m.SwIfIndex))
2202 buf.EncodeUint32(m.QueueID)
2203 buf.EncodeUint32(uint32(len(m.Threads)))
2204 for i := 0; i < len(m.Threads); i++ {
2206 if i < len(m.Threads) {
2207 x = uint32(m.Threads[i])
2211 return buf.Bytes(), nil
2213 func (m *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error {
2214 buf := codec.NewBuffer(b)
2215 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2216 m.QueueID = buf.DecodeUint32()
2217 m.ArraySize = buf.DecodeUint32()
2218 m.Threads = make([]uint32, m.ArraySize)
2219 for i := 0; i < len(m.Threads); i++ {
2220 m.Threads[i] = buf.DecodeUint32()
2225 // SwInterfaceSetTxPlacementReply defines message 'sw_interface_set_tx_placement_reply'.
2226 type SwInterfaceSetTxPlacementReply struct {
2227 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2230 func (m *SwInterfaceSetTxPlacementReply) Reset() { *m = SwInterfaceSetTxPlacementReply{} }
2231 func (*SwInterfaceSetTxPlacementReply) GetMessageName() string {
2232 return "sw_interface_set_tx_placement_reply"
2234 func (*SwInterfaceSetTxPlacementReply) GetCrcString() string { return "e8d4e804" }
2235 func (*SwInterfaceSetTxPlacementReply) GetMessageType() api.MessageType {
2236 return api.ReplyMessage
2239 func (m *SwInterfaceSetTxPlacementReply) Size() (size int) {
2243 size += 4 // m.Retval
2246 func (m *SwInterfaceSetTxPlacementReply) Marshal(b []byte) ([]byte, error) {
2248 b = make([]byte, m.Size())
2250 buf := codec.NewBuffer(b)
2251 buf.EncodeInt32(m.Retval)
2252 return buf.Bytes(), nil
2254 func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error {
2255 buf := codec.NewBuffer(b)
2256 m.Retval = buf.DecodeInt32()
2260 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
2261 type SwInterfaceSetUnnumbered struct {
2262 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2263 UnnumberedSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
2264 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2267 func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
2268 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
2269 func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "154a6439" }
2270 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
2271 return api.RequestMessage
2274 func (m *SwInterfaceSetUnnumbered) Size() (size int) {
2278 size += 4 // m.SwIfIndex
2279 size += 4 // m.UnnumberedSwIfIndex
2280 size += 1 // m.IsAdd
2283 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
2285 b = make([]byte, m.Size())
2287 buf := codec.NewBuffer(b)
2288 buf.EncodeUint32(uint32(m.SwIfIndex))
2289 buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
2290 buf.EncodeBool(m.IsAdd)
2291 return buf.Bytes(), nil
2293 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
2294 buf := codec.NewBuffer(b)
2295 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2296 m.UnnumberedSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2297 m.IsAdd = buf.DecodeBool()
2301 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
2302 type SwInterfaceSetUnnumberedReply struct {
2303 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2306 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
2307 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
2308 return "sw_interface_set_unnumbered_reply"
2310 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
2311 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
2312 return api.ReplyMessage
2315 func (m *SwInterfaceSetUnnumberedReply) Size() (size int) {
2319 size += 4 // m.Retval
2322 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
2324 b = make([]byte, m.Size())
2326 buf := codec.NewBuffer(b)
2327 buf.EncodeInt32(m.Retval)
2328 return buf.Bytes(), nil
2330 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
2331 buf := codec.NewBuffer(b)
2332 m.Retval = buf.DecodeInt32()
2336 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
2337 type SwInterfaceTagAddDel struct {
2338 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2339 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2340 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
2343 func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
2344 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
2345 func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" }
2346 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
2347 return api.RequestMessage
2350 func (m *SwInterfaceTagAddDel) Size() (size int) {
2354 size += 1 // m.IsAdd
2355 size += 4 // m.SwIfIndex
2359 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
2361 b = make([]byte, m.Size())
2363 buf := codec.NewBuffer(b)
2364 buf.EncodeBool(m.IsAdd)
2365 buf.EncodeUint32(uint32(m.SwIfIndex))
2366 buf.EncodeString(m.Tag, 64)
2367 return buf.Bytes(), nil
2369 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
2370 buf := codec.NewBuffer(b)
2371 m.IsAdd = buf.DecodeBool()
2372 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2373 m.Tag = buf.DecodeString(64)
2377 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
2378 type SwInterfaceTagAddDelReply struct {
2379 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2382 func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} }
2383 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
2384 func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" }
2385 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
2386 return api.ReplyMessage
2389 func (m *SwInterfaceTagAddDelReply) Size() (size int) {
2393 size += 4 // m.Retval
2396 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
2398 b = make([]byte, m.Size())
2400 buf := codec.NewBuffer(b)
2401 buf.EncodeInt32(m.Retval)
2402 return buf.Bytes(), nil
2404 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
2405 buf := codec.NewBuffer(b)
2406 m.Retval = buf.DecodeInt32()
2410 // SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'.
2411 type SwInterfaceTxPlacementDetails struct {
2412 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2413 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2414 Shared uint8 `binapi:"u8,name=shared" json:"shared,omitempty"`
2415 ArraySize uint32 `binapi:"u32,name=array_size" json:"-"`
2416 Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"`
2419 func (m *SwInterfaceTxPlacementDetails) Reset() { *m = SwInterfaceTxPlacementDetails{} }
2420 func (*SwInterfaceTxPlacementDetails) GetMessageName() string {
2421 return "sw_interface_tx_placement_details"
2423 func (*SwInterfaceTxPlacementDetails) GetCrcString() string { return "00381a2e" }
2424 func (*SwInterfaceTxPlacementDetails) GetMessageType() api.MessageType {
2425 return api.RequestMessage
2428 func (m *SwInterfaceTxPlacementDetails) Size() (size int) {
2432 size += 4 // m.SwIfIndex
2433 size += 4 // m.QueueID
2434 size += 1 // m.Shared
2435 size += 4 // m.ArraySize
2436 size += 4 * len(m.Threads) // m.Threads
2439 func (m *SwInterfaceTxPlacementDetails) Marshal(b []byte) ([]byte, error) {
2441 b = make([]byte, m.Size())
2443 buf := codec.NewBuffer(b)
2444 buf.EncodeUint32(uint32(m.SwIfIndex))
2445 buf.EncodeUint32(m.QueueID)
2446 buf.EncodeUint8(m.Shared)
2447 buf.EncodeUint32(uint32(len(m.Threads)))
2448 for i := 0; i < len(m.Threads); i++ {
2450 if i < len(m.Threads) {
2451 x = uint32(m.Threads[i])
2455 return buf.Bytes(), nil
2457 func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error {
2458 buf := codec.NewBuffer(b)
2459 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2460 m.QueueID = buf.DecodeUint32()
2461 m.Shared = buf.DecodeUint8()
2462 m.ArraySize = buf.DecodeUint32()
2463 m.Threads = make([]uint32, m.ArraySize)
2464 for i := 0; i < len(m.Threads); i++ {
2465 m.Threads[i] = buf.DecodeUint32()
2470 // SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'.
2471 type SwInterfaceTxPlacementGet struct {
2472 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
2473 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2476 func (m *SwInterfaceTxPlacementGet) Reset() { *m = SwInterfaceTxPlacementGet{} }
2477 func (*SwInterfaceTxPlacementGet) GetMessageName() string { return "sw_interface_tx_placement_get" }
2478 func (*SwInterfaceTxPlacementGet) GetCrcString() string { return "47250981" }
2479 func (*SwInterfaceTxPlacementGet) GetMessageType() api.MessageType {
2480 return api.RequestMessage
2483 func (m *SwInterfaceTxPlacementGet) Size() (size int) {
2487 size += 4 // m.Cursor
2488 size += 4 // m.SwIfIndex
2491 func (m *SwInterfaceTxPlacementGet) Marshal(b []byte) ([]byte, error) {
2493 b = make([]byte, m.Size())
2495 buf := codec.NewBuffer(b)
2496 buf.EncodeUint32(m.Cursor)
2497 buf.EncodeUint32(uint32(m.SwIfIndex))
2498 return buf.Bytes(), nil
2500 func (m *SwInterfaceTxPlacementGet) Unmarshal(b []byte) error {
2501 buf := codec.NewBuffer(b)
2502 m.Cursor = buf.DecodeUint32()
2503 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2507 // SwInterfaceTxPlacementGetReply defines message 'sw_interface_tx_placement_get_reply'.
2508 type SwInterfaceTxPlacementGetReply struct {
2509 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2510 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
2513 func (m *SwInterfaceTxPlacementGetReply) Reset() { *m = SwInterfaceTxPlacementGetReply{} }
2514 func (*SwInterfaceTxPlacementGetReply) GetMessageName() string {
2515 return "sw_interface_tx_placement_get_reply"
2517 func (*SwInterfaceTxPlacementGetReply) GetCrcString() string { return "53b48f5d" }
2518 func (*SwInterfaceTxPlacementGetReply) GetMessageType() api.MessageType {
2519 return api.ReplyMessage
2522 func (m *SwInterfaceTxPlacementGetReply) Size() (size int) {
2526 size += 4 // m.Retval
2527 size += 4 // m.Cursor
2530 func (m *SwInterfaceTxPlacementGetReply) Marshal(b []byte) ([]byte, error) {
2532 b = make([]byte, m.Size())
2534 buf := codec.NewBuffer(b)
2535 buf.EncodeInt32(m.Retval)
2536 buf.EncodeUint32(m.Cursor)
2537 return buf.Bytes(), nil
2539 func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error {
2540 buf := codec.NewBuffer(b)
2541 m.Retval = buf.DecodeInt32()
2542 m.Cursor = buf.DecodeUint32()
2546 // WantInterfaceEvents defines message 'want_interface_events'.
2547 type WantInterfaceEvents struct {
2548 EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
2549 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2552 func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} }
2553 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
2554 func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" }
2555 func (*WantInterfaceEvents) GetMessageType() api.MessageType {
2556 return api.RequestMessage
2559 func (m *WantInterfaceEvents) Size() (size int) {
2563 size += 4 // m.EnableDisable
2567 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
2569 b = make([]byte, m.Size())
2571 buf := codec.NewBuffer(b)
2572 buf.EncodeUint32(m.EnableDisable)
2573 buf.EncodeUint32(m.PID)
2574 return buf.Bytes(), nil
2576 func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
2577 buf := codec.NewBuffer(b)
2578 m.EnableDisable = buf.DecodeUint32()
2579 m.PID = buf.DecodeUint32()
2583 // WantInterfaceEventsReply defines message 'want_interface_events_reply'.
2584 type WantInterfaceEventsReply struct {
2585 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2588 func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} }
2589 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
2590 func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" }
2591 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
2592 return api.ReplyMessage
2595 func (m *WantInterfaceEventsReply) Size() (size int) {
2599 size += 4 // m.Retval
2602 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
2604 b = make([]byte, m.Size())
2606 buf := codec.NewBuffer(b)
2607 buf.EncodeInt32(m.Retval)
2608 return buf.Bytes(), nil
2610 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error {
2611 buf := codec.NewBuffer(b)
2612 m.Retval = buf.DecodeInt32()
2616 func init() { file_interfaces_binapi_init() }
2617 func file_interfaces_binapi_init() {
2618 api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
2619 api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
2620 api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
2621 api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
2622 api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
2623 api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
2624 api.RegisterMessage((*CreateSubif)(nil), "create_subif_790ca755")
2625 api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
2626 api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
2627 api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
2628 api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
2629 api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
2630 api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
2631 api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
2632 api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
2633 api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
2634 api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
2635 api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
2636 api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5463d73b")
2637 api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
2638 api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
2639 api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
2640 api.RegisterMessage((*SwInterfaceAddressReplaceBegin)(nil), "sw_interface_address_replace_begin_51077d14")
2641 api.RegisterMessage((*SwInterfaceAddressReplaceBeginReply)(nil), "sw_interface_address_replace_begin_reply_e8d4e804")
2642 api.RegisterMessage((*SwInterfaceAddressReplaceEnd)(nil), "sw_interface_address_replace_end_51077d14")
2643 api.RegisterMessage((*SwInterfaceAddressReplaceEndReply)(nil), "sw_interface_address_replace_end_reply_e8d4e804")
2644 api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
2645 api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
2646 api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_6c221fc7")
2647 api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
2648 api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_2d3d95a7")
2649 api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
2650 api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
2651 api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
2652 api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
2653 api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_9e44a7ce")
2654 api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
2655 api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_f5aec1b8")
2656 api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
2657 api.RegisterMessage((*SwInterfaceSetInterfaceName)(nil), "sw_interface_set_interface_name_45a1d548")
2658 api.RegisterMessage((*SwInterfaceSetInterfaceNameReply)(nil), "sw_interface_set_interface_name_reply_e8d4e804")
2659 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
2660 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
2661 api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_c536e7eb")
2662 api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
2663 api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
2664 api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
2665 api.RegisterMessage((*SwInterfaceSetPromisc)(nil), "sw_interface_set_promisc_d40860d4")
2666 api.RegisterMessage((*SwInterfaceSetPromiscReply)(nil), "sw_interface_set_promisc_reply_e8d4e804")
2667 api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_b04d1cfe")
2668 api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
2669 api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
2670 api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
2671 api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
2672 api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
2673 api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff")
2674 api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804")
2675 api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439")
2676 api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
2677 api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
2678 api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
2679 api.RegisterMessage((*SwInterfaceTxPlacementDetails)(nil), "sw_interface_tx_placement_details_00381a2e")
2680 api.RegisterMessage((*SwInterfaceTxPlacementGet)(nil), "sw_interface_tx_placement_get_47250981")
2681 api.RegisterMessage((*SwInterfaceTxPlacementGetReply)(nil), "sw_interface_tx_placement_get_reply_53b48f5d")
2682 api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
2683 api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
2686 // Messages returns list of all messages in this module.
2687 func AllMessages() []api.Message {
2688 return []api.Message{
2689 (*CollectDetailedInterfaceStats)(nil),
2690 (*CollectDetailedInterfaceStatsReply)(nil),
2691 (*CreateLoopback)(nil),
2692 (*CreateLoopbackInstance)(nil),
2693 (*CreateLoopbackInstanceReply)(nil),
2694 (*CreateLoopbackReply)(nil),
2695 (*CreateSubif)(nil),
2696 (*CreateSubifReply)(nil),
2697 (*CreateVlanSubif)(nil),
2698 (*CreateVlanSubifReply)(nil),
2699 (*DeleteLoopback)(nil),
2700 (*DeleteLoopbackReply)(nil),
2701 (*DeleteSubif)(nil),
2702 (*DeleteSubifReply)(nil),
2703 (*HwInterfaceSetMtu)(nil),
2704 (*HwInterfaceSetMtuReply)(nil),
2705 (*InterfaceNameRenumber)(nil),
2706 (*InterfaceNameRenumberReply)(nil),
2707 (*SwInterfaceAddDelAddress)(nil),
2708 (*SwInterfaceAddDelAddressReply)(nil),
2709 (*SwInterfaceAddDelMacAddress)(nil),
2710 (*SwInterfaceAddDelMacAddressReply)(nil),
2711 (*SwInterfaceAddressReplaceBegin)(nil),
2712 (*SwInterfaceAddressReplaceBeginReply)(nil),
2713 (*SwInterfaceAddressReplaceEnd)(nil),
2714 (*SwInterfaceAddressReplaceEndReply)(nil),
2715 (*SwInterfaceClearStats)(nil),
2716 (*SwInterfaceClearStatsReply)(nil),
2717 (*SwInterfaceDetails)(nil),
2718 (*SwInterfaceDump)(nil),
2719 (*SwInterfaceEvent)(nil),
2720 (*SwInterfaceGetMacAddress)(nil),
2721 (*SwInterfaceGetMacAddressReply)(nil),
2722 (*SwInterfaceGetTable)(nil),
2723 (*SwInterfaceGetTableReply)(nil),
2724 (*SwInterfaceRxPlacementDetails)(nil),
2725 (*SwInterfaceRxPlacementDump)(nil),
2726 (*SwInterfaceSetFlags)(nil),
2727 (*SwInterfaceSetFlagsReply)(nil),
2728 (*SwInterfaceSetInterfaceName)(nil),
2729 (*SwInterfaceSetInterfaceNameReply)(nil),
2730 (*SwInterfaceSetIPDirectedBroadcast)(nil),
2731 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
2732 (*SwInterfaceSetMacAddress)(nil),
2733 (*SwInterfaceSetMacAddressReply)(nil),
2734 (*SwInterfaceSetMtu)(nil),
2735 (*SwInterfaceSetMtuReply)(nil),
2736 (*SwInterfaceSetPromisc)(nil),
2737 (*SwInterfaceSetPromiscReply)(nil),
2738 (*SwInterfaceSetRxMode)(nil),
2739 (*SwInterfaceSetRxModeReply)(nil),
2740 (*SwInterfaceSetRxPlacement)(nil),
2741 (*SwInterfaceSetRxPlacementReply)(nil),
2742 (*SwInterfaceSetTable)(nil),
2743 (*SwInterfaceSetTableReply)(nil),
2744 (*SwInterfaceSetTxPlacement)(nil),
2745 (*SwInterfaceSetTxPlacementReply)(nil),
2746 (*SwInterfaceSetUnnumbered)(nil),
2747 (*SwInterfaceSetUnnumberedReply)(nil),
2748 (*SwInterfaceTagAddDel)(nil),
2749 (*SwInterfaceTagAddDelReply)(nil),
2750 (*SwInterfaceTxPlacementDetails)(nil),
2751 (*SwInterfaceTxPlacementGet)(nil),
2752 (*SwInterfaceTxPlacementGetReply)(nil),
2753 (*WantInterfaceEvents)(nil),
2754 (*WantInterfaceEventsReply)(nil),