1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package svs contains generated bindings for API file svs.api.
14 api "git.fd.io/govpp.git/api"
15 interface_types "git.fd.io/govpp.git/binapi/interface_types"
16 ip_types "git.fd.io/govpp.git/binapi/ip_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 = 0x1644b2d6
32 // SvsDetails defines message 'svs_details'.
33 type SvsDetails struct {
34 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
35 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
36 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
39 func (m *SvsDetails) Reset() { *m = SvsDetails{} }
40 func (*SvsDetails) GetMessageName() string { return "svs_details" }
41 func (*SvsDetails) GetCrcString() string { return "b8523d64" }
42 func (*SvsDetails) GetMessageType() api.MessageType {
43 return api.ReplyMessage
46 func (m *SvsDetails) Size() (size int) {
50 size += 4 // m.TableID
51 size += 4 // m.SwIfIndex
55 func (m *SvsDetails) Marshal(b []byte) ([]byte, error) {
57 b = make([]byte, m.Size())
59 buf := codec.NewBuffer(b)
60 buf.EncodeUint32(m.TableID)
61 buf.EncodeUint32(uint32(m.SwIfIndex))
62 buf.EncodeUint8(uint8(m.Af))
63 return buf.Bytes(), nil
65 func (m *SvsDetails) Unmarshal(b []byte) error {
66 buf := codec.NewBuffer(b)
67 m.TableID = buf.DecodeUint32()
68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
69 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
73 // SvsDump defines message 'svs_dump'.
76 func (m *SvsDump) Reset() { *m = SvsDump{} }
77 func (*SvsDump) GetMessageName() string { return "svs_dump" }
78 func (*SvsDump) GetCrcString() string { return "51077d14" }
79 func (*SvsDump) GetMessageType() api.MessageType {
80 return api.RequestMessage
83 func (m *SvsDump) Size() (size int) {
89 func (m *SvsDump) Marshal(b []byte) ([]byte, error) {
91 b = make([]byte, m.Size())
93 buf := codec.NewBuffer(b)
94 return buf.Bytes(), nil
96 func (m *SvsDump) Unmarshal(b []byte) error {
100 // SvsEnableDisable defines message 'svs_enable_disable'.
101 type SvsEnableDisable struct {
102 IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
103 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
104 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
105 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
108 func (m *SvsEnableDisable) Reset() { *m = SvsEnableDisable{} }
109 func (*SvsEnableDisable) GetMessageName() string { return "svs_enable_disable" }
110 func (*SvsEnableDisable) GetCrcString() string { return "634b89d2" }
111 func (*SvsEnableDisable) GetMessageType() api.MessageType {
112 return api.RequestMessage
115 func (m *SvsEnableDisable) Size() (size int) {
119 size += 1 // m.IsEnable
121 size += 4 // m.TableID
122 size += 4 // m.SwIfIndex
125 func (m *SvsEnableDisable) Marshal(b []byte) ([]byte, error) {
127 b = make([]byte, m.Size())
129 buf := codec.NewBuffer(b)
130 buf.EncodeBool(m.IsEnable)
131 buf.EncodeUint8(uint8(m.Af))
132 buf.EncodeUint32(m.TableID)
133 buf.EncodeUint32(uint32(m.SwIfIndex))
134 return buf.Bytes(), nil
136 func (m *SvsEnableDisable) Unmarshal(b []byte) error {
137 buf := codec.NewBuffer(b)
138 m.IsEnable = buf.DecodeBool()
139 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
140 m.TableID = buf.DecodeUint32()
141 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
145 // SvsEnableDisableReply defines message 'svs_enable_disable_reply'.
146 type SvsEnableDisableReply struct {
147 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
150 func (m *SvsEnableDisableReply) Reset() { *m = SvsEnableDisableReply{} }
151 func (*SvsEnableDisableReply) GetMessageName() string { return "svs_enable_disable_reply" }
152 func (*SvsEnableDisableReply) GetCrcString() string { return "e8d4e804" }
153 func (*SvsEnableDisableReply) GetMessageType() api.MessageType {
154 return api.ReplyMessage
157 func (m *SvsEnableDisableReply) Size() (size int) {
161 size += 4 // m.Retval
164 func (m *SvsEnableDisableReply) Marshal(b []byte) ([]byte, error) {
166 b = make([]byte, m.Size())
168 buf := codec.NewBuffer(b)
169 buf.EncodeInt32(m.Retval)
170 return buf.Bytes(), nil
172 func (m *SvsEnableDisableReply) Unmarshal(b []byte) error {
173 buf := codec.NewBuffer(b)
174 m.Retval = buf.DecodeInt32()
178 // SvsPluginGetVersion defines message 'svs_plugin_get_version'.
179 type SvsPluginGetVersion struct{}
181 func (m *SvsPluginGetVersion) Reset() { *m = SvsPluginGetVersion{} }
182 func (*SvsPluginGetVersion) GetMessageName() string { return "svs_plugin_get_version" }
183 func (*SvsPluginGetVersion) GetCrcString() string { return "51077d14" }
184 func (*SvsPluginGetVersion) GetMessageType() api.MessageType {
185 return api.RequestMessage
188 func (m *SvsPluginGetVersion) Size() (size int) {
194 func (m *SvsPluginGetVersion) Marshal(b []byte) ([]byte, error) {
196 b = make([]byte, m.Size())
198 buf := codec.NewBuffer(b)
199 return buf.Bytes(), nil
201 func (m *SvsPluginGetVersion) Unmarshal(b []byte) error {
205 // SvsPluginGetVersionReply defines message 'svs_plugin_get_version_reply'.
206 type SvsPluginGetVersionReply struct {
207 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
208 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
211 func (m *SvsPluginGetVersionReply) Reset() { *m = SvsPluginGetVersionReply{} }
212 func (*SvsPluginGetVersionReply) GetMessageName() string { return "svs_plugin_get_version_reply" }
213 func (*SvsPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
214 func (*SvsPluginGetVersionReply) GetMessageType() api.MessageType {
215 return api.ReplyMessage
218 func (m *SvsPluginGetVersionReply) Size() (size int) {
226 func (m *SvsPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
228 b = make([]byte, m.Size())
230 buf := codec.NewBuffer(b)
231 buf.EncodeUint32(m.Major)
232 buf.EncodeUint32(m.Minor)
233 return buf.Bytes(), nil
235 func (m *SvsPluginGetVersionReply) Unmarshal(b []byte) error {
236 buf := codec.NewBuffer(b)
237 m.Major = buf.DecodeUint32()
238 m.Minor = buf.DecodeUint32()
242 // SvsRouteAddDel defines message 'svs_route_add_del'.
243 type SvsRouteAddDel struct {
244 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
245 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
246 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
247 SourceTableID uint32 `binapi:"u32,name=source_table_id" json:"source_table_id,omitempty"`
250 func (m *SvsRouteAddDel) Reset() { *m = SvsRouteAddDel{} }
251 func (*SvsRouteAddDel) GetMessageName() string { return "svs_route_add_del" }
252 func (*SvsRouteAddDel) GetCrcString() string { return "d39e31fc" }
253 func (*SvsRouteAddDel) GetMessageType() api.MessageType {
254 return api.RequestMessage
257 func (m *SvsRouteAddDel) Size() (size int) {
262 size += 1 // m.Prefix.Address.Af
263 size += 1 * 16 // m.Prefix.Address.Un
264 size += 1 // m.Prefix.Len
265 size += 4 // m.TableID
266 size += 4 // m.SourceTableID
269 func (m *SvsRouteAddDel) Marshal(b []byte) ([]byte, error) {
271 b = make([]byte, m.Size())
273 buf := codec.NewBuffer(b)
274 buf.EncodeBool(m.IsAdd)
275 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
276 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
277 buf.EncodeUint8(m.Prefix.Len)
278 buf.EncodeUint32(m.TableID)
279 buf.EncodeUint32(m.SourceTableID)
280 return buf.Bytes(), nil
282 func (m *SvsRouteAddDel) Unmarshal(b []byte) error {
283 buf := codec.NewBuffer(b)
284 m.IsAdd = buf.DecodeBool()
285 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
286 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
287 m.Prefix.Len = buf.DecodeUint8()
288 m.TableID = buf.DecodeUint32()
289 m.SourceTableID = buf.DecodeUint32()
293 // SvsRouteAddDelReply defines message 'svs_route_add_del_reply'.
294 type SvsRouteAddDelReply struct {
295 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
298 func (m *SvsRouteAddDelReply) Reset() { *m = SvsRouteAddDelReply{} }
299 func (*SvsRouteAddDelReply) GetMessageName() string { return "svs_route_add_del_reply" }
300 func (*SvsRouteAddDelReply) GetCrcString() string { return "e8d4e804" }
301 func (*SvsRouteAddDelReply) GetMessageType() api.MessageType {
302 return api.ReplyMessage
305 func (m *SvsRouteAddDelReply) Size() (size int) {
309 size += 4 // m.Retval
312 func (m *SvsRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
314 b = make([]byte, m.Size())
316 buf := codec.NewBuffer(b)
317 buf.EncodeInt32(m.Retval)
318 return buf.Bytes(), nil
320 func (m *SvsRouteAddDelReply) Unmarshal(b []byte) error {
321 buf := codec.NewBuffer(b)
322 m.Retval = buf.DecodeInt32()
326 // SvsTableAddDel defines message 'svs_table_add_del'.
327 type SvsTableAddDel struct {
328 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
329 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
330 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
333 func (m *SvsTableAddDel) Reset() { *m = SvsTableAddDel{} }
334 func (*SvsTableAddDel) GetMessageName() string { return "svs_table_add_del" }
335 func (*SvsTableAddDel) GetCrcString() string { return "7d21cb2a" }
336 func (*SvsTableAddDel) GetMessageType() api.MessageType {
337 return api.RequestMessage
340 func (m *SvsTableAddDel) Size() (size int) {
346 size += 4 // m.TableID
349 func (m *SvsTableAddDel) Marshal(b []byte) ([]byte, error) {
351 b = make([]byte, m.Size())
353 buf := codec.NewBuffer(b)
354 buf.EncodeBool(m.IsAdd)
355 buf.EncodeUint8(uint8(m.Af))
356 buf.EncodeUint32(m.TableID)
357 return buf.Bytes(), nil
359 func (m *SvsTableAddDel) Unmarshal(b []byte) error {
360 buf := codec.NewBuffer(b)
361 m.IsAdd = buf.DecodeBool()
362 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
363 m.TableID = buf.DecodeUint32()
367 // SvsTableAddDelReply defines message 'svs_table_add_del_reply'.
368 type SvsTableAddDelReply struct {
369 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
372 func (m *SvsTableAddDelReply) Reset() { *m = SvsTableAddDelReply{} }
373 func (*SvsTableAddDelReply) GetMessageName() string { return "svs_table_add_del_reply" }
374 func (*SvsTableAddDelReply) GetCrcString() string { return "e8d4e804" }
375 func (*SvsTableAddDelReply) GetMessageType() api.MessageType {
376 return api.ReplyMessage
379 func (m *SvsTableAddDelReply) Size() (size int) {
383 size += 4 // m.Retval
386 func (m *SvsTableAddDelReply) Marshal(b []byte) ([]byte, error) {
388 b = make([]byte, m.Size())
390 buf := codec.NewBuffer(b)
391 buf.EncodeInt32(m.Retval)
392 return buf.Bytes(), nil
394 func (m *SvsTableAddDelReply) Unmarshal(b []byte) error {
395 buf := codec.NewBuffer(b)
396 m.Retval = buf.DecodeInt32()
400 func init() { file_svs_binapi_init() }
401 func file_svs_binapi_init() {
402 api.RegisterMessage((*SvsDetails)(nil), "svs_details_b8523d64")
403 api.RegisterMessage((*SvsDump)(nil), "svs_dump_51077d14")
404 api.RegisterMessage((*SvsEnableDisable)(nil), "svs_enable_disable_634b89d2")
405 api.RegisterMessage((*SvsEnableDisableReply)(nil), "svs_enable_disable_reply_e8d4e804")
406 api.RegisterMessage((*SvsPluginGetVersion)(nil), "svs_plugin_get_version_51077d14")
407 api.RegisterMessage((*SvsPluginGetVersionReply)(nil), "svs_plugin_get_version_reply_9b32cf86")
408 api.RegisterMessage((*SvsRouteAddDel)(nil), "svs_route_add_del_d39e31fc")
409 api.RegisterMessage((*SvsRouteAddDelReply)(nil), "svs_route_add_del_reply_e8d4e804")
410 api.RegisterMessage((*SvsTableAddDel)(nil), "svs_table_add_del_7d21cb2a")
411 api.RegisterMessage((*SvsTableAddDelReply)(nil), "svs_table_add_del_reply_e8d4e804")
414 // Messages returns list of all messages in this module.
415 func AllMessages() []api.Message {
416 return []api.Message{
419 (*SvsEnableDisable)(nil),
420 (*SvsEnableDisableReply)(nil),
421 (*SvsPluginGetVersion)(nil),
422 (*SvsPluginGetVersionReply)(nil),
423 (*SvsRouteAddDel)(nil),
424 (*SvsRouteAddDelReply)(nil),
425 (*SvsTableAddDel)(nil),
426 (*SvsTableAddDelReply)(nil),