1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/plugins/flowprobe.api.json
7 // Package flowprobe contains generated bindings for API file flowprobe.api.
17 api "git.fd.io/govpp.git/api"
18 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0xbb4dfc0d
34 // FlowprobeRecordFlags defines enum 'flowprobe_record_flags'.
35 type FlowprobeRecordFlags uint8
38 FLOWPROBE_RECORD_FLAG_L2 FlowprobeRecordFlags = 1
39 FLOWPROBE_RECORD_FLAG_L3 FlowprobeRecordFlags = 2
40 FLOWPROBE_RECORD_FLAG_L4 FlowprobeRecordFlags = 4
44 FlowprobeRecordFlags_name = map[uint8]string{
45 1: "FLOWPROBE_RECORD_FLAG_L2",
46 2: "FLOWPROBE_RECORD_FLAG_L3",
47 4: "FLOWPROBE_RECORD_FLAG_L4",
49 FlowprobeRecordFlags_value = map[string]uint8{
50 "FLOWPROBE_RECORD_FLAG_L2": 1,
51 "FLOWPROBE_RECORD_FLAG_L3": 2,
52 "FLOWPROBE_RECORD_FLAG_L4": 4,
56 func (x FlowprobeRecordFlags) String() string {
57 s, ok := FlowprobeRecordFlags_name[uint8(x)]
61 str := func(n uint8) string {
62 s, ok := FlowprobeRecordFlags_name[uint8(n)]
66 return "FlowprobeRecordFlags(" + strconv.Itoa(int(n)) + ")"
68 for i := uint8(0); i <= 8; i++ {
83 // FlowprobeWhichFlags defines enum 'flowprobe_which_flags'.
84 type FlowprobeWhichFlags uint8
87 FLOWPROBE_WHICH_FLAG_IP4 FlowprobeWhichFlags = 1
88 FLOWPROBE_WHICH_FLAG_L2 FlowprobeWhichFlags = 2
89 FLOWPROBE_WHICH_FLAG_IP6 FlowprobeWhichFlags = 4
93 FlowprobeWhichFlags_name = map[uint8]string{
94 1: "FLOWPROBE_WHICH_FLAG_IP4",
95 2: "FLOWPROBE_WHICH_FLAG_L2",
96 4: "FLOWPROBE_WHICH_FLAG_IP6",
98 FlowprobeWhichFlags_value = map[string]uint8{
99 "FLOWPROBE_WHICH_FLAG_IP4": 1,
100 "FLOWPROBE_WHICH_FLAG_L2": 2,
101 "FLOWPROBE_WHICH_FLAG_IP6": 4,
105 func (x FlowprobeWhichFlags) String() string {
106 s, ok := FlowprobeWhichFlags_name[uint8(x)]
110 str := func(n uint8) string {
111 s, ok := FlowprobeWhichFlags_name[uint8(n)]
115 return "FlowprobeWhichFlags(" + strconv.Itoa(int(n)) + ")"
117 for i := uint8(0); i <= 8; i++ {
132 // IfStatusFlags defines enum 'if_status_flags'.
133 type IfStatusFlags uint32
136 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
137 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
141 IfStatusFlags_name = map[uint32]string{
142 1: "IF_STATUS_API_FLAG_ADMIN_UP",
143 2: "IF_STATUS_API_FLAG_LINK_UP",
145 IfStatusFlags_value = map[string]uint32{
146 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
147 "IF_STATUS_API_FLAG_LINK_UP": 2,
151 func (x IfStatusFlags) String() string {
152 s, ok := IfStatusFlags_name[uint32(x)]
156 str := func(n uint32) string {
157 s, ok := IfStatusFlags_name[uint32(n)]
161 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
163 for i := uint32(0); i <= 32; i++ {
173 return str(uint32(x))
178 // IfType defines enum 'if_type'.
182 IF_API_TYPE_HARDWARE IfType = 1
183 IF_API_TYPE_SUB IfType = 2
184 IF_API_TYPE_P2P IfType = 3
185 IF_API_TYPE_PIPE IfType = 4
189 IfType_name = map[uint32]string{
190 1: "IF_API_TYPE_HARDWARE",
191 2: "IF_API_TYPE_SUB",
192 3: "IF_API_TYPE_P2P",
193 4: "IF_API_TYPE_PIPE",
195 IfType_value = map[string]uint32{
196 "IF_API_TYPE_HARDWARE": 1,
197 "IF_API_TYPE_SUB": 2,
198 "IF_API_TYPE_P2P": 3,
199 "IF_API_TYPE_PIPE": 4,
203 func (x IfType) String() string {
204 s, ok := IfType_name[uint32(x)]
208 return "IfType(" + strconv.Itoa(int(x)) + ")"
211 // LinkDuplex defines enum 'link_duplex'.
212 type LinkDuplex uint32
215 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
216 LINK_DUPLEX_API_HALF LinkDuplex = 1
217 LINK_DUPLEX_API_FULL LinkDuplex = 2
221 LinkDuplex_name = map[uint32]string{
222 0: "LINK_DUPLEX_API_UNKNOWN",
223 1: "LINK_DUPLEX_API_HALF",
224 2: "LINK_DUPLEX_API_FULL",
226 LinkDuplex_value = map[string]uint32{
227 "LINK_DUPLEX_API_UNKNOWN": 0,
228 "LINK_DUPLEX_API_HALF": 1,
229 "LINK_DUPLEX_API_FULL": 2,
233 func (x LinkDuplex) String() string {
234 s, ok := LinkDuplex_name[uint32(x)]
238 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
241 // MtuProto defines enum 'mtu_proto'.
245 MTU_PROTO_API_L3 MtuProto = 1
246 MTU_PROTO_API_IP4 MtuProto = 2
247 MTU_PROTO_API_IP6 MtuProto = 3
248 MTU_PROTO_API_MPLS MtuProto = 4
249 MTU_PROTO_API_N MtuProto = 5
253 MtuProto_name = map[uint32]string{
254 1: "MTU_PROTO_API_L3",
255 2: "MTU_PROTO_API_IP4",
256 3: "MTU_PROTO_API_IP6",
257 4: "MTU_PROTO_API_MPLS",
258 5: "MTU_PROTO_API_N",
260 MtuProto_value = map[string]uint32{
261 "MTU_PROTO_API_L3": 1,
262 "MTU_PROTO_API_IP4": 2,
263 "MTU_PROTO_API_IP6": 3,
264 "MTU_PROTO_API_MPLS": 4,
265 "MTU_PROTO_API_N": 5,
269 func (x MtuProto) String() string {
270 s, ok := MtuProto_name[uint32(x)]
274 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
277 // RxMode defines enum 'rx_mode'.
281 RX_MODE_API_UNKNOWN RxMode = 0
282 RX_MODE_API_POLLING RxMode = 1
283 RX_MODE_API_INTERRUPT RxMode = 2
284 RX_MODE_API_ADAPTIVE RxMode = 3
285 RX_MODE_API_DEFAULT RxMode = 4
289 RxMode_name = map[uint32]string{
290 0: "RX_MODE_API_UNKNOWN",
291 1: "RX_MODE_API_POLLING",
292 2: "RX_MODE_API_INTERRUPT",
293 3: "RX_MODE_API_ADAPTIVE",
294 4: "RX_MODE_API_DEFAULT",
296 RxMode_value = map[string]uint32{
297 "RX_MODE_API_UNKNOWN": 0,
298 "RX_MODE_API_POLLING": 1,
299 "RX_MODE_API_INTERRUPT": 2,
300 "RX_MODE_API_ADAPTIVE": 3,
301 "RX_MODE_API_DEFAULT": 4,
305 func (x RxMode) String() string {
306 s, ok := RxMode_name[uint32(x)]
310 return "RxMode(" + strconv.Itoa(int(x)) + ")"
313 // SubIfFlags defines enum 'sub_if_flags'.
314 type SubIfFlags uint32
317 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
318 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
319 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
320 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
321 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
322 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
323 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
324 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
325 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
326 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
330 SubIfFlags_name = map[uint32]string{
331 1: "SUB_IF_API_FLAG_NO_TAGS",
332 2: "SUB_IF_API_FLAG_ONE_TAG",
333 4: "SUB_IF_API_FLAG_TWO_TAGS",
334 8: "SUB_IF_API_FLAG_DOT1AD",
335 16: "SUB_IF_API_FLAG_EXACT_MATCH",
336 32: "SUB_IF_API_FLAG_DEFAULT",
337 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
338 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
339 254: "SUB_IF_API_FLAG_MASK_VNET",
340 256: "SUB_IF_API_FLAG_DOT1AH",
342 SubIfFlags_value = map[string]uint32{
343 "SUB_IF_API_FLAG_NO_TAGS": 1,
344 "SUB_IF_API_FLAG_ONE_TAG": 2,
345 "SUB_IF_API_FLAG_TWO_TAGS": 4,
346 "SUB_IF_API_FLAG_DOT1AD": 8,
347 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
348 "SUB_IF_API_FLAG_DEFAULT": 32,
349 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
350 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
351 "SUB_IF_API_FLAG_MASK_VNET": 254,
352 "SUB_IF_API_FLAG_DOT1AH": 256,
356 func (x SubIfFlags) String() string {
357 s, ok := SubIfFlags_name[uint32(x)]
361 str := func(n uint32) string {
362 s, ok := SubIfFlags_name[uint32(n)]
366 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
368 for i := uint32(0); i <= 32; i++ {
378 return str(uint32(x))
383 // InterfaceIndex defines alias 'interface_index'.
384 type InterfaceIndex uint32
386 // FlowprobeParams defines message 'flowprobe_params'.
387 type FlowprobeParams struct {
388 RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"`
389 ActiveTimer uint32 `binapi:"u32,name=active_timer" json:"active_timer,omitempty"`
390 PassiveTimer uint32 `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"`
393 func (m *FlowprobeParams) Reset() { *m = FlowprobeParams{} }
394 func (*FlowprobeParams) GetMessageName() string { return "flowprobe_params" }
395 func (*FlowprobeParams) GetCrcString() string { return "baa46c09" }
396 func (*FlowprobeParams) GetMessageType() api.MessageType {
397 return api.RequestMessage
400 func (m *FlowprobeParams) Size() (size int) {
404 size += 1 // m.RecordFlags
405 size += 4 // m.ActiveTimer
406 size += 4 // m.PassiveTimer
409 func (m *FlowprobeParams) Marshal(b []byte) ([]byte, error) {
411 b = make([]byte, m.Size())
413 buf := codec.NewBuffer(b)
414 buf.EncodeUint8(uint8(m.RecordFlags))
415 buf.EncodeUint32(m.ActiveTimer)
416 buf.EncodeUint32(m.PassiveTimer)
417 return buf.Bytes(), nil
419 func (m *FlowprobeParams) Unmarshal(b []byte) error {
420 buf := codec.NewBuffer(b)
421 m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8())
422 m.ActiveTimer = buf.DecodeUint32()
423 m.PassiveTimer = buf.DecodeUint32()
427 // FlowprobeParamsReply defines message 'flowprobe_params_reply'.
428 type FlowprobeParamsReply struct {
429 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
432 func (m *FlowprobeParamsReply) Reset() { *m = FlowprobeParamsReply{} }
433 func (*FlowprobeParamsReply) GetMessageName() string { return "flowprobe_params_reply" }
434 func (*FlowprobeParamsReply) GetCrcString() string { return "e8d4e804" }
435 func (*FlowprobeParamsReply) GetMessageType() api.MessageType {
436 return api.ReplyMessage
439 func (m *FlowprobeParamsReply) Size() (size int) {
443 size += 4 // m.Retval
446 func (m *FlowprobeParamsReply) Marshal(b []byte) ([]byte, error) {
448 b = make([]byte, m.Size())
450 buf := codec.NewBuffer(b)
451 buf.EncodeInt32(m.Retval)
452 return buf.Bytes(), nil
454 func (m *FlowprobeParamsReply) Unmarshal(b []byte) error {
455 buf := codec.NewBuffer(b)
456 m.Retval = buf.DecodeInt32()
460 // FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'.
461 type FlowprobeTxInterfaceAddDel struct {
462 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
463 Which FlowprobeWhichFlags `binapi:"flowprobe_which_flags,name=which" json:"which,omitempty"`
464 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
467 func (m *FlowprobeTxInterfaceAddDel) Reset() { *m = FlowprobeTxInterfaceAddDel{} }
468 func (*FlowprobeTxInterfaceAddDel) GetMessageName() string { return "flowprobe_tx_interface_add_del" }
469 func (*FlowprobeTxInterfaceAddDel) GetCrcString() string { return "b782c976" }
470 func (*FlowprobeTxInterfaceAddDel) GetMessageType() api.MessageType {
471 return api.RequestMessage
474 func (m *FlowprobeTxInterfaceAddDel) Size() (size int) {
480 size += 4 // m.SwIfIndex
483 func (m *FlowprobeTxInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
485 b = make([]byte, m.Size())
487 buf := codec.NewBuffer(b)
488 buf.EncodeBool(m.IsAdd)
489 buf.EncodeUint8(uint8(m.Which))
490 buf.EncodeUint32(uint32(m.SwIfIndex))
491 return buf.Bytes(), nil
493 func (m *FlowprobeTxInterfaceAddDel) Unmarshal(b []byte) error {
494 buf := codec.NewBuffer(b)
495 m.IsAdd = buf.DecodeBool()
496 m.Which = FlowprobeWhichFlags(buf.DecodeUint8())
497 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
501 // FlowprobeTxInterfaceAddDelReply defines message 'flowprobe_tx_interface_add_del_reply'.
502 type FlowprobeTxInterfaceAddDelReply struct {
503 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
506 func (m *FlowprobeTxInterfaceAddDelReply) Reset() { *m = FlowprobeTxInterfaceAddDelReply{} }
507 func (*FlowprobeTxInterfaceAddDelReply) GetMessageName() string {
508 return "flowprobe_tx_interface_add_del_reply"
510 func (*FlowprobeTxInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
511 func (*FlowprobeTxInterfaceAddDelReply) GetMessageType() api.MessageType {
512 return api.ReplyMessage
515 func (m *FlowprobeTxInterfaceAddDelReply) Size() (size int) {
519 size += 4 // m.Retval
522 func (m *FlowprobeTxInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
524 b = make([]byte, m.Size())
526 buf := codec.NewBuffer(b)
527 buf.EncodeInt32(m.Retval)
528 return buf.Bytes(), nil
530 func (m *FlowprobeTxInterfaceAddDelReply) Unmarshal(b []byte) error {
531 buf := codec.NewBuffer(b)
532 m.Retval = buf.DecodeInt32()
536 func init() { file_flowprobe_binapi_init() }
537 func file_flowprobe_binapi_init() {
538 api.RegisterMessage((*FlowprobeParams)(nil), "flowprobe_params_baa46c09")
539 api.RegisterMessage((*FlowprobeParamsReply)(nil), "flowprobe_params_reply_e8d4e804")
540 api.RegisterMessage((*FlowprobeTxInterfaceAddDel)(nil), "flowprobe_tx_interface_add_del_b782c976")
541 api.RegisterMessage((*FlowprobeTxInterfaceAddDelReply)(nil), "flowprobe_tx_interface_add_del_reply_e8d4e804")
544 // Messages returns list of all messages in this module.
545 func AllMessages() []api.Message {
546 return []api.Message{
547 (*FlowprobeParams)(nil),
548 (*FlowprobeParamsReply)(nil),
549 (*FlowprobeTxInterfaceAddDel)(nil),
550 (*FlowprobeTxInterfaceAddDelReply)(nil),