Creating new OpenDPI file

159 views
Skip to first unread message

Kevin

unread,
Dec 13, 2011, 9:04:32 PM12/13/11
to opendpi
Hello -

I'd like to create my own C file that processes PCAP packets.

Do I just need to:

1. create my own C file, MyCFile.c
2. copy the Makefile to Makefile2, but replace "OpenDPI_demo" with
"MyCFile"
3. run "make Makefile2?"

Thank you,
Kevin

VOITPTRPTR

unread,
Dec 14, 2011, 2:24:11 AM12/14/11
to ope...@googlegroups.com
This project is dead. No one responds to questions since ...

Ralf Hoffmann

unread,
Dec 14, 2011, 3:25:20 AM12/14/11
to ope...@googlegroups.com
Hi Kevin,

I'm not sure what you want to achieve. Do you want to add an own
detection or do you want to write a separate program which uses the
opendpi library (like the demo program)?

All Makefiles are generated via automake/autoconf so you should modify
the Makefile.am in the corresponding directory.

For an own detection you need to add a c file to lib/protocols and add
it to lib/Makefile.am and register it in lib/ipq_main.c

For an own program, you can basically copy the src/examples/OpenDPI_demo
directory giving it a new name. Then you need to modify the top level
Makefile.am and the configure.ac. Both files are not large and it should
be easy to see what changes are necessary.

For both uses cases, execute autoreconf to update all intermediate build
files. Then you can do configure && make again and it should work.

Best Regards,

Ralf

--
Ralf Hoffmann | DPI | ipoque
Neumarkt 29-33 | 04107 Leipzig | Germany
phone +49-341-59 40 30 | fax +49-341-59 40 30 19
web www.ipoque.com
trade register Amtsgericht Leipzig HRB21462
Gesellschaft mit beschr�nkter Haftung (GmbH)
board Hendrik Schulze, Markus Ziegler

ipoque Executive Blog at http://blog.ipoque.com

Reply all
Reply to author
Forward
0 new messages