1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.6.0-dev
5 // source: /usr/share/vpp/api/plugins/nsim.api.json
7 // Package nsim contains generated bindings for API file nsim.api.
15 api "go.fd.io/govpp/api"
16 interface_types "go.fd.io/govpp/binapi/interface_types"
17 codec "go.fd.io/govpp/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 = 0x3b179b8f
32 // NsimConfigure defines message 'nsim_configure'.
33 // Deprecated: the message will be removed in the future versions
34 type NsimConfigure struct {
35 DelayInUsec uint32 `binapi:"u32,name=delay_in_usec" json:"delay_in_usec,omitempty"`
36 AveragePacketSize uint32 `binapi:"u32,name=average_packet_size" json:"average_packet_size,omitempty"`
37 BandwidthInBitsPerSecond uint64 `binapi:"u64,name=bandwidth_in_bits_per_second" json:"bandwidth_in_bits_per_second,omitempty"`
38 PacketsPerDrop uint32 `binapi:"u32,name=packets_per_drop" json:"packets_per_drop,omitempty"`
41 func (m *NsimConfigure) Reset() { *m = NsimConfigure{} }
42 func (*NsimConfigure) GetMessageName() string { return "nsim_configure" }
43 func (*NsimConfigure) GetCrcString() string { return "16ed400f" }
44 func (*NsimConfigure) GetMessageType() api.MessageType {
45 return api.RequestMessage
48 func (m *NsimConfigure) Size() (size int) {
52 size += 4 // m.DelayInUsec
53 size += 4 // m.AveragePacketSize
54 size += 8 // m.BandwidthInBitsPerSecond
55 size += 4 // m.PacketsPerDrop
58 func (m *NsimConfigure) Marshal(b []byte) ([]byte, error) {
60 b = make([]byte, m.Size())
62 buf := codec.NewBuffer(b)
63 buf.EncodeUint32(m.DelayInUsec)
64 buf.EncodeUint32(m.AveragePacketSize)
65 buf.EncodeUint64(m.BandwidthInBitsPerSecond)
66 buf.EncodeUint32(m.PacketsPerDrop)
67 return buf.Bytes(), nil
69 func (m *NsimConfigure) Unmarshal(b []byte) error {
70 buf := codec.NewBuffer(b)
71 m.DelayInUsec = buf.DecodeUint32()
72 m.AveragePacketSize = buf.DecodeUint32()
73 m.BandwidthInBitsPerSecond = buf.DecodeUint64()
74 m.PacketsPerDrop = buf.DecodeUint32()
78 // NsimConfigure2 defines message 'nsim_configure2'.
79 type NsimConfigure2 struct {
80 DelayInUsec uint32 `binapi:"u32,name=delay_in_usec" json:"delay_in_usec,omitempty"`
81 AveragePacketSize uint32 `binapi:"u32,name=average_packet_size" json:"average_packet_size,omitempty"`
82 BandwidthInBitsPerSecond uint64 `binapi:"u64,name=bandwidth_in_bits_per_second" json:"bandwidth_in_bits_per_second,omitempty"`
83 PacketsPerDrop uint32 `binapi:"u32,name=packets_per_drop" json:"packets_per_drop,omitempty"`
84 PacketsPerReorder uint32 `binapi:"u32,name=packets_per_reorder" json:"packets_per_reorder,omitempty"`
87 func (m *NsimConfigure2) Reset() { *m = NsimConfigure2{} }
88 func (*NsimConfigure2) GetMessageName() string { return "nsim_configure2" }
89 func (*NsimConfigure2) GetCrcString() string { return "64de8ed3" }
90 func (*NsimConfigure2) GetMessageType() api.MessageType {
91 return api.RequestMessage
94 func (m *NsimConfigure2) Size() (size int) {
98 size += 4 // m.DelayInUsec
99 size += 4 // m.AveragePacketSize
100 size += 8 // m.BandwidthInBitsPerSecond
101 size += 4 // m.PacketsPerDrop
102 size += 4 // m.PacketsPerReorder
105 func (m *NsimConfigure2) Marshal(b []byte) ([]byte, error) {
107 b = make([]byte, m.Size())
109 buf := codec.NewBuffer(b)
110 buf.EncodeUint32(m.DelayInUsec)
111 buf.EncodeUint32(m.AveragePacketSize)
112 buf.EncodeUint64(m.BandwidthInBitsPerSecond)
113 buf.EncodeUint32(m.PacketsPerDrop)
114 buf.EncodeUint32(m.PacketsPerReorder)
115 return buf.Bytes(), nil
117 func (m *NsimConfigure2) Unmarshal(b []byte) error {
118 buf := codec.NewBuffer(b)
119 m.DelayInUsec = buf.DecodeUint32()
120 m.AveragePacketSize = buf.DecodeUint32()
121 m.BandwidthInBitsPerSecond = buf.DecodeUint64()
122 m.PacketsPerDrop = buf.DecodeUint32()
123 m.PacketsPerReorder = buf.DecodeUint32()
127 // NsimConfigure2Reply defines message 'nsim_configure2_reply'.
128 type NsimConfigure2Reply struct {
129 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
132 func (m *NsimConfigure2Reply) Reset() { *m = NsimConfigure2Reply{} }
133 func (*NsimConfigure2Reply) GetMessageName() string { return "nsim_configure2_reply" }
134 func (*NsimConfigure2Reply) GetCrcString() string { return "e8d4e804" }
135 func (*NsimConfigure2Reply) GetMessageType() api.MessageType {
136 return api.ReplyMessage
139 func (m *NsimConfigure2Reply) Size() (size int) {
143 size += 4 // m.Retval
146 func (m *NsimConfigure2Reply) Marshal(b []byte) ([]byte, error) {
148 b = make([]byte, m.Size())
150 buf := codec.NewBuffer(b)
151 buf.EncodeInt32(m.Retval)
152 return buf.Bytes(), nil
154 func (m *NsimConfigure2Reply) Unmarshal(b []byte) error {
155 buf := codec.NewBuffer(b)
156 m.Retval = buf.DecodeInt32()
160 // NsimConfigureReply defines message 'nsim_configure_reply'.
161 // Deprecated: the message will be removed in the future versions
162 type NsimConfigureReply struct {
163 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
166 func (m *NsimConfigureReply) Reset() { *m = NsimConfigureReply{} }
167 func (*NsimConfigureReply) GetMessageName() string { return "nsim_configure_reply" }
168 func (*NsimConfigureReply) GetCrcString() string { return "e8d4e804" }
169 func (*NsimConfigureReply) GetMessageType() api.MessageType {
170 return api.ReplyMessage
173 func (m *NsimConfigureReply) Size() (size int) {
177 size += 4 // m.Retval
180 func (m *NsimConfigureReply) Marshal(b []byte) ([]byte, error) {
182 b = make([]byte, m.Size())
184 buf := codec.NewBuffer(b)
185 buf.EncodeInt32(m.Retval)
186 return buf.Bytes(), nil
188 func (m *NsimConfigureReply) Unmarshal(b []byte) error {
189 buf := codec.NewBuffer(b)
190 m.Retval = buf.DecodeInt32()
194 // NsimCrossConnectEnableDisable defines message 'nsim_cross_connect_enable_disable'.
195 type NsimCrossConnectEnableDisable struct {
196 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
197 SwIfIndex0 interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index0" json:"sw_if_index0,omitempty"`
198 SwIfIndex1 interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index1" json:"sw_if_index1,omitempty"`
201 func (m *NsimCrossConnectEnableDisable) Reset() { *m = NsimCrossConnectEnableDisable{} }
202 func (*NsimCrossConnectEnableDisable) GetMessageName() string {
203 return "nsim_cross_connect_enable_disable"
205 func (*NsimCrossConnectEnableDisable) GetCrcString() string { return "9c3ead86" }
206 func (*NsimCrossConnectEnableDisable) GetMessageType() api.MessageType {
207 return api.RequestMessage
210 func (m *NsimCrossConnectEnableDisable) Size() (size int) {
214 size += 1 // m.EnableDisable
215 size += 4 // m.SwIfIndex0
216 size += 4 // m.SwIfIndex1
219 func (m *NsimCrossConnectEnableDisable) Marshal(b []byte) ([]byte, error) {
221 b = make([]byte, m.Size())
223 buf := codec.NewBuffer(b)
224 buf.EncodeBool(m.EnableDisable)
225 buf.EncodeUint32(uint32(m.SwIfIndex0))
226 buf.EncodeUint32(uint32(m.SwIfIndex1))
227 return buf.Bytes(), nil
229 func (m *NsimCrossConnectEnableDisable) Unmarshal(b []byte) error {
230 buf := codec.NewBuffer(b)
231 m.EnableDisable = buf.DecodeBool()
232 m.SwIfIndex0 = interface_types.InterfaceIndex(buf.DecodeUint32())
233 m.SwIfIndex1 = interface_types.InterfaceIndex(buf.DecodeUint32())
237 // NsimCrossConnectEnableDisableReply defines message 'nsim_cross_connect_enable_disable_reply'.
238 type NsimCrossConnectEnableDisableReply struct {
239 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
242 func (m *NsimCrossConnectEnableDisableReply) Reset() { *m = NsimCrossConnectEnableDisableReply{} }
243 func (*NsimCrossConnectEnableDisableReply) GetMessageName() string {
244 return "nsim_cross_connect_enable_disable_reply"
246 func (*NsimCrossConnectEnableDisableReply) GetCrcString() string { return "e8d4e804" }
247 func (*NsimCrossConnectEnableDisableReply) GetMessageType() api.MessageType {
248 return api.ReplyMessage
251 func (m *NsimCrossConnectEnableDisableReply) Size() (size int) {
255 size += 4 // m.Retval
258 func (m *NsimCrossConnectEnableDisableReply) Marshal(b []byte) ([]byte, error) {
260 b = make([]byte, m.Size())
262 buf := codec.NewBuffer(b)
263 buf.EncodeInt32(m.Retval)
264 return buf.Bytes(), nil
266 func (m *NsimCrossConnectEnableDisableReply) Unmarshal(b []byte) error {
267 buf := codec.NewBuffer(b)
268 m.Retval = buf.DecodeInt32()
272 // NsimOutputFeatureEnableDisable defines message 'nsim_output_feature_enable_disable'.
273 type NsimOutputFeatureEnableDisable struct {
274 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
275 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
278 func (m *NsimOutputFeatureEnableDisable) Reset() { *m = NsimOutputFeatureEnableDisable{} }
279 func (*NsimOutputFeatureEnableDisable) GetMessageName() string {
280 return "nsim_output_feature_enable_disable"
282 func (*NsimOutputFeatureEnableDisable) GetCrcString() string { return "3865946c" }
283 func (*NsimOutputFeatureEnableDisable) GetMessageType() api.MessageType {
284 return api.RequestMessage
287 func (m *NsimOutputFeatureEnableDisable) Size() (size int) {
291 size += 1 // m.EnableDisable
292 size += 4 // m.SwIfIndex
295 func (m *NsimOutputFeatureEnableDisable) Marshal(b []byte) ([]byte, error) {
297 b = make([]byte, m.Size())
299 buf := codec.NewBuffer(b)
300 buf.EncodeBool(m.EnableDisable)
301 buf.EncodeUint32(uint32(m.SwIfIndex))
302 return buf.Bytes(), nil
304 func (m *NsimOutputFeatureEnableDisable) Unmarshal(b []byte) error {
305 buf := codec.NewBuffer(b)
306 m.EnableDisable = buf.DecodeBool()
307 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
311 // NsimOutputFeatureEnableDisableReply defines message 'nsim_output_feature_enable_disable_reply'.
312 type NsimOutputFeatureEnableDisableReply struct {
313 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
316 func (m *NsimOutputFeatureEnableDisableReply) Reset() { *m = NsimOutputFeatureEnableDisableReply{} }
317 func (*NsimOutputFeatureEnableDisableReply) GetMessageName() string {
318 return "nsim_output_feature_enable_disable_reply"
320 func (*NsimOutputFeatureEnableDisableReply) GetCrcString() string { return "e8d4e804" }
321 func (*NsimOutputFeatureEnableDisableReply) GetMessageType() api.MessageType {
322 return api.ReplyMessage
325 func (m *NsimOutputFeatureEnableDisableReply) Size() (size int) {
329 size += 4 // m.Retval
332 func (m *NsimOutputFeatureEnableDisableReply) Marshal(b []byte) ([]byte, error) {
334 b = make([]byte, m.Size())
336 buf := codec.NewBuffer(b)
337 buf.EncodeInt32(m.Retval)
338 return buf.Bytes(), nil
340 func (m *NsimOutputFeatureEnableDisableReply) Unmarshal(b []byte) error {
341 buf := codec.NewBuffer(b)
342 m.Retval = buf.DecodeInt32()
346 func init() { file_nsim_binapi_init() }
347 func file_nsim_binapi_init() {
348 api.RegisterMessage((*NsimConfigure)(nil), "nsim_configure_16ed400f")
349 api.RegisterMessage((*NsimConfigure2)(nil), "nsim_configure2_64de8ed3")
350 api.RegisterMessage((*NsimConfigure2Reply)(nil), "nsim_configure2_reply_e8d4e804")
351 api.RegisterMessage((*NsimConfigureReply)(nil), "nsim_configure_reply_e8d4e804")
352 api.RegisterMessage((*NsimCrossConnectEnableDisable)(nil), "nsim_cross_connect_enable_disable_9c3ead86")
353 api.RegisterMessage((*NsimCrossConnectEnableDisableReply)(nil), "nsim_cross_connect_enable_disable_reply_e8d4e804")
354 api.RegisterMessage((*NsimOutputFeatureEnableDisable)(nil), "nsim_output_feature_enable_disable_3865946c")
355 api.RegisterMessage((*NsimOutputFeatureEnableDisableReply)(nil), "nsim_output_feature_enable_disable_reply_e8d4e804")
358 // Messages returns list of all messages in this module.
359 func AllMessages() []api.Message {
360 return []api.Message{
361 (*NsimConfigure)(nil),
362 (*NsimConfigure2)(nil),
363 (*NsimConfigure2Reply)(nil),
364 (*NsimConfigureReply)(nil),
365 (*NsimCrossConnectEnableDisable)(nil),
366 (*NsimCrossConnectEnableDisableReply)(nil),
367 (*NsimOutputFeatureEnableDisable)(nil),
368 (*NsimOutputFeatureEnableDisableReply)(nil),