diff options
| author | zhuzhenjun <[email protected]> | 2023-10-12 15:05:58 +0800 |
|---|---|---|
| committer | zhuzhenjun <[email protected]> | 2023-10-12 15:36:31 +0800 |
| commit | 8b8627b0d8e06cb2d1073b2e86741dad8c39d4f6 (patch) | |
| tree | e41e8a5e70bc0d043f34b2a1651e026a15d54b4f /example/sample.c | |
| parent | 7e1849233b8640e6139143c99423bf71cca0b6b2 (diff) | |
Diffstat (limited to 'example/sample.c')
| -rw-r--r-- | example/sample.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/example/sample.c b/example/sample.c index 6313c62..612ca2b 100644 --- a/example/sample.c +++ b/example/sample.c @@ -1,5 +1,5 @@ #include "stdio.h" -#include "osfp.h" +#include "MESA_osfp.h" char iph[] = { 0x45, 0x00, 0x00, 0x34, 0x51, 0xc4, 0x40, 0x00, @@ -22,14 +22,14 @@ int main(int argc, char **argv) struct tcphdr *l4_hdr = (struct tcphdr *)tcph; size_t l4_hdr_len = sizeof(tcph); - struct osfp_db *db = osfp_db_new(json_file_path); + struct osfp_db *db = MESA_osfp_db_new(json_file_path); if (db) { - struct osfp_result *result = osfp_ipv4_identify(db, l3_hdr, l4_hdr, l4_hdr_len); + struct osfp_result *result = MESA_osfp_ipv4_identify(db, l3_hdr, l4_hdr, l4_hdr_len); if (result) { - printf("likely os: %s\n", osfp_result_os_name_get(result)); - printf("details: \n%s\n", osfp_result_score_detail_export(result)); - osfp_result_free(result); + printf("likely os: %s\n", MESA_osfp_result_os_name_get(result)); + printf("details: \n%s\n", MESA_osfp_result_score_detail_export(result)); + MESA_osfp_result_free(result); } - osfp_db_free(db); + MESA_osfp_db_free(db); } } |
