1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/plugins/flowprobe.api.json
7 // Package flowprobe contains generated bindings for API file flowprobe.api.
19 api "git.fd.io/govpp.git/api"
20 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0xbb4dfc0d
35 // FlowprobeRecordFlags defines enum 'flowprobe_record_flags'.
36 type FlowprobeRecordFlags uint8
39 FLOWPROBE_RECORD_FLAG_L2 FlowprobeRecordFlags = 1
40 FLOWPROBE_RECORD_FLAG_L3 FlowprobeRecordFlags = 2
41 FLOWPROBE_RECORD_FLAG_L4 FlowprobeRecordFlags = 4
45 FlowprobeRecordFlags_name = map[uint8]string{
46 1: "FLOWPROBE_RECORD_FLAG_L2",
47 2: "FLOWPROBE_RECORD_FLAG_L3",
48 4: "FLOWPROBE_RECORD_FLAG_L4",
50 FlowprobeRecordFlags_value = map[string]uint8{
51 "FLOWPROBE_RECORD_FLAG_L2": 1,
52 "FLOWPROBE_RECORD_FLAG_L3": 2,
53 "FLOWPROBE_RECORD_FLAG_L4": 4,
57 func (x FlowprobeRecordFlags) String() string {
58 s, ok := FlowprobeRecordFlags_name[uint8(x)]
62 str := func(n uint8) string {
63 s, ok := FlowprobeRecordFlags_name[uint8(n)]
67 return "FlowprobeRecordFlags(" + strconv.Itoa(int(n)) + ")"
69 for i := uint8(0); i <= 8; i++ {
84 // FlowprobeWhichFlags defines enum 'flowprobe_which_flags'.
85 type FlowprobeWhichFlags uint8
88 FLOWPROBE_WHICH_FLAG_IP4 FlowprobeWhichFlags = 1
89 FLOWPROBE_WHICH_FLAG_L2 FlowprobeWhichFlags = 2
90 FLOWPROBE_WHICH_FLAG_IP6 FlowprobeWhichFlags = 4
94 FlowprobeWhichFlags_name = map[uint8]string{
95 1: "FLOWPROBE_WHICH_FLAG_IP4",
96 2: "FLOWPROBE_WHICH_FLAG_L2",
97 4: "FLOWPROBE_WHICH_FLAG_IP6",
99 FlowprobeWhichFlags_value = map[string]uint8{
100 "FLOWPROBE_WHICH_FLAG_IP4": 1,
101 "FLOWPROBE_WHICH_FLAG_L2": 2,
102 "FLOWPROBE_WHICH_FLAG_IP6": 4,
106 func (x FlowprobeWhichFlags) String() string {
107 s, ok := FlowprobeWhichFlags_name[uint8(x)]
111 str := func(n uint8) string {
112 s, ok := FlowprobeWhichFlags_name[uint8(n)]
116 return "FlowprobeWhichFlags(" + strconv.Itoa(int(n)) + ")"
118 for i := uint8(0); i <= 8; i++ {
133 // IfStatusFlags defines enum 'if_status_flags'.
134 type IfStatusFlags uint32
137 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
138 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
142 IfStatusFlags_name = map[uint32]string{
143 1: "IF_STATUS_API_FLAG_ADMIN_UP",
144 2: "IF_STATUS_API_FLAG_LINK_UP",
146 IfStatusFlags_value = map[string]uint32{
147 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
148 "IF_STATUS_API_FLAG_LINK_UP": 2,
152 func (x IfStatusFlags) String() string {
153 s, ok := IfStatusFlags_name[uint32(x)]
157 str := func(n uint32) string {
158 s, ok := IfStatusFlags_name[uint32(n)]
162 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
164 for i := uint32(0); i <= 32; i++ {
174 return str(uint32(x))
179 // IfType defines enum 'if_type'.
183 IF_API_TYPE_HARDWARE IfType = 1
184 IF_API_TYPE_SUB IfType = 2
185 IF_API_TYPE_P2P IfType = 3
186 IF_API_TYPE_PIPE IfType = 4
190 IfType_name = map[uint32]string{
191 1: "IF_API_TYPE_HARDWARE",
192 2: "IF_API_TYPE_SUB",
193 3: "IF_API_TYPE_P2P",
194 4: "IF_API_TYPE_PIPE",
196 IfType_value = map[string]uint32{
197 "IF_API_TYPE_HARDWARE": 1,
198 "IF_API_TYPE_SUB": 2,
199 "IF_API_TYPE_P2P": 3,
200 "IF_API_TYPE_PIPE": 4,
204 func (x IfType) String() string {
205 s, ok := IfType_name[uint32(x)]
209 return "IfType(" + strconv.Itoa(int(x)) + ")"
212 // LinkDuplex defines enum 'link_duplex'.
213 type LinkDuplex uint32
216 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
217 LINK_DUPLEX_API_HALF LinkDuplex = 1
218 LINK_DUPLEX_API_FULL LinkDuplex = 2
222 LinkDuplex_name = map[uint32]string{
223 0: "LINK_DUPLEX_API_UNKNOWN",
224 1: "LINK_DUPLEX_API_HALF",
225 2: "LINK_DUPLEX_API_FULL",
227 LinkDuplex_value = map[string]uint32{
228 "LINK_DUPLEX_API_UNKNOWN": 0,
229 "LINK_DUPLEX_API_HALF": 1,
230 "LINK_DUPLEX_API_FULL": 2,
234 func (x LinkDuplex) String() string {
235 s, ok := LinkDuplex_name[uint32(x)]
239 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
242 // MtuProto defines enum 'mtu_proto'.
246 MTU_PROTO_API_L3 MtuProto = 1
247 MTU_PROTO_API_IP4 MtuProto = 2
248 MTU_PROTO_API_IP6 MtuProto = 3
249 MTU_PROTO_API_MPLS MtuProto = 4
250 MTU_PROTO_API_N MtuProto = 5
254 MtuProto_name = map[uint32]string{
255 1: "MTU_PROTO_API_L3",
256 2: "MTU_PROTO_API_IP4",
257 3: "MTU_PROTO_API_IP6",
258 4: "MTU_PROTO_API_MPLS",
259 5: "MTU_PROTO_API_N",
261 MtuProto_value = map[string]uint32{
262 "MTU_PROTO_API_L3": 1,
263 "MTU_PROTO_API_IP4": 2,
264 "MTU_PROTO_API_IP6": 3,
265 "MTU_PROTO_API_MPLS": 4,
266 "MTU_PROTO_API_N": 5,
270 func (x MtuProto) String() string {
271 s, ok := MtuProto_name[uint32(x)]
275 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
278 // RxMode defines enum 'rx_mode'.
282 RX_MODE_API_UNKNOWN RxMode = 0
283 RX_MODE_API_POLLING RxMode = 1
284 RX_MODE_API_INTERRUPT RxMode = 2
285 RX_MODE_API_ADAPTIVE RxMode = 3
286 RX_MODE_API_DEFAULT RxMode = 4
290 RxMode_name = map[uint32]string{
291 0: "RX_MODE_API_UNKNOWN",
292 1: "RX_MODE_API_POLLING",
293 2: "RX_MODE_API_INTERRUPT",
294 3: "RX_MODE_API_ADAPTIVE",
295 4: "RX_MODE_API_DEFAULT",
297 RxMode_value = map[string]uint32{
298 "RX_MODE_API_UNKNOWN": 0,
299 "RX_MODE_API_POLLING": 1,
300 "RX_MODE_API_INTERRUPT": 2,
301 "RX_MODE_API_ADAPTIVE": 3,
302 "RX_MODE_API_DEFAULT": 4,
306 func (x RxMode) String() string {
307 s, ok := RxMode_name[uint32(x)]
311 return "RxMode(" + strconv.Itoa(int(x)) + ")"
314 // SubIfFlags defines enum 'sub_if_flags'.
315 type SubIfFlags uint32
318 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
319 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
320 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
321 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
322 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
323 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
324 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
325 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
326 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
327 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
331 SubIfFlags_name = map[uint32]string{
332 1: "SUB_IF_API_FLAG_NO_TAGS",
333 2: "SUB_IF_API_FLAG_ONE_TAG",
334 4: "SUB_IF_API_FLAG_TWO_TAGS",
335 8: "SUB_IF_API_FLAG_DOT1AD",
336 16: "SUB_IF_API_FLAG_EXACT_MATCH",
337 32: "SUB_IF_API_FLAG_DEFAULT",
338 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
339 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
340 254: "SUB_IF_API_FLAG_MASK_VNET",
341 256: "SUB_IF_API_FLAG_DOT1AH",
343 SubIfFlags_value = map[string]uint32{
344 "SUB_IF_API_FLAG_NO_TAGS": 1,
345 "SUB_IF_API_FLAG_ONE_TAG": 2,
346 "SUB_IF_API_FLAG_TWO_TAGS": 4,
347 "SUB_IF_API_FLAG_DOT1AD": 8,
348 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
349 "SUB_IF_API_FLAG_DEFAULT": 32,
350 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
351 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
352 "SUB_IF_API_FLAG_MASK_VNET": 254,
353 "SUB_IF_API_FLAG_DOT1AH": 256,
357 func (x SubIfFlags) String() string {
358 s, ok := SubIfFlags_name[uint32(x)]
362 str := func(n uint32) string {
363 s, ok := SubIfFlags_name[uint32(n)]
367 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
369 for i := uint32(0); i <= 32; i++ {
379 return str(uint32(x))
384 // InterfaceIndex defines alias 'interface_index'.
385 type InterfaceIndex uint32
387 // FlowprobeParams defines message 'flowprobe_params'.
388 type FlowprobeParams struct {
389 RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"`
390 ActiveTimer uint32 `binapi:"u32,name=active_timer" json:"active_timer,omitempty"`
391 PassiveTimer uint32 `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"`
394 func (m *FlowprobeParams) Reset() { *m = FlowprobeParams{} }
395 func (*FlowprobeParams) GetMessageName() string { return "flowprobe_params" }
396 func (*FlowprobeParams) GetCrcString() string { return "baa46c09" }
397 func (*FlowprobeParams) GetMessageType() api.MessageType {
398 return api.RequestMessage
401 func (m *FlowprobeParams) Size() (size int) {
405 size += 1 // m.RecordFlags
406 size += 4 // m.ActiveTimer
407 size += 4 // m.PassiveTimer
410 func (m *FlowprobeParams) Marshal(b []byte) ([]byte, error) {
412 b = make([]byte, m.Size())
414 buf := codec.NewBuffer(b)
415 buf.EncodeUint8(uint8(m.RecordFlags))
416 buf.EncodeUint32(m.ActiveTimer)
417 buf.EncodeUint32(m.PassiveTimer)
418 return buf.Bytes(), nil
420 func (m *FlowprobeParams) Unmarshal(b []byte) error {
421 buf := codec.NewBuffer(b)
422 m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8())
423 m.ActiveTimer = buf.DecodeUint32()
424 m.PassiveTimer = buf.DecodeUint32()
428 // FlowprobeParamsReply defines message 'flowprobe_params_reply'.
429 type FlowprobeParamsReply struct {
430 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
433 func (m *FlowprobeParamsReply) Reset() { *m = FlowprobeParamsReply{} }
434 func (*FlowprobeParamsReply) GetMessageName() string { return "flowprobe_params_reply" }
435 func (*FlowprobeParamsReply) GetCrcString() string { return "e8d4e804" }
436 func (*FlowprobeParamsReply) GetMessageType() api.MessageType {
437 return api.ReplyMessage
440 func (m *FlowprobeParamsReply) Size() (size int) {
444 size += 4 // m.Retval
447 func (m *FlowprobeParamsReply) Marshal(b []byte) ([]byte, error) {
449 b = make([]byte, m.Size())
451 buf := codec.NewBuffer(b)
452 buf.EncodeInt32(m.Retval)
453 return buf.Bytes(), nil
455 func (m *FlowprobeParamsReply) Unmarshal(b []byte) error {
456 buf := codec.NewBuffer(b)
457 m.Retval = buf.DecodeInt32()
461 // FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'.
462 type FlowprobeTxInterfaceAddDel struct {
463 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
464 Which FlowprobeWhichFlags `binapi:"flowprobe_which_flags,name=which" json:"which,omitempty"`
465 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
468 func (m *FlowprobeTxInterfaceAddDel) Reset() { *m = FlowprobeTxInterfaceAddDel{} }
469 func (*FlowprobeTxInterfaceAddDel) GetMessageName() string { return "flowprobe_tx_interface_add_del" }
470 func (*FlowprobeTxInterfaceAddDel) GetCrcString() string { return "b782c976" }
471 func (*FlowprobeTxInterfaceAddDel) GetMessageType() api.MessageType {
472 return api.RequestMessage
475 func (m *FlowprobeTxInterfaceAddDel) Size() (size int) {
481 size += 4 // m.SwIfIndex
484 func (m *FlowprobeTxInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
486 b = make([]byte, m.Size())
488 buf := codec.NewBuffer(b)
489 buf.EncodeBool(m.IsAdd)
490 buf.EncodeUint8(uint8(m.Which))
491 buf.EncodeUint32(uint32(m.SwIfIndex))
492 return buf.Bytes(), nil
494 func (m *FlowprobeTxInterfaceAddDel) Unmarshal(b []byte) error {
495 buf := codec.NewBuffer(b)
496 m.IsAdd = buf.DecodeBool()
497 m.Which = FlowprobeWhichFlags(buf.DecodeUint8())
498 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
502 // FlowprobeTxInterfaceAddDelReply defines message 'flowprobe_tx_interface_add_del_reply'.
503 type FlowprobeTxInterfaceAddDelReply struct {
504 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
507 func (m *FlowprobeTxInterfaceAddDelReply) Reset() { *m = FlowprobeTxInterfaceAddDelReply{} }
508 func (*FlowprobeTxInterfaceAddDelReply) GetMessageName() string {
509 return "flowprobe_tx_interface_add_del_reply"
511 func (*FlowprobeTxInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
512 func (*FlowprobeTxInterfaceAddDelReply) GetMessageType() api.MessageType {
513 return api.ReplyMessage
516 func (m *FlowprobeTxInterfaceAddDelReply) Size() (size int) {
520 size += 4 // m.Retval
523 func (m *FlowprobeTxInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
525 b = make([]byte, m.Size())
527 buf := codec.NewBuffer(b)
528 buf.EncodeInt32(m.Retval)
529 return buf.Bytes(), nil
531 func (m *FlowprobeTxInterfaceAddDelReply) Unmarshal(b []byte) error {
532 buf := codec.NewBuffer(b)
533 m.Retval = buf.DecodeInt32()
537 func init() { file_flowprobe_binapi_init() }
538 func file_flowprobe_binapi_init() {
539 api.RegisterMessage((*FlowprobeParams)(nil), "flowprobe_params_baa46c09")
540 api.RegisterMessage((*FlowprobeParamsReply)(nil), "flowprobe_params_reply_e8d4e804")
541 api.RegisterMessage((*FlowprobeTxInterfaceAddDel)(nil), "flowprobe_tx_interface_add_del_b782c976")
542 api.RegisterMessage((*FlowprobeTxInterfaceAddDelReply)(nil), "flowprobe_tx_interface_add_del_reply_e8d4e804")
545 // Messages returns list of all messages in this module.
546 func AllMessages() []api.Message {
547 return []api.Message{
548 (*FlowprobeParams)(nil),
549 (*FlowprobeParamsReply)(nil),
550 (*FlowprobeTxInterfaceAddDel)(nil),
551 (*FlowprobeTxInterfaceAddDelReply)(nil),