2 main.c - regex policy daemon
5 2007, Christian Thaeter <ct@pipapo.org>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <sys/types.h>
27 #include <sys/socket.h>
28 #include <netinet/in.h>
37 rxpd [options] ..files..
42 -b dir basedir for rules
46 -p policy access policies
51 -l log log hits to logfile
60 main (int argc, char** argv)
62 struct rxpd_base* rxpd = rxpd_init ("./");
63 struct event_base* event = event_init();
65 // parse commandline args
68 struct rxpd_file* file = rxpd_file_new (rxpd, "test");
69 rxpd_file_load (file);
71 // initialize listening connections
73 rxpd_socket_schedule (rxpd_socket_new_tcp4 (rxpd, NULL, 2374));
74 //rxpd_socket_new_unix (rxpd, "/tmp/rxpd");