1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/span.api.json
7 // Package span contains generated bindings for API file span.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 = 0x10769b5
31 // SwInterfaceSpanDetails defines message 'sw_interface_span_details'.
32 type SwInterfaceSpanDetails struct {
33 SwIfIndexFrom uint32 `binapi:"u32,name=sw_if_index_from" json:"sw_if_index_from,omitempty"`
34 SwIfIndexTo uint32 `binapi:"u32,name=sw_if_index_to" json:"sw_if_index_to,omitempty"`
35 State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
36 IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
39 func (m *SwInterfaceSpanDetails) Reset() { *m = SwInterfaceSpanDetails{} }
40 func (*SwInterfaceSpanDetails) GetMessageName() string { return "sw_interface_span_details" }
41 func (*SwInterfaceSpanDetails) GetCrcString() string { return "23966371" }
42 func (*SwInterfaceSpanDetails) GetMessageType() api.MessageType {
43 return api.ReplyMessage
46 func (m *SwInterfaceSpanDetails) Size() (size int) {
50 size += 4 // m.SwIfIndexFrom
51 size += 4 // m.SwIfIndexTo
56 func (m *SwInterfaceSpanDetails) Marshal(b []byte) ([]byte, error) {
58 b = make([]byte, m.Size())
60 buf := codec.NewBuffer(b)
61 buf.EncodeUint32(m.SwIfIndexFrom)
62 buf.EncodeUint32(m.SwIfIndexTo)
63 buf.EncodeUint8(m.State)
64 buf.EncodeUint8(m.IsL2)
65 return buf.Bytes(), nil
67 func (m *SwInterfaceSpanDetails) Unmarshal(b []byte) error {
68 buf := codec.NewBuffer(b)
69 m.SwIfIndexFrom = buf.DecodeUint32()
70 m.SwIfIndexTo = buf.DecodeUint32()
71 m.State = buf.DecodeUint8()
72 m.IsL2 = buf.DecodeUint8()
76 // SwInterfaceSpanDump defines message 'sw_interface_span_dump'.
77 type SwInterfaceSpanDump struct {
78 IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
81 func (m *SwInterfaceSpanDump) Reset() { *m = SwInterfaceSpanDump{} }
82 func (*SwInterfaceSpanDump) GetMessageName() string { return "sw_interface_span_dump" }
83 func (*SwInterfaceSpanDump) GetCrcString() string { return "67c54650" }
84 func (*SwInterfaceSpanDump) GetMessageType() api.MessageType {
85 return api.RequestMessage
88 func (m *SwInterfaceSpanDump) Size() (size int) {
95 func (m *SwInterfaceSpanDump) Marshal(b []byte) ([]byte, error) {
97 b = make([]byte, m.Size())
99 buf := codec.NewBuffer(b)
100 buf.EncodeUint8(m.IsL2)
101 return buf.Bytes(), nil
103 func (m *SwInterfaceSpanDump) Unmarshal(b []byte) error {
104 buf := codec.NewBuffer(b)
105 m.IsL2 = buf.DecodeUint8()
109 // SwInterfaceSpanEnableDisable defines message 'sw_interface_span_enable_disable'.
110 type SwInterfaceSpanEnableDisable struct {
111 SwIfIndexFrom uint32 `binapi:"u32,name=sw_if_index_from" json:"sw_if_index_from,omitempty"`
112 SwIfIndexTo uint32 `binapi:"u32,name=sw_if_index_to" json:"sw_if_index_to,omitempty"`
113 State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
114 IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
117 func (m *SwInterfaceSpanEnableDisable) Reset() { *m = SwInterfaceSpanEnableDisable{} }
118 func (*SwInterfaceSpanEnableDisable) GetMessageName() string {
119 return "sw_interface_span_enable_disable"
121 func (*SwInterfaceSpanEnableDisable) GetCrcString() string { return "7216258d" }
122 func (*SwInterfaceSpanEnableDisable) GetMessageType() api.MessageType {
123 return api.RequestMessage
126 func (m *SwInterfaceSpanEnableDisable) Size() (size int) {
130 size += 4 // m.SwIfIndexFrom
131 size += 4 // m.SwIfIndexTo
136 func (m *SwInterfaceSpanEnableDisable) Marshal(b []byte) ([]byte, error) {
138 b = make([]byte, m.Size())
140 buf := codec.NewBuffer(b)
141 buf.EncodeUint32(m.SwIfIndexFrom)
142 buf.EncodeUint32(m.SwIfIndexTo)
143 buf.EncodeUint8(m.State)
144 buf.EncodeUint8(m.IsL2)
145 return buf.Bytes(), nil
147 func (m *SwInterfaceSpanEnableDisable) Unmarshal(b []byte) error {
148 buf := codec.NewBuffer(b)
149 m.SwIfIndexFrom = buf.DecodeUint32()
150 m.SwIfIndexTo = buf.DecodeUint32()
151 m.State = buf.DecodeUint8()
152 m.IsL2 = buf.DecodeUint8()
156 // SwInterfaceSpanEnableDisableReply defines message 'sw_interface_span_enable_disable_reply'.
157 type SwInterfaceSpanEnableDisableReply struct {
158 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
161 func (m *SwInterfaceSpanEnableDisableReply) Reset() { *m = SwInterfaceSpanEnableDisableReply{} }
162 func (*SwInterfaceSpanEnableDisableReply) GetMessageName() string {
163 return "sw_interface_span_enable_disable_reply"
165 func (*SwInterfaceSpanEnableDisableReply) GetCrcString() string { return "e8d4e804" }
166 func (*SwInterfaceSpanEnableDisableReply) GetMessageType() api.MessageType {
167 return api.ReplyMessage
170 func (m *SwInterfaceSpanEnableDisableReply) Size() (size int) {
174 size += 4 // m.Retval
177 func (m *SwInterfaceSpanEnableDisableReply) Marshal(b []byte) ([]byte, error) {
179 b = make([]byte, m.Size())
181 buf := codec.NewBuffer(b)
182 buf.EncodeInt32(m.Retval)
183 return buf.Bytes(), nil
185 func (m *SwInterfaceSpanEnableDisableReply) Unmarshal(b []byte) error {
186 buf := codec.NewBuffer(b)
187 m.Retval = buf.DecodeInt32()
191 func init() { file_span_binapi_init() }
192 func file_span_binapi_init() {
193 api.RegisterMessage((*SwInterfaceSpanDetails)(nil), "sw_interface_span_details_23966371")
194 api.RegisterMessage((*SwInterfaceSpanDump)(nil), "sw_interface_span_dump_67c54650")
195 api.RegisterMessage((*SwInterfaceSpanEnableDisable)(nil), "sw_interface_span_enable_disable_7216258d")
196 api.RegisterMessage((*SwInterfaceSpanEnableDisableReply)(nil), "sw_interface_span_enable_disable_reply_e8d4e804")
199 // Messages returns list of all messages in this module.
200 func AllMessages() []api.Message {
201 return []api.Message{
202 (*SwInterfaceSpanDetails)(nil),
203 (*SwInterfaceSpanDump)(nil),
204 (*SwInterfaceSpanEnableDisable)(nil),
205 (*SwInterfaceSpanEnableDisableReply)(nil),