diff options
| author | lijia <[email protected]> | 2024-07-22 10:34:56 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2024-07-22 13:35:54 +0800 |
| commit | 2ee4770462185daec28e8bb424c8e188e194c996 (patch) | |
| tree | c4394242f00311d4d7d7c84011672364c851c691 /src/ftp_decoder_stat.h | |
| parent | 6e906a14fee875eff1cac600710f2cedcaaef9b6 (diff) | |
Diffstat (limited to 'src/ftp_decoder_stat.h')
| -rw-r--r-- | src/ftp_decoder_stat.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ftp_decoder_stat.h b/src/ftp_decoder_stat.h new file mode 100644 index 0000000..bfca60c --- /dev/null +++ b/src/ftp_decoder_stat.h @@ -0,0 +1,28 @@ +#pragma once +#include <fieldstat/fieldstat_easy.h> + +enum ftp_decoder_stat_type{ + FTPD_STAT_CTRL_LINK_OPEN = 0, + FTPD_STAT_CTRL_LINK_CLOSE, + FTPD_STAT_DATA_LINK_OPEN, + FTPD_STAT_DATA_LINK_CLOSE, + FTPD_STAT_NEGOTIATE_DATA_LINK, //Negotiating by PORT or PASV command in ctrl link + FTPD_STAT_CTRL_LINK_BYTES_C2S, + FTPD_STAT_CTRL_LINK_BYTES_S2C, + FTPD_STAT_DATA_LINK_BYTES_C2S, + FTPD_STAT_DATA_LINK_BYTES_S2C, + FTPD_STAT_CTRL_CMD, + + FTPD_STAT_MAX, +}; + + +struct ftpd_stat_config_tuple +{ + enum ftp_decoder_stat_type type; + const char *name; +}; + +int ftp_decoder_stat_init(struct ftp_decoder_env *fenv); +void ftp_decoder_stat_free(struct ftp_decoder_env *fenv); +void ftp_decoder_stat_incrby(int thread_idx, struct ftp_decoder_env *fenv, enum ftp_decoder_stat_type stattype, long long increment);
\ No newline at end of file |
