33 lines
768 B
C
33 lines
768 B
C
#ifndef _SF_METRICS_H
|
|
#define _SF_METRICS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include "utils.h"
|
|
#include "kafka.h"
|
|
|
|
struct sf_metrics_key
|
|
{
|
|
uuid_t rule_uuid;
|
|
uuid_t sf_uuid;
|
|
uuid_t sff_uuid;
|
|
uint32_t vsys_id;
|
|
};
|
|
|
|
struct sf_metrics *sf_metrics_create(const char *profile, struct kafka *kfk);
|
|
void sf_metrics_destory(struct sf_metrics *handle);
|
|
|
|
void sf_metrics_reset(struct sf_metrics *handle, uint16_t thr_idx);
|
|
void sf_metrics_input(struct sf_metrics *handle, uint16_t thr_idx, struct sf_metrics_key *key, uint64_t rx_pkts, uint64_t rx_bytes, uint64_t tx_pkts, uint64_t tx_bytes);
|
|
void sf_metrics_output(struct sf_metrics *handle, uint16_t thr_idx);
|
|
int sf_metrics_get_interval(struct sf_metrics *handle);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|