I have a script of about 100 lines written in PHP. When launched it listens indefinitely until killed for UDP packets on a interface and when it receives them it will unpack the byte encoded string and based on conditions (length of string) it does update queries on a database. 1 update per string received if condition met.
When rewritten in C it will have to become a daemon and it will have to use libpq (PostgreSQL 9.4) to access my database. I will need the sources so that I can compile myself. If possible I would like to add logging functions so I can log the unpacked UDP string to a file of my choice (example /var/log/mydaemon)
When launched it has to take parameters on command line that will be IP and port to listen. eg: ./mydaemon [url removed, login to view] 6789