aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-07-07 14:06:29 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-07-07 14:06:29 +0000
commit118829fa654f6edeb35e5dda2f6e8215bacf26ca (patch)
tree2ef0b33fd74d1fec16af7318acaf3f033d52ccbd /src
parent80e5249134411d5d8e67eb13edf7e3b92795f0ac (diff)
downloadipacct-118829fa654f6edeb35e5dda2f6e8215bacf26ca.tar.gz
ipacct-118829fa654f6edeb35e5dda2f6e8215bacf26ca.tar.bz2
Remove inlcuded libpcap.
* libpcap: Remove * INSTALL: Remove * Makefile.am (SUBDIRS): Remove libpcap * configure.ac: Remove libpcap Use LOG_FACILITY instead of --with-log-facility Raise version no. to 1.0. * ylwrap: Remove. * src/Makefile.am (ipacct_LDADD): Use -lpcap. * src/ipacct.h: Do not include ip_var.h * src/main.c: Do not include pcap-int.h * src/run.c: Do not include pcap-int.h (run): Use pcap_fileno. * AUTHORS: Update * ylwrap, INSTALL: Remove.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/ipacct.h4
-rw-r--r--src/main.c6
-rw-r--r--src/run.c5
4 files changed, 6 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 46bbc49..34104d6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,8 +2,8 @@ sbin_PROGRAMS = ipacct
ipacct_SOURCES = main.c run.c utils.c iputil.c bpf_dump.c cons_raw.c \
cons_ether.c cons_ppp.c cons_ip.c account.c report.c \
config.y list.c
-ipacct_LDADD = ../lib/libipacct.a ../libpcap/libpcap.a
+ipacct_LDADD = ../lib/libipacct.a
noinst_HEADERS = ipacct.h report.h list.h
-INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/libpcap @INCLUDES@
+INCLUDES = -I$(top_srcdir)/lib
AM_CFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
AM_YFLAGS = -v -t \ No newline at end of file
diff --git a/src/ipacct.h b/src/ipacct.h
index df8869d..406dd90 100644
--- a/src/ipacct.h
+++ b/src/ipacct.h
@@ -14,15 +14,13 @@
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: ipacct.h,v 1.6 2005/05/20 12:55:18 gray Exp $ */
+/* $Id: ipacct.h,v 1.7 2008/07/07 14:06:30 gray Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#include <netinet/ip_var.h>
#include <netinet/udp.h>
-/*#include <netinet/udp_var.h>*/
#include <net/if.h>
#include <netinet/if_ether.h>
#include <pcap.h>
diff --git a/src/main.c b/src/main.c
index 6c72c38..9ad3d7e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
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.10 2008/07/07 13:27:02 gray Exp $ */
+/* $Id: main.c,v 1.11 2008/07/07 14:06:30 gray Exp $ */
#if defined(HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -35,7 +35,6 @@
#include <netinet/tcp.h>
#include <getopt.h>
#include <pcap.h>
-#include <pcap-int.h>
#include <argp.h>
#include <ipacct.h>
@@ -338,9 +337,6 @@ main(argc, argv)
if (!(callback = lookup_pcap_callback(type = pcap_datalink(pcap))))
die(1, "unknown data link type 0x%x", type);
- if (pcap->fd < 0)
- die(1, "can't listen to %d", pcap->fd);
-
start_time = time(NULL);
if (ttw)
slice_interval = ttw;
diff --git a/src/run.c b/src/run.c
index 2a58ec5..b9c5356 100644
--- a/src/run.c
+++ b/src/run.c
@@ -14,7 +14,7 @@
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: run.c,v 1.1 2001/05/31 13:40:56 gray Exp $ */
+/* $Id: run.c,v 1.2 2008/07/07 14:06:30 gray Exp $ */
#if defined(HAVE_CONFIG_H)
# include <config.h>
#endif
@@ -25,7 +25,6 @@
#include <sys/types.h>
#include <sys/time.h>
#include <pcap.h>
-#include <pcap-int.h>
#include <netinet/in.h>
#include <string.h>
#include <errno.h>
@@ -62,7 +61,7 @@ run(p, callback)
struct timeval wait;
int dumped = 0;
- pfd = p->fd;
+ pfd = pcap_fileno(p);
start = time(NULL);

Return to:

Send suggestions and report system problems to the System administrator.