1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/plugins/nsh.api.json
7 // Package nsh contains generated bindings for API file nsh.api.
17 api "git.fd.io/govpp.git/api"
18 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 = 0xac2c8897
34 // IfStatusFlags defines enum 'if_status_flags'.
35 type IfStatusFlags uint32
38 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
39 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
43 IfStatusFlags_name = map[uint32]string{
44 1: "IF_STATUS_API_FLAG_ADMIN_UP",
45 2: "IF_STATUS_API_FLAG_LINK_UP",
47 IfStatusFlags_value = map[string]uint32{
48 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
49 "IF_STATUS_API_FLAG_LINK_UP": 2,
53 func (x IfStatusFlags) String() string {
54 s, ok := IfStatusFlags_name[uint32(x)]
58 str := func(n uint32) string {
59 s, ok := IfStatusFlags_name[uint32(n)]
63 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
65 for i := uint32(0); i <= 32; i++ {
80 // IfType defines enum 'if_type'.
84 IF_API_TYPE_HARDWARE IfType = 1
85 IF_API_TYPE_SUB IfType = 2
86 IF_API_TYPE_P2P IfType = 3
87 IF_API_TYPE_PIPE IfType = 4
91 IfType_name = map[uint32]string{
92 1: "IF_API_TYPE_HARDWARE",
95 4: "IF_API_TYPE_PIPE",
97 IfType_value = map[string]uint32{
98 "IF_API_TYPE_HARDWARE": 1,
100 "IF_API_TYPE_P2P": 3,
101 "IF_API_TYPE_PIPE": 4,
105 func (x IfType) String() string {
106 s, ok := IfType_name[uint32(x)]
110 return "IfType(" + strconv.Itoa(int(x)) + ")"
113 // LinkDuplex defines enum 'link_duplex'.
114 type LinkDuplex uint32
117 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
118 LINK_DUPLEX_API_HALF LinkDuplex = 1
119 LINK_DUPLEX_API_FULL LinkDuplex = 2
123 LinkDuplex_name = map[uint32]string{
124 0: "LINK_DUPLEX_API_UNKNOWN",
125 1: "LINK_DUPLEX_API_HALF",
126 2: "LINK_DUPLEX_API_FULL",
128 LinkDuplex_value = map[string]uint32{
129 "LINK_DUPLEX_API_UNKNOWN": 0,
130 "LINK_DUPLEX_API_HALF": 1,
131 "LINK_DUPLEX_API_FULL": 2,
135 func (x LinkDuplex) String() string {
136 s, ok := LinkDuplex_name[uint32(x)]
140 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
143 // MtuProto defines enum 'mtu_proto'.
147 MTU_PROTO_API_L3 MtuProto = 1
148 MTU_PROTO_API_IP4 MtuProto = 2
149 MTU_PROTO_API_IP6 MtuProto = 3
150 MTU_PROTO_API_MPLS MtuProto = 4
151 MTU_PROTO_API_N MtuProto = 5
155 MtuProto_name = map[uint32]string{
156 1: "MTU_PROTO_API_L3",
157 2: "MTU_PROTO_API_IP4",
158 3: "MTU_PROTO_API_IP6",
159 4: "MTU_PROTO_API_MPLS",
160 5: "MTU_PROTO_API_N",
162 MtuProto_value = map[string]uint32{
163 "MTU_PROTO_API_L3": 1,
164 "MTU_PROTO_API_IP4": 2,
165 "MTU_PROTO_API_IP6": 3,
166 "MTU_PROTO_API_MPLS": 4,
167 "MTU_PROTO_API_N": 5,
171 func (x MtuProto) String() string {
172 s, ok := MtuProto_name[uint32(x)]
176 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
179 // RxMode defines enum 'rx_mode'.
183 RX_MODE_API_UNKNOWN RxMode = 0
184 RX_MODE_API_POLLING RxMode = 1
185 RX_MODE_API_INTERRUPT RxMode = 2
186 RX_MODE_API_ADAPTIVE RxMode = 3
187 RX_MODE_API_DEFAULT RxMode = 4
191 RxMode_name = map[uint32]string{
192 0: "RX_MODE_API_UNKNOWN",
193 1: "RX_MODE_API_POLLING",
194 2: "RX_MODE_API_INTERRUPT",
195 3: "RX_MODE_API_ADAPTIVE",
196 4: "RX_MODE_API_DEFAULT",
198 RxMode_value = map[string]uint32{
199 "RX_MODE_API_UNKNOWN": 0,
200 "RX_MODE_API_POLLING": 1,
201 "RX_MODE_API_INTERRUPT": 2,
202 "RX_MODE_API_ADAPTIVE": 3,
203 "RX_MODE_API_DEFAULT": 4,
207 func (x RxMode) String() string {
208 s, ok := RxMode_name[uint32(x)]
212 return "RxMode(" + strconv.Itoa(int(x)) + ")"
215 // SubIfFlags defines enum 'sub_if_flags'.
216 type SubIfFlags uint32
219 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
220 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
221 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
222 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
223 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
224 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
225 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
226 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
227 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
228 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
232 SubIfFlags_name = map[uint32]string{
233 1: "SUB_IF_API_FLAG_NO_TAGS",
234 2: "SUB_IF_API_FLAG_ONE_TAG",
235 4: "SUB_IF_API_FLAG_TWO_TAGS",
236 8: "SUB_IF_API_FLAG_DOT1AD",
237 16: "SUB_IF_API_FLAG_EXACT_MATCH",
238 32: "SUB_IF_API_FLAG_DEFAULT",
239 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
240 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
241 254: "SUB_IF_API_FLAG_MASK_VNET",
242 256: "SUB_IF_API_FLAG_DOT1AH",
244 SubIfFlags_value = map[string]uint32{
245 "SUB_IF_API_FLAG_NO_TAGS": 1,
246 "SUB_IF_API_FLAG_ONE_TAG": 2,
247 "SUB_IF_API_FLAG_TWO_TAGS": 4,
248 "SUB_IF_API_FLAG_DOT1AD": 8,
249 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
250 "SUB_IF_API_FLAG_DEFAULT": 32,
251 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
252 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
253 "SUB_IF_API_FLAG_MASK_VNET": 254,
254 "SUB_IF_API_FLAG_DOT1AH": 256,
258 func (x SubIfFlags) String() string {
259 s, ok := SubIfFlags_name[uint32(x)]
263 str := func(n uint32) string {
264 s, ok := SubIfFlags_name[uint32(n)]
268 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
270 for i := uint32(0); i <= 32; i++ {
280 return str(uint32(x))
285 // InterfaceIndex defines alias 'interface_index'.
286 type InterfaceIndex uint32
288 // NshAddDelEntry defines message 'nsh_add_del_entry'.
289 type NshAddDelEntry struct {
290 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
291 NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
292 MdType uint8 `binapi:"u8,name=md_type" json:"md_type,omitempty"`
293 VerOC uint8 `binapi:"u8,name=ver_o_c" json:"ver_o_c,omitempty"`
294 TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
295 Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
296 NextProtocol uint8 `binapi:"u8,name=next_protocol" json:"next_protocol,omitempty"`
297 C1 uint32 `binapi:"u32,name=c1" json:"c1,omitempty"`
298 C2 uint32 `binapi:"u32,name=c2" json:"c2,omitempty"`
299 C3 uint32 `binapi:"u32,name=c3" json:"c3,omitempty"`
300 C4 uint32 `binapi:"u32,name=c4" json:"c4,omitempty"`
301 TlvLength uint8 `binapi:"u8,name=tlv_length" json:"tlv_length,omitempty"`
302 Tlv []byte `binapi:"u8[248],name=tlv" json:"tlv,omitempty"`
305 func (m *NshAddDelEntry) Reset() { *m = NshAddDelEntry{} }
306 func (*NshAddDelEntry) GetMessageName() string { return "nsh_add_del_entry" }
307 func (*NshAddDelEntry) GetCrcString() string { return "7dea480b" }
308 func (*NshAddDelEntry) GetMessageType() api.MessageType {
309 return api.RequestMessage
312 func (m *NshAddDelEntry) Size() (size int) {
317 size += 4 // m.NspNsi
318 size += 1 // m.MdType
321 size += 1 // m.Length
322 size += 1 // m.NextProtocol
327 size += 1 // m.TlvLength
328 size += 1 * 248 // m.Tlv
331 func (m *NshAddDelEntry) Marshal(b []byte) ([]byte, error) {
333 b = make([]byte, m.Size())
335 buf := codec.NewBuffer(b)
336 buf.EncodeBool(m.IsAdd)
337 buf.EncodeUint32(m.NspNsi)
338 buf.EncodeUint8(m.MdType)
339 buf.EncodeUint8(m.VerOC)
340 buf.EncodeUint8(m.TTL)
341 buf.EncodeUint8(m.Length)
342 buf.EncodeUint8(m.NextProtocol)
343 buf.EncodeUint32(m.C1)
344 buf.EncodeUint32(m.C2)
345 buf.EncodeUint32(m.C3)
346 buf.EncodeUint32(m.C4)
347 buf.EncodeUint8(m.TlvLength)
348 buf.EncodeBytes(m.Tlv, 248)
349 return buf.Bytes(), nil
351 func (m *NshAddDelEntry) Unmarshal(b []byte) error {
352 buf := codec.NewBuffer(b)
353 m.IsAdd = buf.DecodeBool()
354 m.NspNsi = buf.DecodeUint32()
355 m.MdType = buf.DecodeUint8()
356 m.VerOC = buf.DecodeUint8()
357 m.TTL = buf.DecodeUint8()
358 m.Length = buf.DecodeUint8()
359 m.NextProtocol = buf.DecodeUint8()
360 m.C1 = buf.DecodeUint32()
361 m.C2 = buf.DecodeUint32()
362 m.C3 = buf.DecodeUint32()
363 m.C4 = buf.DecodeUint32()
364 m.TlvLength = buf.DecodeUint8()
365 m.Tlv = make([]byte, 248)
366 copy(m.Tlv, buf.DecodeBytes(len(m.Tlv)))
370 // NshAddDelEntryReply defines message 'nsh_add_del_entry_reply'.
371 type NshAddDelEntryReply struct {
372 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
373 EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
376 func (m *NshAddDelEntryReply) Reset() { *m = NshAddDelEntryReply{} }
377 func (*NshAddDelEntryReply) GetMessageName() string { return "nsh_add_del_entry_reply" }
378 func (*NshAddDelEntryReply) GetCrcString() string { return "6296a9eb" }
379 func (*NshAddDelEntryReply) GetMessageType() api.MessageType {
380 return api.ReplyMessage
383 func (m *NshAddDelEntryReply) Size() (size int) {
387 size += 4 // m.Retval
388 size += 4 // m.EntryIndex
391 func (m *NshAddDelEntryReply) Marshal(b []byte) ([]byte, error) {
393 b = make([]byte, m.Size())
395 buf := codec.NewBuffer(b)
396 buf.EncodeInt32(m.Retval)
397 buf.EncodeUint32(m.EntryIndex)
398 return buf.Bytes(), nil
400 func (m *NshAddDelEntryReply) Unmarshal(b []byte) error {
401 buf := codec.NewBuffer(b)
402 m.Retval = buf.DecodeInt32()
403 m.EntryIndex = buf.DecodeUint32()
407 // NshAddDelMap defines message 'nsh_add_del_map'.
408 type NshAddDelMap struct {
409 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
410 NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
411 MappedNspNsi uint32 `binapi:"u32,name=mapped_nsp_nsi" json:"mapped_nsp_nsi,omitempty"`
412 NshAction uint32 `binapi:"u32,name=nsh_action" json:"nsh_action,omitempty"`
413 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
414 RxSwIfIndex InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
415 NextNode uint32 `binapi:"u32,name=next_node" json:"next_node,omitempty"`
418 func (m *NshAddDelMap) Reset() { *m = NshAddDelMap{} }
419 func (*NshAddDelMap) GetMessageName() string { return "nsh_add_del_map" }
420 func (*NshAddDelMap) GetCrcString() string { return "898d857d" }
421 func (*NshAddDelMap) GetMessageType() api.MessageType {
422 return api.RequestMessage
425 func (m *NshAddDelMap) Size() (size int) {
430 size += 4 // m.NspNsi
431 size += 4 // m.MappedNspNsi
432 size += 4 // m.NshAction
433 size += 4 // m.SwIfIndex
434 size += 4 // m.RxSwIfIndex
435 size += 4 // m.NextNode
438 func (m *NshAddDelMap) Marshal(b []byte) ([]byte, error) {
440 b = make([]byte, m.Size())
442 buf := codec.NewBuffer(b)
443 buf.EncodeBool(m.IsAdd)
444 buf.EncodeUint32(m.NspNsi)
445 buf.EncodeUint32(m.MappedNspNsi)
446 buf.EncodeUint32(m.NshAction)
447 buf.EncodeUint32(uint32(m.SwIfIndex))
448 buf.EncodeUint32(uint32(m.RxSwIfIndex))
449 buf.EncodeUint32(m.NextNode)
450 return buf.Bytes(), nil
452 func (m *NshAddDelMap) Unmarshal(b []byte) error {
453 buf := codec.NewBuffer(b)
454 m.IsAdd = buf.DecodeBool()
455 m.NspNsi = buf.DecodeUint32()
456 m.MappedNspNsi = buf.DecodeUint32()
457 m.NshAction = buf.DecodeUint32()
458 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
459 m.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
460 m.NextNode = buf.DecodeUint32()
464 // NshAddDelMapReply defines message 'nsh_add_del_map_reply'.
465 type NshAddDelMapReply struct {
466 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
467 MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
470 func (m *NshAddDelMapReply) Reset() { *m = NshAddDelMapReply{} }
471 func (*NshAddDelMapReply) GetMessageName() string { return "nsh_add_del_map_reply" }
472 func (*NshAddDelMapReply) GetCrcString() string { return "b2b127ef" }
473 func (*NshAddDelMapReply) GetMessageType() api.MessageType {
474 return api.ReplyMessage
477 func (m *NshAddDelMapReply) Size() (size int) {
481 size += 4 // m.Retval
482 size += 4 // m.MapIndex
485 func (m *NshAddDelMapReply) Marshal(b []byte) ([]byte, error) {
487 b = make([]byte, m.Size())
489 buf := codec.NewBuffer(b)
490 buf.EncodeInt32(m.Retval)
491 buf.EncodeUint32(m.MapIndex)
492 return buf.Bytes(), nil
494 func (m *NshAddDelMapReply) Unmarshal(b []byte) error {
495 buf := codec.NewBuffer(b)
496 m.Retval = buf.DecodeInt32()
497 m.MapIndex = buf.DecodeUint32()
501 // NshEntryDetails defines message 'nsh_entry_details'.
502 type NshEntryDetails struct {
503 EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
504 NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
505 MdType uint8 `binapi:"u8,name=md_type" json:"md_type,omitempty"`
506 VerOC uint8 `binapi:"u8,name=ver_o_c" json:"ver_o_c,omitempty"`
507 TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
508 Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
509 NextProtocol uint8 `binapi:"u8,name=next_protocol" json:"next_protocol,omitempty"`
510 C1 uint32 `binapi:"u32,name=c1" json:"c1,omitempty"`
511 C2 uint32 `binapi:"u32,name=c2" json:"c2,omitempty"`
512 C3 uint32 `binapi:"u32,name=c3" json:"c3,omitempty"`
513 C4 uint32 `binapi:"u32,name=c4" json:"c4,omitempty"`
514 TlvLength uint8 `binapi:"u8,name=tlv_length" json:"tlv_length,omitempty"`
515 Tlv []byte `binapi:"u8[248],name=tlv" json:"tlv,omitempty"`
518 func (m *NshEntryDetails) Reset() { *m = NshEntryDetails{} }
519 func (*NshEntryDetails) GetMessageName() string { return "nsh_entry_details" }
520 func (*NshEntryDetails) GetCrcString() string { return "046fb556" }
521 func (*NshEntryDetails) GetMessageType() api.MessageType {
522 return api.ReplyMessage
525 func (m *NshEntryDetails) Size() (size int) {
529 size += 4 // m.EntryIndex
530 size += 4 // m.NspNsi
531 size += 1 // m.MdType
534 size += 1 // m.Length
535 size += 1 // m.NextProtocol
540 size += 1 // m.TlvLength
541 size += 1 * 248 // m.Tlv
544 func (m *NshEntryDetails) Marshal(b []byte) ([]byte, error) {
546 b = make([]byte, m.Size())
548 buf := codec.NewBuffer(b)
549 buf.EncodeUint32(m.EntryIndex)
550 buf.EncodeUint32(m.NspNsi)
551 buf.EncodeUint8(m.MdType)
552 buf.EncodeUint8(m.VerOC)
553 buf.EncodeUint8(m.TTL)
554 buf.EncodeUint8(m.Length)
555 buf.EncodeUint8(m.NextProtocol)
556 buf.EncodeUint32(m.C1)
557 buf.EncodeUint32(m.C2)
558 buf.EncodeUint32(m.C3)
559 buf.EncodeUint32(m.C4)
560 buf.EncodeUint8(m.TlvLength)
561 buf.EncodeBytes(m.Tlv, 248)
562 return buf.Bytes(), nil
564 func (m *NshEntryDetails) Unmarshal(b []byte) error {
565 buf := codec.NewBuffer(b)
566 m.EntryIndex = buf.DecodeUint32()
567 m.NspNsi = buf.DecodeUint32()
568 m.MdType = buf.DecodeUint8()
569 m.VerOC = buf.DecodeUint8()
570 m.TTL = buf.DecodeUint8()
571 m.Length = buf.DecodeUint8()
572 m.NextProtocol = buf.DecodeUint8()
573 m.C1 = buf.DecodeUint32()
574 m.C2 = buf.DecodeUint32()
575 m.C3 = buf.DecodeUint32()
576 m.C4 = buf.DecodeUint32()
577 m.TlvLength = buf.DecodeUint8()
578 m.Tlv = make([]byte, 248)
579 copy(m.Tlv, buf.DecodeBytes(len(m.Tlv)))
583 // NshEntryDump defines message 'nsh_entry_dump'.
584 type NshEntryDump struct {
585 EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
588 func (m *NshEntryDump) Reset() { *m = NshEntryDump{} }
589 func (*NshEntryDump) GetMessageName() string { return "nsh_entry_dump" }
590 func (*NshEntryDump) GetCrcString() string { return "cdaf8ccb" }
591 func (*NshEntryDump) GetMessageType() api.MessageType {
592 return api.RequestMessage
595 func (m *NshEntryDump) Size() (size int) {
599 size += 4 // m.EntryIndex
602 func (m *NshEntryDump) Marshal(b []byte) ([]byte, error) {
604 b = make([]byte, m.Size())
606 buf := codec.NewBuffer(b)
607 buf.EncodeUint32(m.EntryIndex)
608 return buf.Bytes(), nil
610 func (m *NshEntryDump) Unmarshal(b []byte) error {
611 buf := codec.NewBuffer(b)
612 m.EntryIndex = buf.DecodeUint32()
616 // NshMapDetails defines message 'nsh_map_details'.
617 type NshMapDetails struct {
618 MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
619 NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
620 MappedNspNsi uint32 `binapi:"u32,name=mapped_nsp_nsi" json:"mapped_nsp_nsi,omitempty"`
621 NshAction uint32 `binapi:"u32,name=nsh_action" json:"nsh_action,omitempty"`
622 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
623 RxSwIfIndex InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
624 NextNode uint32 `binapi:"u32,name=next_node" json:"next_node,omitempty"`
627 func (m *NshMapDetails) Reset() { *m = NshMapDetails{} }
628 func (*NshMapDetails) GetMessageName() string { return "nsh_map_details" }
629 func (*NshMapDetails) GetCrcString() string { return "b34ac8a1" }
630 func (*NshMapDetails) GetMessageType() api.MessageType {
631 return api.ReplyMessage
634 func (m *NshMapDetails) Size() (size int) {
638 size += 4 // m.MapIndex
639 size += 4 // m.NspNsi
640 size += 4 // m.MappedNspNsi
641 size += 4 // m.NshAction
642 size += 4 // m.SwIfIndex
643 size += 4 // m.RxSwIfIndex
644 size += 4 // m.NextNode
647 func (m *NshMapDetails) Marshal(b []byte) ([]byte, error) {
649 b = make([]byte, m.Size())
651 buf := codec.NewBuffer(b)
652 buf.EncodeUint32(m.MapIndex)
653 buf.EncodeUint32(m.NspNsi)
654 buf.EncodeUint32(m.MappedNspNsi)
655 buf.EncodeUint32(m.NshAction)
656 buf.EncodeUint32(uint32(m.SwIfIndex))
657 buf.EncodeUint32(uint32(m.RxSwIfIndex))
658 buf.EncodeUint32(m.NextNode)
659 return buf.Bytes(), nil
661 func (m *NshMapDetails) Unmarshal(b []byte) error {
662 buf := codec.NewBuffer(b)
663 m.MapIndex = buf.DecodeUint32()
664 m.NspNsi = buf.DecodeUint32()
665 m.MappedNspNsi = buf.DecodeUint32()
666 m.NshAction = buf.DecodeUint32()
667 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
668 m.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
669 m.NextNode = buf.DecodeUint32()
673 // NshMapDump defines message 'nsh_map_dump'.
674 type NshMapDump struct {
675 MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
678 func (m *NshMapDump) Reset() { *m = NshMapDump{} }
679 func (*NshMapDump) GetMessageName() string { return "nsh_map_dump" }
680 func (*NshMapDump) GetCrcString() string { return "8fc06b82" }
681 func (*NshMapDump) GetMessageType() api.MessageType {
682 return api.RequestMessage
685 func (m *NshMapDump) Size() (size int) {
689 size += 4 // m.MapIndex
692 func (m *NshMapDump) Marshal(b []byte) ([]byte, error) {
694 b = make([]byte, m.Size())
696 buf := codec.NewBuffer(b)
697 buf.EncodeUint32(m.MapIndex)
698 return buf.Bytes(), nil
700 func (m *NshMapDump) Unmarshal(b []byte) error {
701 buf := codec.NewBuffer(b)
702 m.MapIndex = buf.DecodeUint32()
706 func init() { file_nsh_binapi_init() }
707 func file_nsh_binapi_init() {
708 api.RegisterMessage((*NshAddDelEntry)(nil), "nsh_add_del_entry_7dea480b")
709 api.RegisterMessage((*NshAddDelEntryReply)(nil), "nsh_add_del_entry_reply_6296a9eb")
710 api.RegisterMessage((*NshAddDelMap)(nil), "nsh_add_del_map_898d857d")
711 api.RegisterMessage((*NshAddDelMapReply)(nil), "nsh_add_del_map_reply_b2b127ef")
712 api.RegisterMessage((*NshEntryDetails)(nil), "nsh_entry_details_046fb556")
713 api.RegisterMessage((*NshEntryDump)(nil), "nsh_entry_dump_cdaf8ccb")
714 api.RegisterMessage((*NshMapDetails)(nil), "nsh_map_details_b34ac8a1")
715 api.RegisterMessage((*NshMapDump)(nil), "nsh_map_dump_8fc06b82")
718 // Messages returns list of all messages in this module.
719 func AllMessages() []api.Message {
720 return []api.Message{
721 (*NshAddDelEntry)(nil),
722 (*NshAddDelEntryReply)(nil),
723 (*NshAddDelMap)(nil),
724 (*NshAddDelMapReply)(nil),
725 (*NshEntryDetails)(nil),
726 (*NshEntryDump)(nil),
727 (*NshMapDetails)(nil),