1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package ct6 contains generated bindings for API file ct6.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 = 0xd9691434
31 // Ct6EnableDisable defines message 'ct6_enable_disable'.
32 type Ct6EnableDisable struct {
33 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
34 IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
35 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
38 func (m *Ct6EnableDisable) Reset() { *m = Ct6EnableDisable{} }
39 func (*Ct6EnableDisable) GetMessageName() string { return "ct6_enable_disable" }
40 func (*Ct6EnableDisable) GetCrcString() string { return "5d02ac02" }
41 func (*Ct6EnableDisable) GetMessageType() api.MessageType {
42 return api.RequestMessage
45 func (m *Ct6EnableDisable) Size() (size int) {
49 size += 1 // m.EnableDisable
50 size += 1 // m.IsInside
51 size += 4 // m.SwIfIndex
54 func (m *Ct6EnableDisable) Marshal(b []byte) ([]byte, error) {
56 b = make([]byte, m.Size())
58 buf := codec.NewBuffer(b)
59 buf.EncodeBool(m.EnableDisable)
60 buf.EncodeBool(m.IsInside)
61 buf.EncodeUint32(uint32(m.SwIfIndex))
62 return buf.Bytes(), nil
64 func (m *Ct6EnableDisable) Unmarshal(b []byte) error {
65 buf := codec.NewBuffer(b)
66 m.EnableDisable = buf.DecodeBool()
67 m.IsInside = buf.DecodeBool()
68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
72 // Ct6EnableDisableReply defines message 'ct6_enable_disable_reply'.
73 type Ct6EnableDisableReply struct {
74 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
77 func (m *Ct6EnableDisableReply) Reset() { *m = Ct6EnableDisableReply{} }
78 func (*Ct6EnableDisableReply) GetMessageName() string { return "ct6_enable_disable_reply" }
79 func (*Ct6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
80 func (*Ct6EnableDisableReply) GetMessageType() api.MessageType {
81 return api.ReplyMessage
84 func (m *Ct6EnableDisableReply) Size() (size int) {
91 func (m *Ct6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
93 b = make([]byte, m.Size())
95 buf := codec.NewBuffer(b)
96 buf.EncodeInt32(m.Retval)
97 return buf.Bytes(), nil
99 func (m *Ct6EnableDisableReply) Unmarshal(b []byte) error {
100 buf := codec.NewBuffer(b)
101 m.Retval = buf.DecodeInt32()
105 func init() { file_ct6_binapi_init() }
106 func file_ct6_binapi_init() {
107 api.RegisterMessage((*Ct6EnableDisable)(nil), "ct6_enable_disable_5d02ac02")
108 api.RegisterMessage((*Ct6EnableDisableReply)(nil), "ct6_enable_disable_reply_e8d4e804")
111 // Messages returns list of all messages in this module.
112 func AllMessages() []api.Message {
113 return []api.Message{
114 (*Ct6EnableDisable)(nil),
115 (*Ct6EnableDisableReply)(nil),