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/gso.api.json
7 // Package gso contains generated bindings for API file gso.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 = 0x2ec8641f
32 // FeatureGsoEnableDisable defines message 'feature_gso_enable_disable'.
33 type FeatureGsoEnableDisable struct {
34 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
35 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
38 func (m *FeatureGsoEnableDisable) Reset() { *m = FeatureGsoEnableDisable{} }
39 func (*FeatureGsoEnableDisable) GetMessageName() string { return "feature_gso_enable_disable" }
40 func (*FeatureGsoEnableDisable) GetCrcString() string { return "5501adee" }
41 func (*FeatureGsoEnableDisable) GetMessageType() api.MessageType {
42 return api.RequestMessage
45 func (m *FeatureGsoEnableDisable) Size() (size int) {
49 size += 4 // m.SwIfIndex
50 size += 1 // m.EnableDisable
53 func (m *FeatureGsoEnableDisable) Marshal(b []byte) ([]byte, error) {
55 b = make([]byte, m.Size())
57 buf := codec.NewBuffer(b)
58 buf.EncodeUint32(uint32(m.SwIfIndex))
59 buf.EncodeBool(m.EnableDisable)
60 return buf.Bytes(), nil
62 func (m *FeatureGsoEnableDisable) Unmarshal(b []byte) error {
63 buf := codec.NewBuffer(b)
64 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
65 m.EnableDisable = buf.DecodeBool()
69 // FeatureGsoEnableDisableReply defines message 'feature_gso_enable_disable_reply'.
70 type FeatureGsoEnableDisableReply struct {
71 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
74 func (m *FeatureGsoEnableDisableReply) Reset() { *m = FeatureGsoEnableDisableReply{} }
75 func (*FeatureGsoEnableDisableReply) GetMessageName() string {
76 return "feature_gso_enable_disable_reply"
78 func (*FeatureGsoEnableDisableReply) GetCrcString() string { return "e8d4e804" }
79 func (*FeatureGsoEnableDisableReply) GetMessageType() api.MessageType {
80 return api.ReplyMessage
83 func (m *FeatureGsoEnableDisableReply) Size() (size int) {
90 func (m *FeatureGsoEnableDisableReply) Marshal(b []byte) ([]byte, error) {
92 b = make([]byte, m.Size())
94 buf := codec.NewBuffer(b)
95 buf.EncodeInt32(m.Retval)
96 return buf.Bytes(), nil
98 func (m *FeatureGsoEnableDisableReply) Unmarshal(b []byte) error {
99 buf := codec.NewBuffer(b)
100 m.Retval = buf.DecodeInt32()
104 func init() { file_gso_binapi_init() }
105 func file_gso_binapi_init() {
106 api.RegisterMessage((*FeatureGsoEnableDisable)(nil), "feature_gso_enable_disable_5501adee")
107 api.RegisterMessage((*FeatureGsoEnableDisableReply)(nil), "feature_gso_enable_disable_reply_e8d4e804")
110 // Messages returns list of all messages in this module.
111 func AllMessages() []api.Message {
112 return []api.Message{
113 (*FeatureGsoEnableDisable)(nil),
114 (*FeatureGsoEnableDisableReply)(nil),