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).
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 = 0xbd2c94f4
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 string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
104 Type string `binapi:"string[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 string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
127 NextName string `binapi:"string[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 "2457116d" }
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 copy(buf[pos:pos+64], m.NodeName)
160 // field[1] m.NextName
161 copy(buf[pos:pos+64], m.NextName)
165 func (m *AddNodeNext) Unmarshal(tmp []byte) error {
166 o := binary.BigEndian
170 // field[1] m.NodeName
172 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
173 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
176 // field[1] m.NextName
178 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
179 m.NextName = codec.DecodeString(tmp[pos : pos+nul])
185 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
186 type AddNodeNextReply struct {
187 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
188 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
191 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
192 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
193 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
194 func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage }
196 func (m *AddNodeNextReply) Size() int {
203 // field[1] m.NextIndex
207 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
208 o := binary.BigEndian
214 buf = make([]byte, m.Size())
219 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
221 // field[1] m.NextIndex
222 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
226 func (m *AddNodeNextReply) Unmarshal(tmp []byte) error {
227 o := binary.BigEndian
232 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
234 // field[1] m.NextIndex
235 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
240 // Cli represents VPP binary API message 'cli'.
242 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
245 func (m *Cli) Reset() { *m = Cli{} }
246 func (*Cli) GetMessageName() string { return "cli" }
247 func (*Cli) GetCrcString() string { return "23bfbfff" }
248 func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage }
250 func (m *Cli) Size() int {
255 // field[1] m.CmdInShmem
259 func (m *Cli) Marshal(b []byte) ([]byte, error) {
260 o := binary.BigEndian
266 buf = make([]byte, m.Size())
270 // field[1] m.CmdInShmem
271 o.PutUint64(buf[pos:pos+8], uint64(m.CmdInShmem))
275 func (m *Cli) Unmarshal(tmp []byte) error {
276 o := binary.BigEndian
280 // field[1] m.CmdInShmem
281 m.CmdInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
286 // CliInband represents VPP binary API message 'cli_inband'.
287 type CliInband struct {
288 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
289 Cmd string `json:"cmd,omitempty"`
292 func (m *CliInband) Reset() { *m = CliInband{} }
293 func (*CliInband) GetMessageName() string { return "cli_inband" }
294 func (*CliInband) GetCrcString() string { return "f8377302" }
295 func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage }
297 func (m *CliInband) Size() int {
303 size += 4 + len(m.Cmd)
306 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
307 o := binary.BigEndian
313 buf = make([]byte, m.Size())
318 o.PutUint32(buf[pos:pos+4], uint32(len(m.Cmd)))
320 copy(buf[pos:pos+len(m.Cmd)], m.Cmd[:])
324 func (m *CliInband) Unmarshal(tmp []byte) error {
325 o := binary.BigEndian
331 siz := o.Uint32(tmp[pos : pos+4])
333 m.Cmd = codec.DecodeString(tmp[pos : pos+int(siz)])
339 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
340 type CliInbandReply struct {
341 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
342 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
343 Reply string `json:"reply,omitempty"`
346 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
347 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
348 func (*CliInbandReply) GetCrcString() string { return "05879051" }
349 func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage }
351 func (m *CliInbandReply) Size() int {
359 size += 4 + len(m.Reply)
362 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
363 o := binary.BigEndian
369 buf = make([]byte, m.Size())
374 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
377 o.PutUint32(buf[pos:pos+4], uint32(len(m.Reply)))
379 copy(buf[pos:pos+len(m.Reply)], m.Reply[:])
383 func (m *CliInbandReply) Unmarshal(tmp []byte) error {
384 o := binary.BigEndian
389 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
393 siz := o.Uint32(tmp[pos : pos+4])
395 m.Reply = codec.DecodeString(tmp[pos : pos+int(siz)])
401 // CliReply represents VPP binary API message 'cli_reply'.
402 type CliReply struct {
403 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
404 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
407 func (m *CliReply) Reset() { *m = CliReply{} }
408 func (*CliReply) GetMessageName() string { return "cli_reply" }
409 func (*CliReply) GetCrcString() string { return "06d68297" }
410 func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage }
412 func (m *CliReply) Size() int {
419 // field[1] m.ReplyInShmem
423 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
424 o := binary.BigEndian
430 buf = make([]byte, m.Size())
435 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
437 // field[1] m.ReplyInShmem
438 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
442 func (m *CliReply) Unmarshal(tmp []byte) error {
443 o := binary.BigEndian
448 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
450 // field[1] m.ReplyInShmem
451 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
456 // ControlPing represents VPP binary API message 'control_ping'.
457 type ControlPing struct{}
459 func (m *ControlPing) Reset() { *m = ControlPing{} }
460 func (*ControlPing) GetMessageName() string { return "control_ping" }
461 func (*ControlPing) GetCrcString() string { return "51077d14" }
462 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
464 func (m *ControlPing) Size() int {
471 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
472 o := binary.BigEndian
478 buf = make([]byte, m.Size())
484 func (m *ControlPing) Unmarshal(tmp []byte) error {
485 o := binary.BigEndian
492 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
493 type ControlPingReply struct {
494 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
495 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
496 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
499 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
500 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
501 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
502 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
504 func (m *ControlPingReply) Size() int {
511 // field[1] m.ClientIndex
517 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
518 o := binary.BigEndian
524 buf = make([]byte, m.Size())
529 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
531 // field[1] m.ClientIndex
532 o.PutUint32(buf[pos:pos+4], uint32(m.ClientIndex))
535 o.PutUint32(buf[pos:pos+4], uint32(m.VpePID))
539 func (m *ControlPingReply) Unmarshal(tmp []byte) error {
540 o := binary.BigEndian
545 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
547 // field[1] m.ClientIndex
548 m.ClientIndex = uint32(o.Uint32(tmp[pos : pos+4]))
551 m.VpePID = uint32(o.Uint32(tmp[pos : pos+4]))
556 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
557 type GetF64EndianValue struct {
558 F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
561 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
562 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
563 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
564 func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage }
566 func (m *GetF64EndianValue) Size() int {
575 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
576 o := binary.BigEndian
582 buf = make([]byte, m.Size())
587 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64One)))
591 func (m *GetF64EndianValue) Unmarshal(tmp []byte) error {
592 o := binary.BigEndian
597 m.F64One = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
602 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
603 type GetF64EndianValueReply struct {
604 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
605 F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
608 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
609 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
610 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
611 func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage }
613 func (m *GetF64EndianValueReply) Size() int {
620 // field[1] m.F64OneResult
624 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
625 o := binary.BigEndian
631 buf = make([]byte, m.Size())
636 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
638 // field[1] m.F64OneResult
639 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64OneResult)))
643 func (m *GetF64EndianValueReply) Unmarshal(tmp []byte) error {
644 o := binary.BigEndian
649 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
651 // field[1] m.F64OneResult
652 m.F64OneResult = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
657 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
658 type GetF64IncrementByOne struct {
659 F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
662 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
663 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
664 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
665 func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage }
667 func (m *GetF64IncrementByOne) Size() int {
672 // field[1] m.F64Value
676 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
677 o := binary.BigEndian
683 buf = make([]byte, m.Size())
687 // field[1] m.F64Value
688 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
692 func (m *GetF64IncrementByOne) Unmarshal(tmp []byte) error {
693 o := binary.BigEndian
697 // field[1] m.F64Value
698 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
703 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
704 type GetF64IncrementByOneReply struct {
705 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
706 F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
709 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
710 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
711 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
712 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage }
714 func (m *GetF64IncrementByOneReply) Size() int {
721 // field[1] m.F64Value
725 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
726 o := binary.BigEndian
732 buf = make([]byte, m.Size())
737 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
739 // field[1] m.F64Value
740 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.F64Value)))
744 func (m *GetF64IncrementByOneReply) Unmarshal(tmp []byte) error {
745 o := binary.BigEndian
750 m.Retval = uint32(o.Uint32(tmp[pos : pos+4]))
752 // field[1] m.F64Value
753 m.F64Value = float64(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
758 // GetNextIndex represents VPP binary API message 'get_next_index'.
759 type GetNextIndex struct {
760 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
761 NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty" struc:"[64]byte"`
764 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
765 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
766 func (*GetNextIndex) GetCrcString() string { return "2457116d" }
767 func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage }
769 func (m *GetNextIndex) Size() int {
774 // field[1] m.NodeName
776 // field[1] m.NextName
780 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
781 o := binary.BigEndian
787 buf = make([]byte, m.Size())
791 // field[1] m.NodeName
792 copy(buf[pos:pos+64], m.NodeName)
794 // field[1] m.NextName
795 copy(buf[pos:pos+64], m.NextName)
799 func (m *GetNextIndex) Unmarshal(tmp []byte) error {
800 o := binary.BigEndian
804 // field[1] m.NodeName
806 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
807 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
810 // field[1] m.NextName
812 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
813 m.NextName = codec.DecodeString(tmp[pos : pos+nul])
819 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
820 type GetNextIndexReply struct {
821 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
822 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
825 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
826 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
827 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
828 func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
830 func (m *GetNextIndexReply) Size() int {
837 // field[1] m.NextIndex
841 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
842 o := binary.BigEndian
848 buf = make([]byte, m.Size())
853 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
855 // field[1] m.NextIndex
856 o.PutUint32(buf[pos:pos+4], uint32(m.NextIndex))
860 func (m *GetNextIndexReply) Unmarshal(tmp []byte) error {
861 o := binary.BigEndian
866 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
868 // field[1] m.NextIndex
869 m.NextIndex = uint32(o.Uint32(tmp[pos : pos+4]))
874 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
875 type GetNodeGraph struct{}
877 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
878 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
879 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
880 func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage }
882 func (m *GetNodeGraph) Size() int {
889 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
890 o := binary.BigEndian
896 buf = make([]byte, m.Size())
902 func (m *GetNodeGraph) Unmarshal(tmp []byte) error {
903 o := binary.BigEndian
910 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
911 type GetNodeGraphReply struct {
912 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
913 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
916 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
917 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
918 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
919 func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage }
921 func (m *GetNodeGraphReply) Size() int {
928 // field[1] m.ReplyInShmem
932 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
933 o := binary.BigEndian
939 buf = make([]byte, m.Size())
944 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
946 // field[1] m.ReplyInShmem
947 o.PutUint64(buf[pos:pos+8], uint64(m.ReplyInShmem))
951 func (m *GetNodeGraphReply) Unmarshal(tmp []byte) error {
952 o := binary.BigEndian
957 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
959 // field[1] m.ReplyInShmem
960 m.ReplyInShmem = uint64(o.Uint64(tmp[pos : pos+8]))
965 // GetNodeIndex represents VPP binary API message 'get_node_index'.
966 type GetNodeIndex struct {
967 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty" struc:"[64]byte"`
970 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
971 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
972 func (*GetNodeIndex) GetCrcString() string { return "f1984c64" }
973 func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage }
975 func (m *GetNodeIndex) Size() int {
980 // field[1] m.NodeName
984 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
985 o := binary.BigEndian
991 buf = make([]byte, m.Size())
995 // field[1] m.NodeName
996 copy(buf[pos:pos+64], m.NodeName)
1000 func (m *GetNodeIndex) Unmarshal(tmp []byte) error {
1001 o := binary.BigEndian
1005 // field[1] m.NodeName
1007 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1008 m.NodeName = codec.DecodeString(tmp[pos : pos+nul])
1014 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
1015 type GetNodeIndexReply struct {
1016 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1017 NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
1020 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
1021 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
1022 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
1023 func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1025 func (m *GetNodeIndexReply) Size() int {
1030 // field[1] m.Retval
1032 // field[1] m.NodeIndex
1036 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
1037 o := binary.BigEndian
1043 buf = make([]byte, m.Size())
1047 // field[1] m.Retval
1048 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1050 // field[1] m.NodeIndex
1051 o.PutUint32(buf[pos:pos+4], uint32(m.NodeIndex))
1055 func (m *GetNodeIndexReply) Unmarshal(tmp []byte) error {
1056 o := binary.BigEndian
1060 // field[1] m.Retval
1061 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1063 // field[1] m.NodeIndex
1064 m.NodeIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1069 // LogDetails represents VPP binary API message 'log_details'.
1070 type LogDetails struct {
1071 Timestamp Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
1072 Level LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
1073 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty" struc:"[32]byte"`
1074 Message string `binapi:"string[256],name=message" json:"message,omitempty" struc:"[256]byte"`
1077 func (m *LogDetails) Reset() { *m = LogDetails{} }
1078 func (*LogDetails) GetMessageName() string { return "log_details" }
1079 func (*LogDetails) GetCrcString() string { return "255827a1" }
1080 func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
1082 func (m *LogDetails) Size() int {
1087 // field[1] m.Timestamp
1091 // field[1] m.MsgClass
1093 // field[1] m.Message
1097 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
1098 o := binary.BigEndian
1104 buf = make([]byte, m.Size())
1108 // field[1] m.Timestamp
1109 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.Timestamp)))
1112 o.PutUint32(buf[pos:pos+4], uint32(m.Level))
1114 // field[1] m.MsgClass
1115 copy(buf[pos:pos+32], m.MsgClass)
1117 // field[1] m.Message
1118 copy(buf[pos:pos+256], m.Message)
1122 func (m *LogDetails) Unmarshal(tmp []byte) error {
1123 o := binary.BigEndian
1127 // field[1] m.Timestamp
1128 m.Timestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1131 m.Level = LogLevel(o.Uint32(tmp[pos : pos+4]))
1133 // field[1] m.MsgClass
1135 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1136 m.MsgClass = codec.DecodeString(tmp[pos : pos+nul])
1139 // field[1] m.Message
1141 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1142 m.Message = codec.DecodeString(tmp[pos : pos+nul])
1148 // LogDump represents VPP binary API message 'log_dump'.
1149 type LogDump struct {
1150 StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
1153 func (m *LogDump) Reset() { *m = LogDump{} }
1154 func (*LogDump) GetMessageName() string { return "log_dump" }
1155 func (*LogDump) GetCrcString() string { return "6ab31753" }
1156 func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage }
1158 func (m *LogDump) Size() int {
1163 // field[1] m.StartTimestamp
1167 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
1168 o := binary.BigEndian
1174 buf = make([]byte, m.Size())
1178 // field[1] m.StartTimestamp
1179 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.StartTimestamp)))
1183 func (m *LogDump) Unmarshal(tmp []byte) error {
1184 o := binary.BigEndian
1188 // field[1] m.StartTimestamp
1189 m.StartTimestamp = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1194 // ShowThreads represents VPP binary API message 'show_threads'.
1195 type ShowThreads struct{}
1197 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
1198 func (*ShowThreads) GetMessageName() string { return "show_threads" }
1199 func (*ShowThreads) GetCrcString() string { return "51077d14" }
1200 func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage }
1202 func (m *ShowThreads) Size() int {
1209 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
1210 o := binary.BigEndian
1216 buf = make([]byte, m.Size())
1222 func (m *ShowThreads) Unmarshal(tmp []byte) error {
1223 o := binary.BigEndian
1230 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
1231 type ShowThreadsReply struct {
1232 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1233 Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=ThreadData"`
1234 ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
1237 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
1238 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
1239 func (*ShowThreadsReply) GetCrcString() string { return "efd78e83" }
1240 func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1242 func (m *ShowThreadsReply) Size() int {
1247 // field[1] m.Retval
1251 // field[1] m.ThreadData
1252 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1255 if j1 < len(m.ThreadData) {
1256 s1 = m.ThreadData[j1]
1266 // field[2] s1.CPUID
1270 // field[2] s1.CPUSocket
1275 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
1276 o := binary.BigEndian
1282 buf = make([]byte, m.Size())
1286 // field[1] m.Retval
1287 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1290 o.PutUint32(buf[pos:pos+4], uint32(len(m.ThreadData)))
1292 // field[1] m.ThreadData
1293 for j1 := 0; j1 < len(m.ThreadData); j1++ {
1295 if j1 < len(m.ThreadData) {
1296 v1 = m.ThreadData[j1]
1299 o.PutUint32(buf[pos:pos+4], uint32(v1.ID))
1302 copy(buf[pos:pos+64], v1.Name)
1305 copy(buf[pos:pos+64], v1.Type)
1308 o.PutUint32(buf[pos:pos+4], uint32(v1.PID))
1310 // field[2] v1.CPUID
1311 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUID))
1314 o.PutUint32(buf[pos:pos+4], uint32(v1.Core))
1316 // field[2] v1.CPUSocket
1317 o.PutUint32(buf[pos:pos+4], uint32(v1.CPUSocket))
1322 func (m *ShowThreadsReply) Unmarshal(tmp []byte) error {
1323 o := binary.BigEndian
1327 // field[1] m.Retval
1328 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1331 m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
1333 // field[1] m.ThreadData
1334 m.ThreadData = make([]ThreadData, int(m.Count))
1335 for j1 := 0; j1 < int(m.Count); j1++ {
1336 // field[2] m.ThreadData[j1].ID
1337 m.ThreadData[j1].ID = uint32(o.Uint32(tmp[pos : pos+4]))
1339 // field[2] m.ThreadData[j1].Name
1341 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1342 m.ThreadData[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
1345 // field[2] m.ThreadData[j1].Type
1347 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1348 m.ThreadData[j1].Type = codec.DecodeString(tmp[pos : pos+nul])
1351 // field[2] m.ThreadData[j1].PID
1352 m.ThreadData[j1].PID = uint32(o.Uint32(tmp[pos : pos+4]))
1354 // field[2] m.ThreadData[j1].CPUID
1355 m.ThreadData[j1].CPUID = uint32(o.Uint32(tmp[pos : pos+4]))
1357 // field[2] m.ThreadData[j1].Core
1358 m.ThreadData[j1].Core = uint32(o.Uint32(tmp[pos : pos+4]))
1360 // field[2] m.ThreadData[j1].CPUSocket
1361 m.ThreadData[j1].CPUSocket = uint32(o.Uint32(tmp[pos : pos+4]))
1367 // ShowVersion represents VPP binary API message 'show_version'.
1368 type ShowVersion struct{}
1370 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
1371 func (*ShowVersion) GetMessageName() string { return "show_version" }
1372 func (*ShowVersion) GetCrcString() string { return "51077d14" }
1373 func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage }
1375 func (m *ShowVersion) Size() int {
1382 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
1383 o := binary.BigEndian
1389 buf = make([]byte, m.Size())
1395 func (m *ShowVersion) Unmarshal(tmp []byte) error {
1396 o := binary.BigEndian
1403 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
1404 type ShowVersionReply struct {
1405 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1406 Program string `binapi:"string[32],name=program" json:"program,omitempty" struc:"[32]byte"`
1407 Version string `binapi:"string[32],name=version" json:"version,omitempty" struc:"[32]byte"`
1408 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty" struc:"[32]byte"`
1409 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty" struc:"[256]byte"`
1412 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
1413 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
1414 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
1415 func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1417 func (m *ShowVersionReply) Size() int {
1422 // field[1] m.Retval
1424 // field[1] m.Program
1426 // field[1] m.Version
1428 // field[1] m.BuildDate
1430 // field[1] m.BuildDirectory
1434 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
1435 o := binary.BigEndian
1441 buf = make([]byte, m.Size())
1445 // field[1] m.Retval
1446 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1448 // field[1] m.Program
1449 copy(buf[pos:pos+32], m.Program)
1451 // field[1] m.Version
1452 copy(buf[pos:pos+32], m.Version)
1454 // field[1] m.BuildDate
1455 copy(buf[pos:pos+32], m.BuildDate)
1457 // field[1] m.BuildDirectory
1458 copy(buf[pos:pos+256], m.BuildDirectory)
1462 func (m *ShowVersionReply) Unmarshal(tmp []byte) error {
1463 o := binary.BigEndian
1467 // field[1] m.Retval
1468 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1470 // field[1] m.Program
1472 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1473 m.Program = codec.DecodeString(tmp[pos : pos+nul])
1476 // field[1] m.Version
1478 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1479 m.Version = codec.DecodeString(tmp[pos : pos+nul])
1482 // field[1] m.BuildDate
1484 nul := bytes.Index(tmp[pos:pos+32], []byte{0x00})
1485 m.BuildDate = codec.DecodeString(tmp[pos : pos+nul])
1488 // field[1] m.BuildDirectory
1490 nul := bytes.Index(tmp[pos:pos+256], []byte{0x00})
1491 m.BuildDirectory = codec.DecodeString(tmp[pos : pos+nul])
1497 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
1498 type ShowVpeSystemTime struct{}
1500 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
1501 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
1502 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
1503 func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage }
1505 func (m *ShowVpeSystemTime) Size() int {
1512 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1513 o := binary.BigEndian
1519 buf = make([]byte, m.Size())
1525 func (m *ShowVpeSystemTime) Unmarshal(tmp []byte) error {
1526 o := binary.BigEndian
1533 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
1534 type ShowVpeSystemTimeReply struct {
1535 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1536 VpeSystemTime Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
1539 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
1540 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
1541 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
1542 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1544 func (m *ShowVpeSystemTimeReply) Size() int {
1549 // field[1] m.Retval
1551 // field[1] m.VpeSystemTime
1555 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1556 o := binary.BigEndian
1562 buf = make([]byte, m.Size())
1566 // field[1] m.Retval
1567 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1569 // field[1] m.VpeSystemTime
1570 o.PutUint64(buf[pos:pos+8], math.Float64bits(float64(m.VpeSystemTime)))
1574 func (m *ShowVpeSystemTimeReply) Unmarshal(tmp []byte) error {
1575 o := binary.BigEndian
1579 // field[1] m.Retval
1580 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1582 // field[1] m.VpeSystemTime
1583 m.VpeSystemTime = Timestamp(math.Float64frombits(o.Uint64(tmp[pos : pos+8])))
1588 func init() { file_vpe_binapi_init() }
1589 func file_vpe_binapi_init() {
1590 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
1591 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
1592 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
1593 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
1594 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
1595 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
1596 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
1597 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
1598 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
1599 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
1600 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
1601 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
1602 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
1603 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
1604 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
1605 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
1606 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
1607 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
1608 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
1609 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
1610 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
1611 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
1612 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
1613 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
1614 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
1615 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
1618 // Messages returns list of all messages in this module.
1619 func AllMessages() []api.Message {
1620 return []api.Message{
1621 (*AddNodeNext)(nil),
1622 (*AddNodeNextReply)(nil),
1625 (*CliInbandReply)(nil),
1627 (*ControlPing)(nil),
1628 (*ControlPingReply)(nil),
1629 (*GetF64EndianValue)(nil),
1630 (*GetF64EndianValueReply)(nil),
1631 (*GetF64IncrementByOne)(nil),
1632 (*GetF64IncrementByOneReply)(nil),
1633 (*GetNextIndex)(nil),
1634 (*GetNextIndexReply)(nil),
1635 (*GetNodeGraph)(nil),
1636 (*GetNodeGraphReply)(nil),
1637 (*GetNodeIndex)(nil),
1638 (*GetNodeIndexReply)(nil),
1641 (*ShowThreads)(nil),
1642 (*ShowThreadsReply)(nil),
1643 (*ShowVersion)(nil),
1644 (*ShowVersionReply)(nil),
1645 (*ShowVpeSystemTime)(nil),
1646 (*ShowVpeSystemTimeReply)(nil),
1650 // Reference imports to suppress errors if they are not otherwise used.
1651 var _ = api.RegisterMessage
1652 var _ = codec.DecodeString
1653 var _ = bytes.NewBuffer
1654 var _ = context.Background
1656 var _ = strconv.Itoa
1658 var _ = binary.BigEndian
1659 var _ = math.Float32bits