aboutsummaryrefslogtreecommitdiff
path: root/example/MacOS/README.md
diff options
context:
space:
mode:
authorZengYingpei <zengyingpei@cmhi.chinamobile.com>2018-02-04 14:21:52 +0800
committerZengYingpei <zengyingpei@cmhi.chinamobile.com>2018-02-04 14:21:52 +0800
commitaea81e4a1ae96a8bd93789556d252cce335ea197 (patch)
tree255d4052f920819ad469587ed78f6261e392a026 /example/MacOS/README.md
parent39b9f6752c6f55ae8d68fe88787d245a9692a929 (diff)
Add an Xcode project for debugging under MacOS (add all missed files)
Diffstat (limited to 'example/MacOS/README.md')
-rw-r--r--example/MacOS/README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/example/MacOS/README.md b/example/MacOS/README.md
new file mode 100644
index 000000000..b46833395
--- /dev/null
+++ b/example/MacOS/README.md
@@ -0,0 +1,18 @@
+# How to use?
+
+You need to first compile the nDPI library as usual:
+
+- ./autogen.sh
+- ./configure
+- make
+
+Then open the Xcode project and you are ready to go. The default behavior is to analyze an embeded pcap file `capture.pcap`. You can change the behavior by changing command line input in `ViewController.m` file.
+
+# What the XCode project did?
+
+It's a dummy Mac App project with a **Run** button. It doesn't modify any nDPI code except that it renamed the `main` function to `orginal_main` in `ndpiReader.c` (because the Mac App has it's own main function) and call the `orginal_main` with synthetic command line input from `ViewController.m` file when the **Run** button is clicked.
+
+It also fixes some problems when compiling with Xcode. Somes are listed below:
+- Add missed `NDPI_LOG_DEBUG2` macro definition implementation (defined as `NDPI_LOG_DEBUG2_XCODE_PROJ` in `ViewController.m`)
+- Add a empty ndpi_utils.h file to make `protocols/attic/ftp.c` and `protocols/attic/secondlife.c` can compile
+- Specially treat `ndpi_patricia.c` by not adding it into compilation source, since it's directly included in `ndpi_main.c`