summaryrefslogtreecommitdiff
path: root/src/osfp_common.h
diff options
context:
space:
mode:
authorzhuzhenjun <[email protected]>2023-10-26 13:48:41 +0800
committerzhuzhenjun <[email protected]>2023-10-26 13:48:41 +0800
commit13721781f73b4efc2a8a5115c297581c1310d1bb (patch)
tree478660b968f11f699d9d43c24d718405e08d5591 /src/osfp_common.h
parentc9247d713da668ed1bd2d332849dd9409330c0e3 (diff)
code: clean upv1.3.4rel-1.3
Diffstat (limited to 'src/osfp_common.h')
-rw-r--r--src/osfp_common.h26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/osfp_common.h b/src/osfp_common.h
index 89da3da..6b2c367 100644
--- a/src/osfp_common.h
+++ b/src/osfp_common.h
@@ -1,27 +1,6 @@
#ifndef __OSFP_COMMON_H__
#define __OSFP_COMMON_H__
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <time.h>
-
-#include <sys/fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-
-#include "utarray.h"
-#include "uthash.h"
-#include "utlist.h"
-#include "utringbuffer.h"
-#include "utstack.h"
-#include "utstring.h"
-
-#include "cJSON.h"
-
static inline unsigned long long osfp_rdtsc(void)
{
union {
@@ -157,6 +136,7 @@ enum osfp_os_class_id {
#define OSFP_OS_CLASS_FLAG_IOS OSFP_BIT_U32(OSFP_OS_CLASS_IOS)
#define OSFP_OS_CLASS_FLAG_ANDROID OSFP_BIT_U32(OSFP_OS_CLASS_ANDROID)
+#define OSFP_LOWEST_SCORE_LIMIT 20
enum osfp_error_code {
OSFP_NOERR,
@@ -169,6 +149,9 @@ enum osfp_error_code {
OSFP_ERR_FINGERPRINTING_UNSUPPORTED,
};
+struct osfp_os_class_score {
+ unsigned int scores[OSFP_OS_CLASS_MAX];
+};
/**
* @brief 结构体用于 osfp_result 中的详细结果。
@@ -197,6 +180,7 @@ struct osfp_db {
enum osfp_os_class_id osfp_os_class_name_to_id(char *name);
const char *osfp_os_class_id_to_name(enum osfp_os_class_id os_class);
+struct osfp_result *osfp_result_build(struct osfp_os_class_score *os_class_score, const char *matched);
char *osfp_read_file(char *fp_file);
#endif