1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
4 // VPP: 20.01-45~g7a071e370~b63
5 // source: /usr/share/vpp/api/core/vpe.api.json
8 Package vpe contains generated code for VPP binary API defined by vpe.api (version 1.6.0).
26 api "git.fd.io/govpp.git/api"
27 codec "git.fd.io/govpp.git/codec"
28 struc "github.com/lunixbochs/struc"
31 // This is a compile-time assertion to ensure that this generated file
32 // is compatible with the GoVPP api package it is being compiled against.
33 // A compilation error at this line likely means your copy of the
34 // GoVPP api package needs to be updated.
35 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
38 // ModuleName is the name of this module.
40 // APIVersion is the API version of this module.
42 // VersionCrc is the CRC of this module.
43 VersionCrc = 0xc6c0bcf6
46 // LogLevel represents VPP binary API enum 'log_level'.
50 VPE_API_LOG_LEVEL_EMERG LogLevel = 0
51 VPE_API_LOG_LEVEL_ALERT LogLevel = 1
52 VPE_API_LOG_LEVEL_CRIT LogLevel = 2
53 VPE_API_LOG_LEVEL_ERR LogLevel = 3
54 VPE_API_LOG_LEVEL_WARNING LogLevel = 4
55 VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
56 VPE_API_LOG_LEVEL_INFO LogLevel = 6
57 VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
58 VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
62 LogLevel_name = map[uint32]string{
63 0: "VPE_API_LOG_LEVEL_EMERG",
64 1: "VPE_API_LOG_LEVEL_ALERT",
65 2: "VPE_API_LOG_LEVEL_CRIT",
66 3: "VPE_API_LOG_LEVEL_ERR",
67 4: "VPE_API_LOG_LEVEL_WARNING",
68 5: "VPE_API_LOG_LEVEL_NOTICE",
69 6: "VPE_API_LOG_LEVEL_INFO",
70 7: "VPE_API_LOG_LEVEL_DEBUG",
71 8: "VPE_API_LOG_LEVEL_DISABLED",
73 LogLevel_value = map[string]uint32{
74 "VPE_API_LOG_LEVEL_EMERG": 0,
75 "VPE_API_LOG_LEVEL_ALERT": 1,
76 "VPE_API_LOG_LEVEL_CRIT": 2,
77 "VPE_API_LOG_LEVEL_ERR": 3,
78 "VPE_API_LOG_LEVEL_WARNING": 4,
79 "VPE_API_LOG_LEVEL_NOTICE": 5,
80 "VPE_API_LOG_LEVEL_INFO": 6,
81 "VPE_API_LOG_LEVEL_DEBUG": 7,
82 "VPE_API_LOG_LEVEL_DISABLED": 8,
86 func (x LogLevel) String() string {
87 s, ok := LogLevel_name[uint32(x)]
91 return "LogLevel(" + strconv.Itoa(int(x)) + ")"
94 // Timedelta represents VPP binary API alias 'timedelta'.
95 type Timedelta float64
97 // Timestamp represents VPP binary API alias 'timestamp'.
98 type Timestamp float64
100 // ThreadData represents VPP binary API type 'thread_data'.
101 type ThreadData struct {
102 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
103 Name []byte `binapi:"u8[64],name=name" json:"name,omitempty" struc:"[64]byte"`
104 Type []byte `binapi:"u8[64],name=type" json:"type,omitempty" struc:"[64]byte"`
105 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
106 CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
107 Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
108 CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
111 func (*ThreadData) GetTypeName() string { return "thread_data" }
113 // Version represents VPP binary API type 'version'.
114 type Version struct {
115 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
116 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
117 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
118 PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty" struc:"[17]byte"`
119 BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty" struc:"[17]byte"`
122 func (*Version) GetTypeName() string { return "version" }
124 // AddNodeNext represents VPP binary API message 'add_node_next'.
125 type AddNodeNext struct {
126 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
127 NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty" struc:"[64]byte"`
130 func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
131 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
132 func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" }
133 func (*AddNodeNext) GetMessageType() api.MessageType { return api.RequestMessage }
135 func (m *AddNodeNext) Size() int {
140 // field[1] m.NodeName
142 // field[1] m.NextName
146 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
147 o := binary.BigEndian
153 buf = make([]byte, m.Size())
157 // field[1] m.NodeName
158 for i := 0; i < 64; i++ {
160 if i < len(m.NodeName) {
161 x = uint8(m.NodeName[i])
166 // field[1] m.NextName
167 for i := 0; i < 64; i++ {
169 if i < len(m.NextName) {
170 x = uint8(m.NextName[i])
177 func (m *AddNodeNext) Unmarshal(tmp []byte) error {
178 o := binary.BigEndian
182 // field[1] m.NodeName
183 m.NodeName = make([]uint8, 64)
184 for i := 0; i < len(m.NodeName); i++ {
185 m.NodeName[i] = uint8(tmp[pos])
188 // field[1] m.NextName
189 m.NextName = make([]uint8, 64)
190 for i := 0; i < len(m.NextName); i++ {
191 m.NextName[i] = uint8(tmp[pos])
197 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
198 type AddNodeNextReply struct {
199 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
200 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
203 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
204 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
205 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
206 func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage }
208 func (m *AddNodeNextReply) Size() int {
215 // field[1] m.NextIndex
219 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
220 o := binary.BigEndian
226 buf = make([]byte, m.Size())
231 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
233 // field[1] m.NextIndex
234 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
238 func (m *AddNodeNextReply) Unmarshal(tmp []byte) error {
239 o := binary.BigEndian
244 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
246 // field[1] m.NextIndex
247 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
252 // Cli represents VPP binary API message 'cli'.
254 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
257 func (m *Cli) Reset() { *m = Cli{} }
258 func (*Cli) GetMessageName() string { return "cli" }
259 func (*Cli) GetCrcString() string { return "23bfbfff" }
260 func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage }
262 func (m *Cli) Size() int {
267 // field[1] m.CmdInShmem
271 func (m *Cli) Marshal(b []byte) ([]byte, error) {
272 o := binary.BigEndian
278 buf = make([]byte, m.Size())
282 // field[1] m.CmdInShmem
283 o.PutUint64(buf[pos:pos+8], uint64(m.CmdInShmem))
287 func (m *Cli) Unmarshal(tmp []byte) error {
288 o := binary.BigEndian
292 // field[1] m.CmdInShmem
293 m.CmdInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
298 // CliInband represents VPP binary API message 'cli_inband'.
299 type CliInband struct {
300 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
301 Cmd string `json:"cmd,omitempty"`
304 func (m *CliInband) Reset() { *m = CliInband{} }
305 func (*CliInband) GetMessageName() string { return "cli_inband" }
306 func (*CliInband) GetCrcString() string { return "f8377302" }
307 func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage }
309 func (m *CliInband) Size() int {
315 size += 4 + len(m.Cmd)
318 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
319 o := binary.BigEndian
325 buf = make([]byte, m.Size())
330 o.PutUint32(buf[pos:pos+4], uint32(len(m.Cmd)))
332 copy(buf[pos:pos+len(m.Cmd)], m.Cmd[:])
336 func (m *CliInband) Unmarshal(tmp []byte) error {
337 o := binary.BigEndian
343 siz := o.Uint32(tmp[pos : pos+4])
345 m.Cmd = codec.DecodeString(tmp[pos : pos+int(siz)])
351 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
352 type CliInbandReply struct {
353 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
354 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
355 Reply string `json:"reply,omitempty"`
358 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
359 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
360 func (*CliInbandReply) GetCrcString() string { return "05879051" }
361 func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage }
363 func (m *CliInbandReply) Size() int {
371 size += 4 + len(m.Reply)
374 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
375 o := binary.BigEndian
381 buf = make([]byte, m.Size())
386 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
389 o.PutUint32(buf[pos:pos+4], uint32(len(m.Reply)))
391 copy(buf[pos:pos+len(m.Reply)], m.Reply[:])
395 func (m *CliInbandReply) Unmarshal(tmp []byte) error {
396 o := binary.BigEndian
401 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
405 siz := o.Uint32(tmp[pos : pos+4])
407 m.Reply = codec.DecodeString(tmp[pos : pos+int(siz)])
413 // CliReply represents VPP binary API message 'cli_reply'.
414 type CliReply struct {
415 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
416 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
419 func (m *CliReply) Reset() { *m = CliReply{} }
420 func (*CliReply) GetMessageName() string { return "cli_reply" }
421 func (*CliReply) GetCrcString() string { return "06d68297" }
422 func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage }
424 func (m *CliReply) Size() int {
431 // field[1] m.ReplyInShmem
435 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
436 o := binary.BigEndian
442 buf = make([]byte, m.Size())
447 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
449 // field[1] m.ReplyInShmem
450 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
454 func (m *CliReply) Unmarshal(tmp []byte) error {
455 o := binary.BigEndian
460 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
462 // field[1] m.ReplyInShmem
463 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
468 // ControlPing represents VPP binary API message 'control_ping'.
469 type ControlPing struct{}
471 func (m *ControlPing) Reset() { *m = ControlPing{} }
472 func (*ControlPing) GetMessageName() string { return "control_ping" }
473 func (*ControlPing) GetCrcString() string { return "51077d14" }
474 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
476 func (m *ControlPing) Size() int {
483 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
484 o := binary.BigEndian
490 buf = make([]byte, m.Size())
496 func (m *ControlPing) Unmarshal(tmp []byte) error {
497 o := binary.BigEndian
504 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
505 type ControlPingReply struct {
506 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
507 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
508 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
511 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
512 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
513 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
514 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
516 func (m *ControlPingReply) Size() int {
523 // field[1] m.ClientIndex
529 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
530 o := binary.BigEndian
536 buf = make([]byte, m.Size())
541 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
543 // field[1] m.ClientIndex
544 o.PutUint32(buf[pos:pos+4], uint32(m.ClientIndex))
547 o.PutUint32(buf[pos:pos+4], uint32(m.VpePID))
551 func (m *ControlPingReply) Unmarshal(tmp []byte) error {
552 o := binary.BigEndian
557 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
559 // field[1] m.ClientIndex
560 m.ClientIndex = uint32(o.Uint32(tmp[pos : pos+4]))
563 m.VpePID = uint32(o.Uint32(tmp[pos : pos+4]))
568 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
569 type GetF64EndianValue struct {
570 F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
573 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
574 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
575 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
576 func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage }
578 func (m *GetF64EndianValue) Size() int {
587 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
588 o := binary.BigEndian
594 buf = make([]byte, m.Size())
599 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64One)))
603 func (m *GetF64EndianValue) Unmarshal(tmp []byte) error {
604 o := binary.BigEndian
609 m.F64One = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
614 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
615 type GetF64EndianValueReply struct {
616 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
617 F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
620 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
621 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
622 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
623 func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage }
625 func (m *GetF64EndianValueReply) Size() int {
632 // field[1] m.F64OneResult
636 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
637 o := binary.BigEndian
643 buf = make([]byte, m.Size())
648 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
650 // field[1] m.F64OneResult
651 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64OneResult)))
655 func (m *GetF64EndianValueReply) Unmarshal(tmp []byte) error {
656 o := binary.BigEndian
661 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
663 // field[1] m.F64OneResult
664 m.F64OneResult = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
669 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
670 type GetF64IncrementByOne struct {
671 F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
674 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
675 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
676 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
677 func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage }
679 func (m *GetF64IncrementByOne) Size() int {
684 // field[1] m.F64Value
688 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
689 o := binary.BigEndian
695 buf = make([]byte, m.Size())
699 // field[1] m.F64Value
700 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
704 func (m *GetF64IncrementByOne) Unmarshal(tmp []byte) error {
705 o := binary.BigEndian
709 // field[1] m.F64Value
710 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
715 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
716 type GetF64IncrementByOneReply struct {
717 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
718 F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
721 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
722 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
723 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
724 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage }
726 func (m *GetF64IncrementByOneReply) Size() int {
733 // field[1] m.F64Value
737 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
738 o := binary.BigEndian
744 buf = make([]byte, m.Size())
749 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
751 // field[1] m.F64Value
752 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
756 func (m *GetF64IncrementByOneReply) Unmarshal(tmp []byte) error {
757 o := binary.BigEndian
762 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
764 // field[1] m.F64Value
765 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
770 // GetNextIndex represents VPP binary API message 'get_next_index'.
771 type GetNextIndex struct {
772 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
773 NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty" struc:"[64]byte"`
776 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
777 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
778 func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" }
779 func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage }
781 func (m *GetNextIndex) Size() int {
786 // field[1] m.NodeName
788 // field[1] m.NextName
792 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
793 o := binary.BigEndian
799 buf = make([]byte, m.Size())
803 // field[1] m.NodeName
804 for i := 0; i < 64; i++ {
806 if i < len(m.NodeName) {
807 x = uint8(m.NodeName[i])
812 // field[1] m.NextName
813 for i := 0; i < 64; i++ {
815 if i < len(m.NextName) {
816 x = uint8(m.NextName[i])
823 func (m *GetNextIndex) Unmarshal(tmp []byte) error {
824 o := binary.BigEndian
828 // field[1] m.NodeName
829 m.NodeName = make([]uint8, 64)
830 for i := 0; i < len(m.NodeName); i++ {
831 m.NodeName[i] = uint8(tmp[pos])
834 // field[1] m.NextName
835 m.NextName = make([]uint8, 64)
836 for i := 0; i < len(m.NextName); i++ {
837 m.NextName[i] = uint8(tmp[pos])
843 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
844 type GetNextIndexReply struct {
845 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
846 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
849 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
850 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
851 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
852 func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
854 func (m *GetNextIndexReply) Size() int {
861 // field[1] m.NextIndex
865 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
866 o := binary.BigEndian
872 buf = make([]byte, m.Size())
877 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
879 // field[1] m.NextIndex
880 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
884 func (m *GetNextIndexReply) Unmarshal(tmp []byte) error {
885 o := binary.BigEndian
890 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
892 // field[1] m.NextIndex
893 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
898 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
899 type GetNodeGraph struct{}
901 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
902 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
903 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
904 func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage }
906 func (m *GetNodeGraph) Size() int {
913 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
914 o := binary.BigEndian
920 buf = make([]byte, m.Size())
926 func (m *GetNodeGraph) Unmarshal(tmp []byte) error {
927 o := binary.BigEndian
934 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
935 type GetNodeGraphReply struct {
936 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
937 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
940 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
941 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
942 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
943 func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage }
945 func (m *GetNodeGraphReply) Size() int {
952 // field[1] m.ReplyInShmem
956 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
957 o := binary.BigEndian
963 buf = make([]byte, m.Size())
968 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
970 // field[1] m.ReplyInShmem
971 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
975 func (m *GetNodeGraphReply) Unmarshal(tmp []byte) error {
976 o := binary.BigEndian
981 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
983 // field[1] m.ReplyInShmem
984 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
989 // GetNodeIndex represents VPP binary API message 'get_node_index'.
990 type GetNodeIndex struct {
991 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
994 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
995 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
996 func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" }
997 func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage }
999 func (m *GetNodeIndex) Size() int {
1004 // field[1] m.NodeName
1008 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
1009 o := binary.BigEndian
1015 buf = make([]byte, m.Size())
1019 // field[1] m.NodeName
1020 for i := 0; i < 64; i++ {
1022 if i < len(m.NodeName) {
1023 x = uint8(m.NodeName[i])
1030 func (m *GetNodeIndex) Unmarshal(tmp []byte) error {
1031 o := binary.BigEndian
1035 // field[1] m.NodeName
1036 m.NodeName = make([]uint8, 64)
1037 for i := 0; i < len(m.NodeName); i++ {
1038 m.NodeName[i] = uint8(tmp[pos])
1044 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
1045 type GetNodeIndexReply struct {
1046 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1047 NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
1050 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
1051 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
1052 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
1053 func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1055 func (m *GetNodeIndexReply) Size() int {
1060 // field[1] m.Retval
1062 // field[1] m.NodeIndex
1066 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
1067 o := binary.BigEndian
1073 buf = make([]byte, m.Size())
1077 // field[1] m.Retval
1078 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1080 // field[1] m.NodeIndex
1081 o.PutUint32(buf[pos:pos+4], uint32(m.NodeIndex))
1085 func (m *GetNodeIndexReply) Unmarshal(tmp []byte) error {
1086 o := binary.BigEndian
1090 // field[1] m.Retval
1091 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1093 // field[1] m.NodeIndex
1094 m.NodeIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1099 // LogDetails represents VPP binary API message 'log_details'.
1100 type LogDetails struct {
1101 Timestamp Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
1102 Level LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
1103 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty" struc:"[32]byte"`
1104 Message string `binapi:"string[256],name=message" json:"message,omitempty" struc:"[256]byte"`
1107 func (m *LogDetails) Reset() { *m = LogDetails{} }
1108 func (*LogDetails) GetMessageName() string { return "log_details" }
1109 func (*LogDetails) GetCrcString() string { return "255827a1" }
1110 func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
1112 func (m *LogDetails) Size() int {
1117 // field[1] m.Timestamp
1121 // field[1] m.MsgClass
1123 // field[1] m.Message
1127 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
1128 o := binary.BigEndian
1134 buf = make([]byte, m.Size())
1138 // field[1] m.Timestamp
1139 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.Timestamp)))
1142 o.PutUint32(buf[pos:pos+4], uint32(m.Level))
1144 // field[1] m.MsgClass
1145 copy(buf[pos:pos+32], m.MsgClass)
1147 // field[1] m.Message
1148 copy(buf[pos:pos+256], m.Message)
1152 func (m *LogDetails) Unmarshal(tmp []byte) error {
1153 o := binary.BigEndian
1157 // field[1] m.Timestamp
1158 m.Timestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1161 m.Level = LogLevel(o.Uint32(tmp[pos : pos+4]))
1163 // field[1] m.MsgClass
1165 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1166 m.MsgClass = codec.DecodeString(tmp[pos : pos+nul])
1169 // field[1] m.Message
1171 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1172 m.Message = codec.DecodeString(tmp[pos : pos+nul])
1178 // LogDump represents VPP binary API message 'log_dump'.
1179 type LogDump struct {
1180 StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
1183 func (m *LogDump) Reset() { *m = LogDump{} }
1184 func (*LogDump) GetMessageName() string { return "log_dump" }
1185 func (*LogDump) GetCrcString() string { return "6ab31753" }
1186 func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage }
1188 func (m *LogDump) Size() int {
1193 // field[1] m.StartTimestamp
1197 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
1198 o := binary.BigEndian
1204 buf = make([]byte, m.Size())
1208 // field[1] m.StartTimestamp
1209 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.StartTimestamp)))
1213 func (m *LogDump) Unmarshal(tmp []byte) error {
1214 o := binary.BigEndian
1218 // field[1] m.StartTimestamp
1219 m.StartTimestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1224 // ShowThreads represents VPP binary API message 'show_threads'.
1225 type ShowThreads struct{}
1227 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
1228 func (*ShowThreads) GetMessageName() string { return "show_threads" }
1229 func (*ShowThreads) GetCrcString() string { return "51077d14" }
1230 func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage }
1232 func (m *ShowThreads) Size() int {
1239 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
1240 o := binary.BigEndian
1246 buf = make([]byte, m.Size())
1252 func (m *ShowThreads) Unmarshal(tmp []byte) error {
1253 o := binary.BigEndian
1260 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
1261 type ShowThreadsReply struct {
1262 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1263 Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=ThreadData"`
1264 ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
1267 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
1268 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
1269 func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" }
1270 func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1272 func (m *ShowThreadsReply) Size() int {
1277 // field[1] m.Retval
1281 // field[1] m.ThreadData
1282 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1285 if j1 < len(m.ThreadData) {
1286 s1 = m.ThreadData[j1]
1296 // field[2] s1.CPUID
1300 // field[2] s1.CPUSocket
1305 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
1306 o := binary.BigEndian
1312 buf = make([]byte, m.Size())
1316 // field[1] m.Retval
1317 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1320 o.PutUint32(buf[pos:pos+4], uint32(len(m.ThreadData)))
1322 // field[1] m.ThreadData
1323 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1325 if j1 < len(m.ThreadData) {
1326 v1 = m.ThreadData[j1]
1329 o.PutUint32(buf[pos:pos+4], uint32(v1.ID))
1332 for i := 0; i < 64; i++ {
1334 if i < len(v1.Name) {
1335 x = uint8(v1.Name[i])
1341 for i := 0; i < 64; i++ {
1343 if i < len(v1.Type) {
1344 x = uint8(v1.Type[i])
1350 o.PutUint32(buf[pos:pos+4], uint32(v1.PID))
1352 // field[2] v1.CPUID
1353 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUID))
1356 o.PutUint32(buf[pos:pos+4], uint32(v1.Core))
1358 // field[2] v1.CPUSocket
1359 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUSocket))
1364 func (m *ShowThreadsReply) Unmarshal(tmp []byte) error {
1365 o := binary.BigEndian
1369 // field[1] m.Retval
1370 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1373 m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
1375 // field[1] m.ThreadData
1376 m.ThreadData = make([]ThreadData, int(m.Count))
1377 for j1 := 0; j1 < int(m.Count); j1++ {
1378 // field[2] m.ThreadData[j1].ID
1379 m.ThreadData[j1].ID = uint32(o.Uint32(tmp[pos : pos+4]))
1381 // field[2] m.ThreadData[j1].Name
1382 m.ThreadData[j1].Name = make([]uint8, 64)
1383 for i := 0; i < len(m.ThreadData[j1].Name); i++ {
1384 m.ThreadData[j1].Name[i] = uint8(tmp[pos])
1387 // field[2] m.ThreadData[j1].Type
1388 m.ThreadData[j1].Type = make([]uint8, 64)
1389 for i := 0; i < len(m.ThreadData[j1].Type); i++ {
1390 m.ThreadData[j1].Type[i] = uint8(tmp[pos])
1393 // field[2] m.ThreadData[j1].PID
1394 m.ThreadData[j1].PID = uint32(o.Uint32(tmp[pos : pos+4]))
1396 // field[2] m.ThreadData[j1].CPUID
1397 m.ThreadData[j1].CPUID = uint32(o.Uint32(tmp[pos : pos+4]))
1399 // field[2] m.ThreadData[j1].Core
1400 m.ThreadData[j1].Core = uint32(o.Uint32(tmp[pos : pos+4]))
1402 // field[2] m.ThreadData[j1].CPUSocket
1403 m.ThreadData[j1].CPUSocket = uint32(o.Uint32(tmp[pos : pos+4]))
1409 // ShowVersion represents VPP binary API message 'show_version'.
1410 type ShowVersion struct{}
1412 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
1413 func (*ShowVersion) GetMessageName() string { return "show_version" }
1414 func (*ShowVersion) GetCrcString() string { return "51077d14" }
1415 func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage }
1417 func (m *ShowVersion) Size() int {
1424 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
1425 o := binary.BigEndian
1431 buf = make([]byte, m.Size())
1437 func (m *ShowVersion) Unmarshal(tmp []byte) error {
1438 o := binary.BigEndian
1445 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
1446 type ShowVersionReply struct {
1447 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1448 Program string `binapi:"string[32],name=program" json:"program,omitempty" struc:"[32]byte"`
1449 Version string `binapi:"string[32],name=version" json:"version,omitempty" struc:"[32]byte"`
1450 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty" struc:"[32]byte"`
1451 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty" struc:"[256]byte"`
1454 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
1455 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
1456 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
1457 func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1459 func (m *ShowVersionReply) Size() int {
1464 // field[1] m.Retval
1466 // field[1] m.Program
1468 // field[1] m.Version
1470 // field[1] m.BuildDate
1472 // field[1] m.BuildDirectory
1476 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
1477 o := binary.BigEndian
1483 buf = make([]byte, m.Size())
1487 // field[1] m.Retval
1488 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1490 // field[1] m.Program
1491 copy(buf[pos:pos+32], m.Program)
1493 // field[1] m.Version
1494 copy(buf[pos:pos+32], m.Version)
1496 // field[1] m.BuildDate
1497 copy(buf[pos:pos+32], m.BuildDate)
1499 // field[1] m.BuildDirectory
1500 copy(buf[pos:pos+256], m.BuildDirectory)
1504 func (m *ShowVersionReply) Unmarshal(tmp []byte) error {
1505 o := binary.BigEndian
1509 // field[1] m.Retval
1510 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1512 // field[1] m.Program
1514 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1515 m.Program = codec.DecodeString(tmp[pos : pos+nul])
1518 // field[1] m.Version
1520 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1521 m.Version = codec.DecodeString(tmp[pos : pos+nul])
1524 // field[1] m.BuildDate
1526 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1527 m.BuildDate = codec.DecodeString(tmp[pos : pos+nul])
1530 // field[1] m.BuildDirectory
1532 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1533 m.BuildDirectory = codec.DecodeString(tmp[pos : pos+nul])
1539 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
1540 type ShowVpeSystemTime struct{}
1542 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
1543 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
1544 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
1545 func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage }
1547 func (m *ShowVpeSystemTime) Size() int {
1554 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1555 o := binary.BigEndian
1561 buf = make([]byte, m.Size())
1567 func (m *ShowVpeSystemTime) Unmarshal(tmp []byte) error {
1568 o := binary.BigEndian
1575 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
1576 type ShowVpeSystemTimeReply struct {
1577 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1578 VpeSystemTime Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
1581 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
1582 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
1583 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
1584 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1586 func (m *ShowVpeSystemTimeReply) Size() int {
1591 // field[1] m.Retval
1593 // field[1] m.VpeSystemTime
1597 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1598 o := binary.BigEndian
1604 buf = make([]byte, m.Size())
1608 // field[1] m.Retval
1609 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1611 // field[1] m.VpeSystemTime
1612 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.VpeSystemTime)))
1616 func (m *ShowVpeSystemTimeReply) Unmarshal(tmp []byte) error {
1617 o := binary.BigEndian
1621 // field[1] m.Retval
1622 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1624 // field[1] m.VpeSystemTime
1625 m.VpeSystemTime = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1630 func init() { file_vpe_binapi_init() }
1631 func file_vpe_binapi_init() {
1632 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
1633 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
1634 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
1635 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
1636 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
1637 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
1638 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
1639 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
1640 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
1641 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
1642 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
1643 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
1644 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
1645 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
1646 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
1647 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
1648 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
1649 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
1650 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
1651 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
1652 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
1653 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
1654 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
1655 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
1656 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
1657 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
1660 // Messages returns list of all messages in this module.
1661 func AllMessages() []api.Message {
1662 return []api.Message{
1663 (*AddNodeNext)(nil),
1664 (*AddNodeNextReply)(nil),
1667 (*CliInbandReply)(nil),
1669 (*ControlPing)(nil),
1670 (*ControlPingReply)(nil),
1671 (*GetF64EndianValue)(nil),
1672 (*GetF64EndianValueReply)(nil),
1673 (*GetF64IncrementByOne)(nil),
1674 (*GetF64IncrementByOneReply)(nil),
1675 (*GetNextIndex)(nil),
1676 (*GetNextIndexReply)(nil),
1677 (*GetNodeGraph)(nil),
1678 (*GetNodeGraphReply)(nil),
1679 (*GetNodeIndex)(nil),
1680 (*GetNodeIndexReply)(nil),
1683 (*ShowThreads)(nil),
1684 (*ShowThreadsReply)(nil),
1685 (*ShowVersion)(nil),
1686 (*ShowVersionReply)(nil),
1687 (*ShowVpeSystemTime)(nil),
1688 (*ShowVpeSystemTimeReply)(nil),
1692 // Reference imports to suppress errors if they are not otherwise used.
1693 var _ = api.RegisterMessage
1694 var _ = codec.DecodeString
1695 var _ = bytes.NewBuffer
1696 var _ = context.Background
1698 var _ = strconv.Itoa
1700 var _ = binary.BigEndian
1701 var _ = math.Float32bits