aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c48
1 files changed, 13 insertions, 35 deletions
diff --git a/src/main.c b/src/main.c
index 9ad3d7e..3760296 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,20 +1,19 @@
/* This file is part of IPACCT
Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2008 Sergey Poznyakoff
- This program is free software; you can redistribute it and/or modify
+ Ipacct is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Ipacct is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* $Id: main.c,v 1.11 2008/07/07 14:06:30 gray Exp $ */
+ along with Ipacct. If not, see <http://www.gnu.org/licenses/>. */
+
#if defined(HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -42,7 +41,6 @@
# define RETSIGTYPE void
#endif
-void usage();
RETSIGTYPE sig_hup();
RETSIGTYPE sig_usr1();
RETSIGTYPE sig_usr2();
@@ -115,10 +113,7 @@ static struct argp_option options[] = {
/*ARGSUSED*/
static error_t
-parse_opt (key, arg, state)
- int key;
- char *arg;
- struct argp_state *state;
+parse_opt(int key, char *arg, struct argp_state *state)
{
switch (key) {
case 'b':
@@ -305,9 +300,7 @@ change_user ()
}
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int c, type;
pcap_handler callback;
@@ -375,9 +368,7 @@ main(argc, argv)
}
pcap_t *
-init(device, cmdbuf)
- char *device;
- char *cmdbuf;
+init(char *device, char *cmdbuf)
{
char buf[PCAP_ERRBUF_SIZE];
struct bpf_program bpfcode;
@@ -461,8 +452,7 @@ close_process()
}
void
-re_read_profile(name)
- char *name;
+re_read_profile(char *name)
{
account_init();
read_profile(name);
@@ -499,8 +489,7 @@ sig_usr2()
}
RETSIGTYPE
-sig_child(sig)
- int sig;
+sig_child(int sig)
{
int status;
while (waitpid((pid_t)-1, &status, WNOHANG) > 0)
@@ -508,14 +497,3 @@ sig_child(sig)
signal(sig, sig_child);
}
-static char usage_str[] = "\
-usage: ipacct [-c config][-fF][-i iface][-l log][-Ops][-t time][-x]\n\
- ipacct {-b|-h|-S}\n\
-";
-
-void
-usage()
-{
- printf("%s", usage_str);
-}
-

Return to:

Send suggestions and report system problems to the System administrator.