symbol: set public symbols prefix

This commit is contained in:
zhuzhenjun
2023-10-12 15:05:58 +08:00
parent 7e1849233b
commit 8b8627b0d8
13 changed files with 64 additions and 67 deletions

View File

@@ -7,20 +7,19 @@ Libosfp is a C library for OS fingerprinting.
```
# osfp_example depends on libpcap
yum install -y libpcap-devel
# build and install
./build.sh
./package.sh
yum install package/*.rpm
BUILD_TYPE=Debug PACKAGE=1 ./ci/travis.sh
yum install -y ./build/*.rpm
```
## library usage
```
gcc -I./src example/sample.c -o sample -L./build -losfp; cat example/sample.c
gcc -I./src example/sample.c -o sample -L./build -lMESA_osfp; cat example/sample.c
LD_LIBRARY_PATH=${PWD}/build ./sample
```
## run example
```
# load the fingerprint file and capture on eth0, filter tcp port 8888
osfp_example -f /var/lib/libosfp/fp.json -i eth0 "tcp port 8888"
./build/MESA_osfp_example -f /var/lib/MESA_osfp/fp.json -i eth0 "tcp port 8888"
```