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/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() int {
50 size += 1 // m.IsSpecified
51 size += 4 // m.UserInstance
54 func (m *PipeCreate) Marshal(b []byte) ([]byte, error) {
57 buf = codec.NewBuffer(make([]byte, m.Size()))
59 buf = codec.NewBuffer(b)
61 buf.EncodeBool(m.IsSpecified)
62 buf.EncodeUint32(uint32(m.UserInstance))
63 return buf.Bytes(), nil
65 func (m *PipeCreate) Unmarshal(b []byte) error {
66 buf := codec.NewBuffer(b)
67 m.IsSpecified = buf.DecodeBool()
68 m.UserInstance = buf.DecodeUint32()
72 // PipeCreateReply defines message 'pipe_create_reply'.
73 type PipeCreateReply struct {
74 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
75 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
76 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
79 func (m *PipeCreateReply) Reset() { *m = PipeCreateReply{} }
80 func (*PipeCreateReply) GetMessageName() string { return "pipe_create_reply" }
81 func (*PipeCreateReply) GetCrcString() string { return "d4c2c2b3" }
82 func (*PipeCreateReply) GetMessageType() api.MessageType {
83 return api.ReplyMessage
86 func (m *PipeCreateReply) Size() int {
92 size += 4 // m.SwIfIndex
93 for j1 := 0; j1 < 2; j1++ {
94 var s1 interface_types.InterfaceIndex
96 if j1 < len(m.PipeSwIfIndex) {
97 s1 = m.PipeSwIfIndex[j1]
103 func (m *PipeCreateReply) Marshal(b []byte) ([]byte, error) {
104 var buf *codec.Buffer
106 buf = codec.NewBuffer(make([]byte, m.Size()))
108 buf = codec.NewBuffer(b)
110 buf.EncodeUint32(uint32(m.Retval))
111 buf.EncodeUint32(uint32(m.SwIfIndex))
112 for j0 := 0; j0 < 2; j0++ {
113 var v0 interface_types.InterfaceIndex
114 if j0 < len(m.PipeSwIfIndex) {
115 v0 = m.PipeSwIfIndex[j0]
117 buf.EncodeUint32(uint32(v0))
119 return buf.Bytes(), nil
121 func (m *PipeCreateReply) Unmarshal(b []byte) error {
122 buf := codec.NewBuffer(b)
123 m.Retval = int32(buf.DecodeUint32())
124 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
125 for j0 := 0; j0 < 2; j0++ {
126 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
131 // PipeDelete defines message 'pipe_delete'.
132 type PipeDelete struct {
133 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
136 func (m *PipeDelete) Reset() { *m = PipeDelete{} }
137 func (*PipeDelete) GetMessageName() string { return "pipe_delete" }
138 func (*PipeDelete) GetCrcString() string { return "f9e6675e" }
139 func (*PipeDelete) GetMessageType() api.MessageType {
140 return api.RequestMessage
143 func (m *PipeDelete) Size() int {
148 size += 4 // m.SwIfIndex
151 func (m *PipeDelete) Marshal(b []byte) ([]byte, error) {
152 var buf *codec.Buffer
154 buf = codec.NewBuffer(make([]byte, m.Size()))
156 buf = codec.NewBuffer(b)
158 buf.EncodeUint32(uint32(m.SwIfIndex))
159 return buf.Bytes(), nil
161 func (m *PipeDelete) Unmarshal(b []byte) error {
162 buf := codec.NewBuffer(b)
163 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
167 // PipeDeleteReply defines message 'pipe_delete_reply'.
168 type PipeDeleteReply struct {
169 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
172 func (m *PipeDeleteReply) Reset() { *m = PipeDeleteReply{} }
173 func (*PipeDeleteReply) GetMessageName() string { return "pipe_delete_reply" }
174 func (*PipeDeleteReply) GetCrcString() string { return "e8d4e804" }
175 func (*PipeDeleteReply) GetMessageType() api.MessageType {
176 return api.ReplyMessage
179 func (m *PipeDeleteReply) Size() int {
184 size += 4 // m.Retval
187 func (m *PipeDeleteReply) Marshal(b []byte) ([]byte, error) {
188 var buf *codec.Buffer
190 buf = codec.NewBuffer(make([]byte, m.Size()))
192 buf = codec.NewBuffer(b)
194 buf.EncodeUint32(uint32(m.Retval))
195 return buf.Bytes(), nil
197 func (m *PipeDeleteReply) Unmarshal(b []byte) error {
198 buf := codec.NewBuffer(b)
199 m.Retval = int32(buf.DecodeUint32())
203 // PipeDetails defines message 'pipe_details'.
204 type PipeDetails struct {
205 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
206 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
207 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
210 func (m *PipeDetails) Reset() { *m = PipeDetails{} }
211 func (*PipeDetails) GetMessageName() string { return "pipe_details" }
212 func (*PipeDetails) GetCrcString() string { return "43ac107a" }
213 func (*PipeDetails) GetMessageType() api.MessageType {
214 return api.ReplyMessage
217 func (m *PipeDetails) Size() int {
222 size += 4 // m.SwIfIndex
223 for j1 := 0; j1 < 2; j1++ {
224 var s1 interface_types.InterfaceIndex
226 if j1 < len(m.PipeSwIfIndex) {
227 s1 = m.PipeSwIfIndex[j1]
231 size += 4 // m.Instance
234 func (m *PipeDetails) Marshal(b []byte) ([]byte, error) {
235 var buf *codec.Buffer
237 buf = codec.NewBuffer(make([]byte, m.Size()))
239 buf = codec.NewBuffer(b)
241 buf.EncodeUint32(uint32(m.SwIfIndex))
242 for j0 := 0; j0 < 2; j0++ {
243 var v0 interface_types.InterfaceIndex
244 if j0 < len(m.PipeSwIfIndex) {
245 v0 = m.PipeSwIfIndex[j0]
247 buf.EncodeUint32(uint32(v0))
249 buf.EncodeUint32(uint32(m.Instance))
250 return buf.Bytes(), nil
252 func (m *PipeDetails) Unmarshal(b []byte) error {
253 buf := codec.NewBuffer(b)
254 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
255 for j0 := 0; j0 < 2; j0++ {
256 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
258 m.Instance = buf.DecodeUint32()
262 // PipeDump defines message 'pipe_dump'.
263 type PipeDump struct{}
265 func (m *PipeDump) Reset() { *m = PipeDump{} }
266 func (*PipeDump) GetMessageName() string { return "pipe_dump" }
267 func (*PipeDump) GetCrcString() string { return "51077d14" }
268 func (*PipeDump) GetMessageType() api.MessageType {
269 return api.RequestMessage
272 func (m *PipeDump) Size() int {
279 func (m *PipeDump) Marshal(b []byte) ([]byte, error) {
280 var buf *codec.Buffer
282 buf = codec.NewBuffer(make([]byte, m.Size()))
284 buf = codec.NewBuffer(b)
286 return buf.Bytes(), nil
288 func (m *PipeDump) Unmarshal(b []byte) error {
292 func init() { file_pipe_binapi_init() }
293 func file_pipe_binapi_init() {
294 api.RegisterMessage((*PipeCreate)(nil), "pipe_create_bb263bd3")
295 api.RegisterMessage((*PipeCreateReply)(nil), "pipe_create_reply_d4c2c2b3")
296 api.RegisterMessage((*PipeDelete)(nil), "pipe_delete_f9e6675e")
297 api.RegisterMessage((*PipeDeleteReply)(nil), "pipe_delete_reply_e8d4e804")
298 api.RegisterMessage((*PipeDetails)(nil), "pipe_details_43ac107a")
299 api.RegisterMessage((*PipeDump)(nil), "pipe_dump_51077d14")
302 // Messages returns list of all messages in this module.
303 func AllMessages() []api.Message {
304 return []api.Message{
306 (*PipeCreateReply)(nil),
308 (*PipeDeleteReply)(nil),