1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
4 // VPP: 20.05.1-release
5 // source: /usr/share/vpp/api/core/pipe.api.json
7 // Package pipe contains generated bindings for API file pipe.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0xd22736c9
32 // PipeCreate defines message 'pipe_create'.
33 type PipeCreate struct {
34 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
35 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
38 func (m *PipeCreate) Reset() { *m = PipeCreate{} }
39 func (*PipeCreate) GetMessageName() string { return "pipe_create" }
40 func (*PipeCreate) GetCrcString() string { return "bb263bd3" }
41 func (*PipeCreate) GetMessageType() api.MessageType {
42 return api.RequestMessage
45 func (m *PipeCreate) Size() (size int) {
49 size += 1 // m.IsSpecified
50 size += 4 // m.UserInstance
53 func (m *PipeCreate) Marshal(b []byte) ([]byte, error) {
55 b = make([]byte, m.Size())
57 buf := codec.NewBuffer(b)
58 buf.EncodeBool(m.IsSpecified)
59 buf.EncodeUint32(m.UserInstance)
60 return buf.Bytes(), nil
62 func (m *PipeCreate) Unmarshal(b []byte) error {
63 buf := codec.NewBuffer(b)
64 m.IsSpecified = buf.DecodeBool()
65 m.UserInstance = buf.DecodeUint32()
69 // PipeCreateReply defines message 'pipe_create_reply'.
70 type PipeCreateReply struct {
71 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
72 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
73 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
76 func (m *PipeCreateReply) Reset() { *m = PipeCreateReply{} }
77 func (*PipeCreateReply) GetMessageName() string { return "pipe_create_reply" }
78 func (*PipeCreateReply) GetCrcString() string { return "d4c2c2b3" }
79 func (*PipeCreateReply) GetMessageType() api.MessageType {
80 return api.ReplyMessage
83 func (m *PipeCreateReply) Size() (size int) {
88 size += 4 // m.SwIfIndex
89 for j1 := 0; j1 < 2; j1++ {
90 size += 4 // m.PipeSwIfIndex[j1]
94 func (m *PipeCreateReply) Marshal(b []byte) ([]byte, error) {
96 b = make([]byte, m.Size())
98 buf := codec.NewBuffer(b)
99 buf.EncodeInt32(m.Retval)
100 buf.EncodeUint32(uint32(m.SwIfIndex))
101 for j0 := 0; j0 < 2; j0++ {
102 buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
104 return buf.Bytes(), nil
106 func (m *PipeCreateReply) Unmarshal(b []byte) error {
107 buf := codec.NewBuffer(b)
108 m.Retval = buf.DecodeInt32()
109 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
110 for j0 := 0; j0 < 2; j0++ {
111 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
116 // PipeDelete defines message 'pipe_delete'.
117 type PipeDelete struct {
118 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
121 func (m *PipeDelete) Reset() { *m = PipeDelete{} }
122 func (*PipeDelete) GetMessageName() string { return "pipe_delete" }
123 func (*PipeDelete) GetCrcString() string { return "f9e6675e" }
124 func (*PipeDelete) GetMessageType() api.MessageType {
125 return api.RequestMessage
128 func (m *PipeDelete) Size() (size int) {
132 size += 4 // m.SwIfIndex
135 func (m *PipeDelete) Marshal(b []byte) ([]byte, error) {
137 b = make([]byte, m.Size())
139 buf := codec.NewBuffer(b)
140 buf.EncodeUint32(uint32(m.SwIfIndex))
141 return buf.Bytes(), nil
143 func (m *PipeDelete) Unmarshal(b []byte) error {
144 buf := codec.NewBuffer(b)
145 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
149 // PipeDeleteReply defines message 'pipe_delete_reply'.
150 type PipeDeleteReply struct {
151 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
154 func (m *PipeDeleteReply) Reset() { *m = PipeDeleteReply{} }
155 func (*PipeDeleteReply) GetMessageName() string { return "pipe_delete_reply" }
156 func (*PipeDeleteReply) GetCrcString() string { return "e8d4e804" }
157 func (*PipeDeleteReply) GetMessageType() api.MessageType {
158 return api.ReplyMessage
161 func (m *PipeDeleteReply) Size() (size int) {
165 size += 4 // m.Retval
168 func (m *PipeDeleteReply) Marshal(b []byte) ([]byte, error) {
170 b = make([]byte, m.Size())
172 buf := codec.NewBuffer(b)
173 buf.EncodeInt32(m.Retval)
174 return buf.Bytes(), nil
176 func (m *PipeDeleteReply) Unmarshal(b []byte) error {
177 buf := codec.NewBuffer(b)
178 m.Retval = buf.DecodeInt32()
182 // PipeDetails defines message 'pipe_details'.
183 type PipeDetails struct {
184 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
185 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
186 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
189 func (m *PipeDetails) Reset() { *m = PipeDetails{} }
190 func (*PipeDetails) GetMessageName() string { return "pipe_details" }
191 func (*PipeDetails) GetCrcString() string { return "43ac107a" }
192 func (*PipeDetails) GetMessageType() api.MessageType {
193 return api.ReplyMessage
196 func (m *PipeDetails) Size() (size int) {
200 size += 4 // m.SwIfIndex
201 for j1 := 0; j1 < 2; j1++ {
202 size += 4 // m.PipeSwIfIndex[j1]
204 size += 4 // m.Instance
207 func (m *PipeDetails) Marshal(b []byte) ([]byte, error) {
209 b = make([]byte, m.Size())
211 buf := codec.NewBuffer(b)
212 buf.EncodeUint32(uint32(m.SwIfIndex))
213 for j0 := 0; j0 < 2; j0++ {
214 buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
216 buf.EncodeUint32(m.Instance)
217 return buf.Bytes(), nil
219 func (m *PipeDetails) Unmarshal(b []byte) error {
220 buf := codec.NewBuffer(b)
221 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
222 for j0 := 0; j0 < 2; j0++ {
223 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
225 m.Instance = buf.DecodeUint32()
229 // PipeDump defines message 'pipe_dump'.
230 type PipeDump struct{}
232 func (m *PipeDump) Reset() { *m = PipeDump{} }
233 func (*PipeDump) GetMessageName() string { return "pipe_dump" }
234 func (*PipeDump) GetCrcString() string { return "51077d14" }
235 func (*PipeDump) GetMessageType() api.MessageType {
236 return api.RequestMessage
239 func (m *PipeDump) Size() (size int) {
245 func (m *PipeDump) Marshal(b []byte) ([]byte, error) {
247 b = make([]byte, m.Size())
249 buf := codec.NewBuffer(b)
250 return buf.Bytes(), nil
252 func (m *PipeDump) Unmarshal(b []byte) error {
256 func init() { file_pipe_binapi_init() }
257 func file_pipe_binapi_init() {
258 api.RegisterMessage((*PipeCreate)(nil), "pipe_create_bb263bd3")
259 api.RegisterMessage((*PipeCreateReply)(nil), "pipe_create_reply_d4c2c2b3")
260 api.RegisterMessage((*PipeDelete)(nil), "pipe_delete_f9e6675e")
261 api.RegisterMessage((*PipeDeleteReply)(nil), "pipe_delete_reply_e8d4e804")
262 api.RegisterMessage((*PipeDetails)(nil), "pipe_details_43ac107a")
263 api.RegisterMessage((*PipeDump)(nil), "pipe_dump_51077d14")
266 // Messages returns list of all messages in this module.
267 func AllMessages() []api.Message {
268 return []api.Message{
270 (*PipeCreateReply)(nil),
272 (*PipeDeleteReply)(nil),