1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package pipe contains generated bindings for API file pipe.api.
14 api "git.fd.io/govpp.git/api"
15 interface_types "git.fd.io/govpp.git/binapi/interface_types"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
28 VersionCrc = 0xd22736c9
31 // PipeCreate defines message 'pipe_create'.
32 type PipeCreate struct {
33 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
34 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
37 func (m *PipeCreate) Reset() { *m = PipeCreate{} }
38 func (*PipeCreate) GetMessageName() string { return "pipe_create" }
39 func (*PipeCreate) GetCrcString() string { return "bb263bd3" }
40 func (*PipeCreate) GetMessageType() api.MessageType {
41 return api.RequestMessage
44 func (m *PipeCreate) Size() (size int) {
48 size += 1 // m.IsSpecified
49 size += 4 // m.UserInstance
52 func (m *PipeCreate) Marshal(b []byte) ([]byte, error) {
54 b = make([]byte, m.Size())
56 buf := codec.NewBuffer(b)
57 buf.EncodeBool(m.IsSpecified)
58 buf.EncodeUint32(m.UserInstance)
59 return buf.Bytes(), nil
61 func (m *PipeCreate) Unmarshal(b []byte) error {
62 buf := codec.NewBuffer(b)
63 m.IsSpecified = buf.DecodeBool()
64 m.UserInstance = buf.DecodeUint32()
68 // PipeCreateReply defines message 'pipe_create_reply'.
69 type PipeCreateReply struct {
70 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
71 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
72 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
75 func (m *PipeCreateReply) Reset() { *m = PipeCreateReply{} }
76 func (*PipeCreateReply) GetMessageName() string { return "pipe_create_reply" }
77 func (*PipeCreateReply) GetCrcString() string { return "d4c2c2b3" }
78 func (*PipeCreateReply) GetMessageType() api.MessageType {
79 return api.ReplyMessage
82 func (m *PipeCreateReply) Size() (size int) {
87 size += 4 // m.SwIfIndex
88 for j1 := 0; j1 < 2; j1++ {
89 size += 4 // m.PipeSwIfIndex[j1]
93 func (m *PipeCreateReply) Marshal(b []byte) ([]byte, error) {
95 b = make([]byte, m.Size())
97 buf := codec.NewBuffer(b)
98 buf.EncodeInt32(m.Retval)
99 buf.EncodeUint32(uint32(m.SwIfIndex))
100 for j0 := 0; j0 < 2; j0++ {
101 buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
103 return buf.Bytes(), nil
105 func (m *PipeCreateReply) Unmarshal(b []byte) error {
106 buf := codec.NewBuffer(b)
107 m.Retval = buf.DecodeInt32()
108 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
109 for j0 := 0; j0 < 2; j0++ {
110 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
115 // PipeDelete defines message 'pipe_delete'.
116 type PipeDelete struct {
117 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
120 func (m *PipeDelete) Reset() { *m = PipeDelete{} }
121 func (*PipeDelete) GetMessageName() string { return "pipe_delete" }
122 func (*PipeDelete) GetCrcString() string { return "f9e6675e" }
123 func (*PipeDelete) GetMessageType() api.MessageType {
124 return api.RequestMessage
127 func (m *PipeDelete) Size() (size int) {
131 size += 4 // m.SwIfIndex
134 func (m *PipeDelete) Marshal(b []byte) ([]byte, error) {
136 b = make([]byte, m.Size())
138 buf := codec.NewBuffer(b)
139 buf.EncodeUint32(uint32(m.SwIfIndex))
140 return buf.Bytes(), nil
142 func (m *PipeDelete) Unmarshal(b []byte) error {
143 buf := codec.NewBuffer(b)
144 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
148 // PipeDeleteReply defines message 'pipe_delete_reply'.
149 type PipeDeleteReply struct {
150 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
153 func (m *PipeDeleteReply) Reset() { *m = PipeDeleteReply{} }
154 func (*PipeDeleteReply) GetMessageName() string { return "pipe_delete_reply" }
155 func (*PipeDeleteReply) GetCrcString() string { return "e8d4e804" }
156 func (*PipeDeleteReply) GetMessageType() api.MessageType {
157 return api.ReplyMessage
160 func (m *PipeDeleteReply) Size() (size int) {
164 size += 4 // m.Retval
167 func (m *PipeDeleteReply) Marshal(b []byte) ([]byte, error) {
169 b = make([]byte, m.Size())
171 buf := codec.NewBuffer(b)
172 buf.EncodeInt32(m.Retval)
173 return buf.Bytes(), nil
175 func (m *PipeDeleteReply) Unmarshal(b []byte) error {
176 buf := codec.NewBuffer(b)
177 m.Retval = buf.DecodeInt32()
181 // PipeDetails defines message 'pipe_details'.
182 type PipeDetails struct {
183 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
184 PipeSwIfIndex [2]interface_types.InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
185 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
188 func (m *PipeDetails) Reset() { *m = PipeDetails{} }
189 func (*PipeDetails) GetMessageName() string { return "pipe_details" }
190 func (*PipeDetails) GetCrcString() string { return "43ac107a" }
191 func (*PipeDetails) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 func (m *PipeDetails) Size() (size int) {
199 size += 4 // m.SwIfIndex
200 for j1 := 0; j1 < 2; j1++ {
201 size += 4 // m.PipeSwIfIndex[j1]
203 size += 4 // m.Instance
206 func (m *PipeDetails) Marshal(b []byte) ([]byte, error) {
208 b = make([]byte, m.Size())
210 buf := codec.NewBuffer(b)
211 buf.EncodeUint32(uint32(m.SwIfIndex))
212 for j0 := 0; j0 < 2; j0++ {
213 buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
215 buf.EncodeUint32(m.Instance)
216 return buf.Bytes(), nil
218 func (m *PipeDetails) Unmarshal(b []byte) error {
219 buf := codec.NewBuffer(b)
220 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
221 for j0 := 0; j0 < 2; j0++ {
222 m.PipeSwIfIndex[j0] = interface_types.InterfaceIndex(buf.DecodeUint32())
224 m.Instance = buf.DecodeUint32()
228 // PipeDump defines message 'pipe_dump'.
229 type PipeDump struct{}
231 func (m *PipeDump) Reset() { *m = PipeDump{} }
232 func (*PipeDump) GetMessageName() string { return "pipe_dump" }
233 func (*PipeDump) GetCrcString() string { return "51077d14" }
234 func (*PipeDump) GetMessageType() api.MessageType {
235 return api.RequestMessage
238 func (m *PipeDump) Size() (size int) {
244 func (m *PipeDump) Marshal(b []byte) ([]byte, error) {
246 b = make([]byte, m.Size())
248 buf := codec.NewBuffer(b)
249 return buf.Bytes(), nil
251 func (m *PipeDump) Unmarshal(b []byte) error {
255 func init() { file_pipe_binapi_init() }
256 func file_pipe_binapi_init() {
257 api.RegisterMessage((*PipeCreate)(nil), "pipe_create_bb263bd3")
258 api.RegisterMessage((*PipeCreateReply)(nil), "pipe_create_reply_d4c2c2b3")
259 api.RegisterMessage((*PipeDelete)(nil), "pipe_delete_f9e6675e")
260 api.RegisterMessage((*PipeDeleteReply)(nil), "pipe_delete_reply_e8d4e804")
261 api.RegisterMessage((*PipeDetails)(nil), "pipe_details_43ac107a")
262 api.RegisterMessage((*PipeDump)(nil), "pipe_dump_51077d14")
265 // Messages returns list of all messages in this module.
266 func AllMessages() []api.Message {
267 return []api.Message{
269 (*PipeCreateReply)(nil),
271 (*PipeDeleteReply)(nil),