1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/vpe.api.json
8 Package vpe contains generated code for VPP API file vpe.api (1.6.1).
29 api "git.fd.io/govpp.git/api"
30 codec "git.fd.io/govpp.git/codec"
31 struc "github.com/lunixbochs/struc"
34 // This is a compile-time assertion to ensure that this generated file
35 // is compatible with the GoVPP api package it is being compiled against.
36 // A compilation error at this line likely means your copy of the
37 // GoVPP api package needs to be updated.
38 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
41 // ModuleName is the name of this module.
43 // APIVersion is the API version of this module.
45 // VersionCrc is the CRC of this module.
46 VersionCrc = 0xbd2c94f4
49 // LogLevel represents VPP binary API enum 'log_level'.
53 VPE_API_LOG_LEVEL_EMERG LogLevel = 0
54 VPE_API_LOG_LEVEL_ALERT LogLevel = 1
55 VPE_API_LOG_LEVEL_CRIT LogLevel = 2
56 VPE_API_LOG_LEVEL_ERR LogLevel = 3
57 VPE_API_LOG_LEVEL_WARNING LogLevel = 4
58 VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
59 VPE_API_LOG_LEVEL_INFO LogLevel = 6
60 VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
61 VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
65 LogLevel_name = map[uint32]string{
66 0: "VPE_API_LOG_LEVEL_EMERG",
67 1: "VPE_API_LOG_LEVEL_ALERT",
68 2: "VPE_API_LOG_LEVEL_CRIT",
69 3: "VPE_API_LOG_LEVEL_ERR",
70 4: "VPE_API_LOG_LEVEL_WARNING",
71 5: "VPE_API_LOG_LEVEL_NOTICE",
72 6: "VPE_API_LOG_LEVEL_INFO",
73 7: "VPE_API_LOG_LEVEL_DEBUG",
74 8: "VPE_API_LOG_LEVEL_DISABLED",
76 LogLevel_value = map[string]uint32{
77 "VPE_API_LOG_LEVEL_EMERG": 0,
78 "VPE_API_LOG_LEVEL_ALERT": 1,
79 "VPE_API_LOG_LEVEL_CRIT": 2,
80 "VPE_API_LOG_LEVEL_ERR": 3,
81 "VPE_API_LOG_LEVEL_WARNING": 4,
82 "VPE_API_LOG_LEVEL_NOTICE": 5,
83 "VPE_API_LOG_LEVEL_INFO": 6,
84 "VPE_API_LOG_LEVEL_DEBUG": 7,
85 "VPE_API_LOG_LEVEL_DISABLED": 8,
89 func (x LogLevel) String() string {
90 s, ok := LogLevel_name[uint32(x)]
94 return "LogLevel(" + strconv.Itoa(int(x)) + ")"
97 // Timedelta represents VPP binary API alias 'timedelta'.
98 type Timedelta float64
100 // Timestamp represents VPP binary API alias 'timestamp'.
101 type Timestamp float64
103 // ThreadData represents VPP binary API type 'thread_data'.
104 type ThreadData struct {
105 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
106 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
107 Type string `binapi:"string[64],name=type" json:"type,omitempty" struc:"[64]byte"`
108 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
109 CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
110 Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
111 CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
114 func (*ThreadData) GetTypeName() string { return "thread_data" }
116 // Version represents VPP binary API type 'version'.
117 type Version struct {
118 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
119 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
120 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
121 PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty" struc:"[17]byte"`
122 BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty" struc:"[17]byte"`
125 func (*Version) GetTypeName() string { return "version" }
127 // AddNodeNext represents VPP binary API message 'add_node_next'.
128 type AddNodeNext struct {
129 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
130 NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty" struc:"[64]byte"`
133 func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
134 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
135 func (*AddNodeNext) GetCrcString() string { return "2457116d" }
136 func (*AddNodeNext) GetMessageType() api.MessageType { return api.RequestMessage }
138 func (m *AddNodeNext) Size() int {
143 // field[1] m.NodeName
145 // field[1] m.NextName
149 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
150 o := binary.BigEndian
156 buf = make([]byte, m.Size())
160 // field[1] m.NodeName
161 copy(buf[pos:pos+64], m.NodeName)
163 // field[1] m.NextName
164 copy(buf[pos:pos+64], m.NextName)
168 func (m *AddNodeNext) Unmarshal(tmp []byte) error {
169 o := binary.BigEndian
173 // field[1] m.NodeName
175 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
176 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
179 // field[1] m.NextName
181 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
182 m.NextName = codec.DecodeString(tmp[pos : pos+nul])
188 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
189 type AddNodeNextReply struct {
190 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
191 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
194 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
195 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
196 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
197 func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage }
199 func (m *AddNodeNextReply) Size() int {
206 // field[1] m.NextIndex
210 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
211 o := binary.BigEndian
217 buf = make([]byte, m.Size())
222 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
224 // field[1] m.NextIndex
225 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
229 func (m *AddNodeNextReply) Unmarshal(tmp []byte) error {
230 o := binary.BigEndian
235 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
237 // field[1] m.NextIndex
238 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
243 // Cli represents VPP binary API message 'cli'.
245 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
248 func (m *Cli) Reset() { *m = Cli{} }
249 func (*Cli) GetMessageName() string { return "cli" }
250 func (*Cli) GetCrcString() string { return "23bfbfff" }
251 func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage }
253 func (m *Cli) Size() int {
258 // field[1] m.CmdInShmem
262 func (m *Cli) Marshal(b []byte) ([]byte, error) {
263 o := binary.BigEndian
269 buf = make([]byte, m.Size())
273 // field[1] m.CmdInShmem
274 o.PutUint64(buf[pos:pos+8], uint64(m.CmdInShmem))
278 func (m *Cli) Unmarshal(tmp []byte) error {
279 o := binary.BigEndian
283 // field[1] m.CmdInShmem
284 m.CmdInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
289 // CliInband represents VPP binary API message 'cli_inband'.
290 type CliInband struct {
291 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
292 Cmd string `json:"cmd,omitempty"`
295 func (m *CliInband) Reset() { *m = CliInband{} }
296 func (*CliInband) GetMessageName() string { return "cli_inband" }
297 func (*CliInband) GetCrcString() string { return "f8377302" }
298 func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage }
300 func (m *CliInband) Size() int {
306 size += 4 + len(m.Cmd)
309 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
310 o := binary.BigEndian
316 buf = make([]byte, m.Size())
321 o.PutUint32(buf[pos:pos+4], uint32(len(m.Cmd)))
323 copy(buf[pos:pos+len(m.Cmd)], m.Cmd[:])
327 func (m *CliInband) Unmarshal(tmp []byte) error {
328 o := binary.BigEndian
334 siz := o.Uint32(tmp[pos : pos+4])
336 m.Cmd = codec.DecodeString(tmp[pos : pos+int(siz)])
342 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
343 type CliInbandReply struct {
344 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
345 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
346 Reply string `json:"reply,omitempty"`
349 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
350 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
351 func (*CliInbandReply) GetCrcString() string { return "05879051" }
352 func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage }
354 func (m *CliInbandReply) Size() int {
362 size += 4 + len(m.Reply)
365 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
366 o := binary.BigEndian
372 buf = make([]byte, m.Size())
377 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
380 o.PutUint32(buf[pos:pos+4], uint32(len(m.Reply)))
382 copy(buf[pos:pos+len(m.Reply)], m.Reply[:])
386 func (m *CliInbandReply) Unmarshal(tmp []byte) error {
387 o := binary.BigEndian
392 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
396 siz := o.Uint32(tmp[pos : pos+4])
398 m.Reply = codec.DecodeString(tmp[pos : pos+int(siz)])
404 // CliReply represents VPP binary API message 'cli_reply'.
405 type CliReply struct {
406 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
407 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
410 func (m *CliReply) Reset() { *m = CliReply{} }
411 func (*CliReply) GetMessageName() string { return "cli_reply" }
412 func (*CliReply) GetCrcString() string { return "06d68297" }
413 func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage }
415 func (m *CliReply) Size() int {
422 // field[1] m.ReplyInShmem
426 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
427 o := binary.BigEndian
433 buf = make([]byte, m.Size())
438 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
440 // field[1] m.ReplyInShmem
441 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
445 func (m *CliReply) Unmarshal(tmp []byte) error {
446 o := binary.BigEndian
451 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
453 // field[1] m.ReplyInShmem
454 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
459 // ControlPing represents VPP binary API message 'control_ping'.
460 type ControlPing struct{}
462 func (m *ControlPing) Reset() { *m = ControlPing{} }
463 func (*ControlPing) GetMessageName() string { return "control_ping" }
464 func (*ControlPing) GetCrcString() string { return "51077d14" }
465 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
467 func (m *ControlPing) Size() int {
474 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
475 o := binary.BigEndian
481 buf = make([]byte, m.Size())
487 func (m *ControlPing) Unmarshal(tmp []byte) error {
488 o := binary.BigEndian
495 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
496 type ControlPingReply struct {
497 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
498 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
499 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
502 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
503 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
504 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
505 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
507 func (m *ControlPingReply) Size() int {
514 // field[1] m.ClientIndex
520 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
521 o := binary.BigEndian
527 buf = make([]byte, m.Size())
532 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
534 // field[1] m.ClientIndex
535 o.PutUint32(buf[pos:pos+4], uint32(m.ClientIndex))
538 o.PutUint32(buf[pos:pos+4], uint32(m.VpePID))
542 func (m *ControlPingReply) Unmarshal(tmp []byte) error {
543 o := binary.BigEndian
548 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
550 // field[1] m.ClientIndex
551 m.ClientIndex = uint32(o.Uint32(tmp[pos : pos+4]))
554 m.VpePID = uint32(o.Uint32(tmp[pos : pos+4]))
559 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
560 type GetF64EndianValue struct {
561 F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
564 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
565 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
566 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
567 func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage }
569 func (m *GetF64EndianValue) Size() int {
578 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
579 o := binary.BigEndian
585 buf = make([]byte, m.Size())
590 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64One)))
594 func (m *GetF64EndianValue) Unmarshal(tmp []byte) error {
595 o := binary.BigEndian
600 m.F64One = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
605 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
606 type GetF64EndianValueReply struct {
607 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
608 F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
611 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
612 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
613 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
614 func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage }
616 func (m *GetF64EndianValueReply) Size() int {
623 // field[1] m.F64OneResult
627 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
628 o := binary.BigEndian
634 buf = make([]byte, m.Size())
639 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
641 // field[1] m.F64OneResult
642 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64OneResult)))
646 func (m *GetF64EndianValueReply) Unmarshal(tmp []byte) error {
647 o := binary.BigEndian
652 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
654 // field[1] m.F64OneResult
655 m.F64OneResult = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
660 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
661 type GetF64IncrementByOne struct {
662 F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
665 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
666 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
667 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
668 func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage }
670 func (m *GetF64IncrementByOne) Size() int {
675 // field[1] m.F64Value
679 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
680 o := binary.BigEndian
686 buf = make([]byte, m.Size())
690 // field[1] m.F64Value
691 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
695 func (m *GetF64IncrementByOne) Unmarshal(tmp []byte) error {
696 o := binary.BigEndian
700 // field[1] m.F64Value
701 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
706 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
707 type GetF64IncrementByOneReply struct {
708 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
709 F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
712 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
713 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
714 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
715 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage }
717 func (m *GetF64IncrementByOneReply) Size() int {
724 // field[1] m.F64Value
728 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
729 o := binary.BigEndian
735 buf = make([]byte, m.Size())
740 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
742 // field[1] m.F64Value
743 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
747 func (m *GetF64IncrementByOneReply) Unmarshal(tmp []byte) error {
748 o := binary.BigEndian
753 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
755 // field[1] m.F64Value
756 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
761 // GetNextIndex represents VPP binary API message 'get_next_index'.
762 type GetNextIndex struct {
763 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
764 NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty" struc:"[64]byte"`
767 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
768 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
769 func (*GetNextIndex) GetCrcString() string { return "2457116d" }
770 func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage }
772 func (m *GetNextIndex) Size() int {
777 // field[1] m.NodeName
779 // field[1] m.NextName
783 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
784 o := binary.BigEndian
790 buf = make([]byte, m.Size())
794 // field[1] m.NodeName
795 copy(buf[pos:pos+64], m.NodeName)
797 // field[1] m.NextName
798 copy(buf[pos:pos+64], m.NextName)
802 func (m *GetNextIndex) Unmarshal(tmp []byte) error {
803 o := binary.BigEndian
807 // field[1] m.NodeName
809 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
810 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
813 // field[1] m.NextName
815 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
816 m.NextName = codec.DecodeString(tmp[pos : pos+nul])
822 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
823 type GetNextIndexReply struct {
824 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
825 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
828 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
829 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
830 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
831 func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
833 func (m *GetNextIndexReply) Size() int {
840 // field[1] m.NextIndex
844 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
845 o := binary.BigEndian
851 buf = make([]byte, m.Size())
856 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
858 // field[1] m.NextIndex
859 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
863 func (m *GetNextIndexReply) Unmarshal(tmp []byte) error {
864 o := binary.BigEndian
869 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
871 // field[1] m.NextIndex
872 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
877 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
878 type GetNodeGraph struct{}
880 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
881 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
882 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
883 func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage }
885 func (m *GetNodeGraph) Size() int {
892 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
893 o := binary.BigEndian
899 buf = make([]byte, m.Size())
905 func (m *GetNodeGraph) Unmarshal(tmp []byte) error {
906 o := binary.BigEndian
913 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
914 type GetNodeGraphReply struct {
915 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
916 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
919 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
920 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
921 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
922 func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage }
924 func (m *GetNodeGraphReply) Size() int {
931 // field[1] m.ReplyInShmem
935 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
936 o := binary.BigEndian
942 buf = make([]byte, m.Size())
947 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
949 // field[1] m.ReplyInShmem
950 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
954 func (m *GetNodeGraphReply) Unmarshal(tmp []byte) error {
955 o := binary.BigEndian
960 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
962 // field[1] m.ReplyInShmem
963 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
968 // GetNodeIndex represents VPP binary API message 'get_node_index'.
969 type GetNodeIndex struct {
970 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
973 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
974 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
975 func (*GetNodeIndex) GetCrcString() string { return "f1984c64" }
976 func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage }
978 func (m *GetNodeIndex) Size() int {
983 // field[1] m.NodeName
987 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
988 o := binary.BigEndian
994 buf = make([]byte, m.Size())
998 // field[1] m.NodeName
999 copy(buf[pos:pos+64], m.NodeName)
1003 func (m *GetNodeIndex) Unmarshal(tmp []byte) error {
1004 o := binary.BigEndian
1008 // field[1] m.NodeName
1010 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1011 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
1017 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
1018 type GetNodeIndexReply struct {
1019 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1020 NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
1023 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
1024 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
1025 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
1026 func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1028 func (m *GetNodeIndexReply) Size() int {
1033 // field[1] m.Retval
1035 // field[1] m.NodeIndex
1039 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
1040 o := binary.BigEndian
1046 buf = make([]byte, m.Size())
1050 // field[1] m.Retval
1051 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1053 // field[1] m.NodeIndex
1054 o.PutUint32(buf[pos:pos+4], uint32(m.NodeIndex))
1058 func (m *GetNodeIndexReply) Unmarshal(tmp []byte) error {
1059 o := binary.BigEndian
1063 // field[1] m.Retval
1064 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1066 // field[1] m.NodeIndex
1067 m.NodeIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1072 // LogDetails represents VPP binary API message 'log_details'.
1073 type LogDetails struct {
1074 Timestamp Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
1075 Level LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
1076 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty" struc:"[32]byte"`
1077 Message string `binapi:"string[256],name=message" json:"message,omitempty" struc:"[256]byte"`
1080 func (m *LogDetails) Reset() { *m = LogDetails{} }
1081 func (*LogDetails) GetMessageName() string { return "log_details" }
1082 func (*LogDetails) GetCrcString() string { return "255827a1" }
1083 func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
1085 func (m *LogDetails) Size() int {
1090 // field[1] m.Timestamp
1094 // field[1] m.MsgClass
1096 // field[1] m.Message
1100 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
1101 o := binary.BigEndian
1107 buf = make([]byte, m.Size())
1111 // field[1] m.Timestamp
1112 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.Timestamp)))
1115 o.PutUint32(buf[pos:pos+4], uint32(m.Level))
1117 // field[1] m.MsgClass
1118 copy(buf[pos:pos+32], m.MsgClass)
1120 // field[1] m.Message
1121 copy(buf[pos:pos+256], m.Message)
1125 func (m *LogDetails) Unmarshal(tmp []byte) error {
1126 o := binary.BigEndian
1130 // field[1] m.Timestamp
1131 m.Timestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1134 m.Level = LogLevel(o.Uint32(tmp[pos : pos+4]))
1136 // field[1] m.MsgClass
1138 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1139 m.MsgClass = codec.DecodeString(tmp[pos : pos+nul])
1142 // field[1] m.Message
1144 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1145 m.Message = codec.DecodeString(tmp[pos : pos+nul])
1151 // LogDump represents VPP binary API message 'log_dump'.
1152 type LogDump struct {
1153 StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
1156 func (m *LogDump) Reset() { *m = LogDump{} }
1157 func (*LogDump) GetMessageName() string { return "log_dump" }
1158 func (*LogDump) GetCrcString() string { return "6ab31753" }
1159 func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage }
1161 func (m *LogDump) Size() int {
1166 // field[1] m.StartTimestamp
1170 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
1171 o := binary.BigEndian
1177 buf = make([]byte, m.Size())
1181 // field[1] m.StartTimestamp
1182 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.StartTimestamp)))
1186 func (m *LogDump) Unmarshal(tmp []byte) error {
1187 o := binary.BigEndian
1191 // field[1] m.StartTimestamp
1192 m.StartTimestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1197 // ShowThreads represents VPP binary API message 'show_threads'.
1198 type ShowThreads struct{}
1200 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
1201 func (*ShowThreads) GetMessageName() string { return "show_threads" }
1202 func (*ShowThreads) GetCrcString() string { return "51077d14" }
1203 func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage }
1205 func (m *ShowThreads) Size() int {
1212 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
1213 o := binary.BigEndian
1219 buf = make([]byte, m.Size())
1225 func (m *ShowThreads) Unmarshal(tmp []byte) error {
1226 o := binary.BigEndian
1233 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
1234 type ShowThreadsReply struct {
1235 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1236 Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=ThreadData"`
1237 ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
1240 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
1241 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
1242 func (*ShowThreadsReply) GetCrcString() string { return "efd78e83" }
1243 func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1245 func (m *ShowThreadsReply) Size() int {
1250 // field[1] m.Retval
1254 // field[1] m.ThreadData
1255 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1258 if j1 < len(m.ThreadData) {
1259 s1 = m.ThreadData[j1]
1269 // field[2] s1.CPUID
1273 // field[2] s1.CPUSocket
1278 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
1279 o := binary.BigEndian
1285 buf = make([]byte, m.Size())
1289 // field[1] m.Retval
1290 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1293 o.PutUint32(buf[pos:pos+4], uint32(len(m.ThreadData)))
1295 // field[1] m.ThreadData
1296 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1298 if j1 < len(m.ThreadData) {
1299 v1 = m.ThreadData[j1]
1302 o.PutUint32(buf[pos:pos+4], uint32(v1.ID))
1305 copy(buf[pos:pos+64], v1.Name)
1308 copy(buf[pos:pos+64], v1.Type)
1311 o.PutUint32(buf[pos:pos+4], uint32(v1.PID))
1313 // field[2] v1.CPUID
1314 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUID))
1317 o.PutUint32(buf[pos:pos+4], uint32(v1.Core))
1319 // field[2] v1.CPUSocket
1320 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUSocket))
1325 func (m *ShowThreadsReply) Unmarshal(tmp []byte) error {
1326 o := binary.BigEndian
1330 // field[1] m.Retval
1331 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1334 m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
1336 // field[1] m.ThreadData
1337 m.ThreadData = make([]ThreadData, int(m.Count))
1338 for j1 := 0; j1 < int(m.Count); j1++ {
1339 // field[2] m.ThreadData[j1].ID
1340 m.ThreadData[j1].ID = uint32(o.Uint32(tmp[pos : pos+4]))
1342 // field[2] m.ThreadData[j1].Name
1344 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1345 m.ThreadData[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
1348 // field[2] m.ThreadData[j1].Type
1350 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1351 m.ThreadData[j1].Type = codec.DecodeString(tmp[pos : pos+nul])
1354 // field[2] m.ThreadData[j1].PID
1355 m.ThreadData[j1].PID = uint32(o.Uint32(tmp[pos : pos+4]))
1357 // field[2] m.ThreadData[j1].CPUID
1358 m.ThreadData[j1].CPUID = uint32(o.Uint32(tmp[pos : pos+4]))
1360 // field[2] m.ThreadData[j1].Core
1361 m.ThreadData[j1].Core = uint32(o.Uint32(tmp[pos : pos+4]))
1363 // field[2] m.ThreadData[j1].CPUSocket
1364 m.ThreadData[j1].CPUSocket = uint32(o.Uint32(tmp[pos : pos+4]))
1370 // ShowVersion represents VPP binary API message 'show_version'.
1371 type ShowVersion struct{}
1373 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
1374 func (*ShowVersion) GetMessageName() string { return "show_version" }
1375 func (*ShowVersion) GetCrcString() string { return "51077d14" }
1376 func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage }
1378 func (m *ShowVersion) Size() int {
1385 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
1386 o := binary.BigEndian
1392 buf = make([]byte, m.Size())
1398 func (m *ShowVersion) Unmarshal(tmp []byte) error {
1399 o := binary.BigEndian
1406 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
1407 type ShowVersionReply struct {
1408 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1409 Program string `binapi:"string[32],name=program" json:"program,omitempty" struc:"[32]byte"`
1410 Version string `binapi:"string[32],name=version" json:"version,omitempty" struc:"[32]byte"`
1411 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty" struc:"[32]byte"`
1412 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty" struc:"[256]byte"`
1415 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
1416 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
1417 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
1418 func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1420 func (m *ShowVersionReply) Size() int {
1425 // field[1] m.Retval
1427 // field[1] m.Program
1429 // field[1] m.Version
1431 // field[1] m.BuildDate
1433 // field[1] m.BuildDirectory
1437 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
1438 o := binary.BigEndian
1444 buf = make([]byte, m.Size())
1448 // field[1] m.Retval
1449 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1451 // field[1] m.Program
1452 copy(buf[pos:pos+32], m.Program)
1454 // field[1] m.Version
1455 copy(buf[pos:pos+32], m.Version)
1457 // field[1] m.BuildDate
1458 copy(buf[pos:pos+32], m.BuildDate)
1460 // field[1] m.BuildDirectory
1461 copy(buf[pos:pos+256], m.BuildDirectory)
1465 func (m *ShowVersionReply) Unmarshal(tmp []byte) error {
1466 o := binary.BigEndian
1470 // field[1] m.Retval
1471 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1473 // field[1] m.Program
1475 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1476 m.Program = codec.DecodeString(tmp[pos : pos+nul])
1479 // field[1] m.Version
1481 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1482 m.Version = codec.DecodeString(tmp[pos : pos+nul])
1485 // field[1] m.BuildDate
1487 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1488 m.BuildDate = codec.DecodeString(tmp[pos : pos+nul])
1491 // field[1] m.BuildDirectory
1493 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1494 m.BuildDirectory = codec.DecodeString(tmp[pos : pos+nul])
1500 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
1501 type ShowVpeSystemTime struct{}
1503 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
1504 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
1505 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
1506 func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage }
1508 func (m *ShowVpeSystemTime) Size() int {
1515 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1516 o := binary.BigEndian
1522 buf = make([]byte, m.Size())
1528 func (m *ShowVpeSystemTime) Unmarshal(tmp []byte) error {
1529 o := binary.BigEndian
1536 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
1537 type ShowVpeSystemTimeReply struct {
1538 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1539 VpeSystemTime Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
1542 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
1543 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
1544 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
1545 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1547 func (m *ShowVpeSystemTimeReply) Size() int {
1552 // field[1] m.Retval
1554 // field[1] m.VpeSystemTime
1558 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1559 o := binary.BigEndian
1565 buf = make([]byte, m.Size())
1569 // field[1] m.Retval
1570 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1572 // field[1] m.VpeSystemTime
1573 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.VpeSystemTime)))
1577 func (m *ShowVpeSystemTimeReply) Unmarshal(tmp []byte) error {
1578 o := binary.BigEndian
1582 // field[1] m.Retval
1583 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1585 // field[1] m.VpeSystemTime
1586 m.VpeSystemTime = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1591 func init() { file_vpe_binapi_init() }
1592 func file_vpe_binapi_init() {
1593 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
1594 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
1595 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
1596 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
1597 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
1598 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
1599 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
1600 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
1601 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
1602 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
1603 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
1604 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
1605 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
1606 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
1607 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
1608 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
1609 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
1610 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
1611 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
1612 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
1613 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
1614 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
1615 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
1616 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
1617 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
1618 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
1621 // Messages returns list of all messages in this module.
1622 func AllMessages() []api.Message {
1623 return []api.Message{
1624 (*AddNodeNext)(nil),
1625 (*AddNodeNextReply)(nil),
1628 (*CliInbandReply)(nil),
1630 (*ControlPing)(nil),
1631 (*ControlPingReply)(nil),
1632 (*GetF64EndianValue)(nil),
1633 (*GetF64EndianValueReply)(nil),
1634 (*GetF64IncrementByOne)(nil),
1635 (*GetF64IncrementByOneReply)(nil),
1636 (*GetNextIndex)(nil),
1637 (*GetNextIndexReply)(nil),
1638 (*GetNodeGraph)(nil),
1639 (*GetNodeGraphReply)(nil),
1640 (*GetNodeIndex)(nil),
1641 (*GetNodeIndexReply)(nil),
1644 (*ShowThreads)(nil),
1645 (*ShowThreadsReply)(nil),
1646 (*ShowVersion)(nil),
1647 (*ShowVersionReply)(nil),
1648 (*ShowVpeSystemTime)(nil),
1649 (*ShowVpeSystemTimeReply)(nil),
1653 // Reference imports to suppress errors if they are not otherwise used.
1654 var _ = api.RegisterMessage
1655 var _ = codec.DecodeString
1656 var _ = bytes.NewBuffer
1657 var _ = context.Background
1659 var _ = strconv.Itoa
1660 var _ = strings.Contains
1662 var _ = binary.BigEndian
1663 var _ = math.Float32bits