]> git.ipfire.org Git - people/ms/suricata.git/commit - src/source-pcap-file.c
unix-socket: introduce API to add commands and tasks
authorEric Leblond <eric@regit.org>
Thu, 25 Oct 2012 20:06:29 +0000 (22:06 +0200)
committerEric Leblond <eric@regit.org>
Mon, 19 Nov 2012 22:54:26 +0000 (23:54 +0100)
commitf8921d8a2808b38c980084469019a0cee1b46a17
treed7b37680b43a52d41275f5451fa064c12bd1da4b
parent20a8b9dbe57f6fed9c94e04eca692db5d4c0f7a1
unix-socket: introduce API to add commands and tasks

This patch transforms the unix socket into a flexible system to
add commands (triggered by user) and taks (run periodically).
It introduces two functions UnixManagerRegisterCommand and
UnixManagerRegisterBackroundTask to registed commands and tasks.

Other part of Suricata can then declare a new command via a simple
call of the function. In the case of a command the caller is
responsible of building the answer message using Jansson API. The
sending of the message is made by unix manager code.
src/runmode-unix-socket.c
src/runmode-unix-socket.h
src/source-pcap-file.c
src/unix-manager.c
src/unix-manager.h