1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/plugins/sctp.api.json
7 // Package sctp contains generated bindings for API file sctp.api.
15 api "git.fd.io/govpp.git/api"
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 = 0x35f411c4
31 // SctpAddSrcDstConnection defines message 'sctp_add_src_dst_connection'.
32 type SctpAddSrcDstConnection struct {
33 IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
34 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
35 SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
36 DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
39 func (m *SctpAddSrcDstConnection) Reset() { *m = SctpAddSrcDstConnection{} }
40 func (*SctpAddSrcDstConnection) GetMessageName() string { return "sctp_add_src_dst_connection" }
41 func (*SctpAddSrcDstConnection) GetCrcString() string { return "45c59b2f" }
42 func (*SctpAddSrcDstConnection) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *SctpAddSrcDstConnection) Size() (size int) {
52 size += 1 * 16 // m.SrcAddress
53 size += 1 * 16 // m.DstAddress
56 func (m *SctpAddSrcDstConnection) Marshal(b []byte) ([]byte, error) {
58 b = make([]byte, m.Size())
60 buf := codec.NewBuffer(b)
61 buf.EncodeUint8(m.IsIPv6)
62 buf.EncodeUint32(m.VrfID)
63 buf.EncodeBytes(m.SrcAddress, 16)
64 buf.EncodeBytes(m.DstAddress, 16)
65 return buf.Bytes(), nil
67 func (m *SctpAddSrcDstConnection) Unmarshal(b []byte) error {
68 buf := codec.NewBuffer(b)
69 m.IsIPv6 = buf.DecodeUint8()
70 m.VrfID = buf.DecodeUint32()
71 m.SrcAddress = make([]byte, 16)
72 copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
73 m.DstAddress = make([]byte, 16)
74 copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
78 // SctpAddSrcDstConnectionReply defines message 'sctp_add_src_dst_connection_reply'.
79 type SctpAddSrcDstConnectionReply struct {
80 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
83 func (m *SctpAddSrcDstConnectionReply) Reset() { *m = SctpAddSrcDstConnectionReply{} }
84 func (*SctpAddSrcDstConnectionReply) GetMessageName() string {
85 return "sctp_add_src_dst_connection_reply"
87 func (*SctpAddSrcDstConnectionReply) GetCrcString() string { return "e8d4e804" }
88 func (*SctpAddSrcDstConnectionReply) GetMessageType() api.MessageType {
89 return api.ReplyMessage
92 func (m *SctpAddSrcDstConnectionReply) Size() (size int) {
99 func (m *SctpAddSrcDstConnectionReply) Marshal(b []byte) ([]byte, error) {
101 b = make([]byte, m.Size())
103 buf := codec.NewBuffer(b)
104 buf.EncodeInt32(m.Retval)
105 return buf.Bytes(), nil
107 func (m *SctpAddSrcDstConnectionReply) Unmarshal(b []byte) error {
108 buf := codec.NewBuffer(b)
109 m.Retval = buf.DecodeInt32()
113 // SctpConfig defines message 'sctp_config'.
114 type SctpConfig struct {
115 NeverDelaySack uint8 `binapi:"u8,name=never_delay_sack" json:"never_delay_sack,omitempty"`
116 NeverBundle uint8 `binapi:"u8,name=never_bundle" json:"never_bundle,omitempty"`
119 func (m *SctpConfig) Reset() { *m = SctpConfig{} }
120 func (*SctpConfig) GetMessageName() string { return "sctp_config" }
121 func (*SctpConfig) GetCrcString() string { return "7617eced" }
122 func (*SctpConfig) GetMessageType() api.MessageType {
123 return api.RequestMessage
126 func (m *SctpConfig) Size() (size int) {
130 size += 1 // m.NeverDelaySack
131 size += 1 // m.NeverBundle
134 func (m *SctpConfig) Marshal(b []byte) ([]byte, error) {
136 b = make([]byte, m.Size())
138 buf := codec.NewBuffer(b)
139 buf.EncodeUint8(m.NeverDelaySack)
140 buf.EncodeUint8(m.NeverBundle)
141 return buf.Bytes(), nil
143 func (m *SctpConfig) Unmarshal(b []byte) error {
144 buf := codec.NewBuffer(b)
145 m.NeverDelaySack = buf.DecodeUint8()
146 m.NeverBundle = buf.DecodeUint8()
150 // SctpConfigReply defines message 'sctp_config_reply'.
151 type SctpConfigReply struct {
152 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
155 func (m *SctpConfigReply) Reset() { *m = SctpConfigReply{} }
156 func (*SctpConfigReply) GetMessageName() string { return "sctp_config_reply" }
157 func (*SctpConfigReply) GetCrcString() string { return "e8d4e804" }
158 func (*SctpConfigReply) GetMessageType() api.MessageType {
159 return api.ReplyMessage
162 func (m *SctpConfigReply) Size() (size int) {
166 size += 4 // m.Retval
169 func (m *SctpConfigReply) Marshal(b []byte) ([]byte, error) {
171 b = make([]byte, m.Size())
173 buf := codec.NewBuffer(b)
174 buf.EncodeInt32(m.Retval)
175 return buf.Bytes(), nil
177 func (m *SctpConfigReply) Unmarshal(b []byte) error {
178 buf := codec.NewBuffer(b)
179 m.Retval = buf.DecodeInt32()
183 // SctpDelSrcDstConnection defines message 'sctp_del_src_dst_connection'.
184 type SctpDelSrcDstConnection struct {
185 IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
186 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
187 SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
188 DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
191 func (m *SctpDelSrcDstConnection) Reset() { *m = SctpDelSrcDstConnection{} }
192 func (*SctpDelSrcDstConnection) GetMessageName() string { return "sctp_del_src_dst_connection" }
193 func (*SctpDelSrcDstConnection) GetCrcString() string { return "45c59b2f" }
194 func (*SctpDelSrcDstConnection) GetMessageType() api.MessageType {
195 return api.RequestMessage
198 func (m *SctpDelSrcDstConnection) Size() (size int) {
202 size += 1 // m.IsIPv6
204 size += 1 * 16 // m.SrcAddress
205 size += 1 * 16 // m.DstAddress
208 func (m *SctpDelSrcDstConnection) Marshal(b []byte) ([]byte, error) {
210 b = make([]byte, m.Size())
212 buf := codec.NewBuffer(b)
213 buf.EncodeUint8(m.IsIPv6)
214 buf.EncodeUint32(m.VrfID)
215 buf.EncodeBytes(m.SrcAddress, 16)
216 buf.EncodeBytes(m.DstAddress, 16)
217 return buf.Bytes(), nil
219 func (m *SctpDelSrcDstConnection) Unmarshal(b []byte) error {
220 buf := codec.NewBuffer(b)
221 m.IsIPv6 = buf.DecodeUint8()
222 m.VrfID = buf.DecodeUint32()
223 m.SrcAddress = make([]byte, 16)
224 copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
225 m.DstAddress = make([]byte, 16)
226 copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
230 // SctpDelSrcDstConnectionReply defines message 'sctp_del_src_dst_connection_reply'.
231 type SctpDelSrcDstConnectionReply struct {
232 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
235 func (m *SctpDelSrcDstConnectionReply) Reset() { *m = SctpDelSrcDstConnectionReply{} }
236 func (*SctpDelSrcDstConnectionReply) GetMessageName() string {
237 return "sctp_del_src_dst_connection_reply"
239 func (*SctpDelSrcDstConnectionReply) GetCrcString() string { return "e8d4e804" }
240 func (*SctpDelSrcDstConnectionReply) GetMessageType() api.MessageType {
241 return api.ReplyMessage
244 func (m *SctpDelSrcDstConnectionReply) Size() (size int) {
248 size += 4 // m.Retval
251 func (m *SctpDelSrcDstConnectionReply) Marshal(b []byte) ([]byte, error) {
253 b = make([]byte, m.Size())
255 buf := codec.NewBuffer(b)
256 buf.EncodeInt32(m.Retval)
257 return buf.Bytes(), nil
259 func (m *SctpDelSrcDstConnectionReply) Unmarshal(b []byte) error {
260 buf := codec.NewBuffer(b)
261 m.Retval = buf.DecodeInt32()
265 func init() { file_sctp_binapi_init() }
266 func file_sctp_binapi_init() {
267 api.RegisterMessage((*SctpAddSrcDstConnection)(nil), "sctp_add_src_dst_connection_45c59b2f")
268 api.RegisterMessage((*SctpAddSrcDstConnectionReply)(nil), "sctp_add_src_dst_connection_reply_e8d4e804")
269 api.RegisterMessage((*SctpConfig)(nil), "sctp_config_7617eced")
270 api.RegisterMessage((*SctpConfigReply)(nil), "sctp_config_reply_e8d4e804")
271 api.RegisterMessage((*SctpDelSrcDstConnection)(nil), "sctp_del_src_dst_connection_45c59b2f")
272 api.RegisterMessage((*SctpDelSrcDstConnectionReply)(nil), "sctp_del_src_dst_connection_reply_e8d4e804")
275 // Messages returns list of all messages in this module.
276 func AllMessages() []api.Message {
277 return []api.Message{
278 (*SctpAddSrcDstConnection)(nil),
279 (*SctpAddSrcDstConnectionReply)(nil),
281 (*SctpConfigReply)(nil),
282 (*SctpDelSrcDstConnection)(nil),
283 (*SctpDelSrcDstConnectionReply)(nil),