Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2012 22:02:16 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241169 - head/tools/tools/netmap
Message-ID:  <201210032202.q93M2G6K000140@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Oct  3 22:02:16 2012
New Revision: 241169
URL: http://svn.freebsd.org/changeset/base/241169

Log:
  Clean up compiler warnings.
  
  More work is needed here but this now builds with WARNS=6.
  
  Sponsored by: ADARA Networks
  MFC after: 2 weeks

Modified:
  head/tools/tools/netmap/pcap.c

Modified: head/tools/tools/netmap/pcap.c
==============================================================================
--- head/tools/tools/netmap/pcap.c	Wed Oct  3 21:56:16 2012	(r241168)
+++ head/tools/tools/netmap/pcap.c	Wed Oct  3 22:02:16 2012	(r241169)
@@ -38,7 +38,7 @@
 
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 
-char *version = "$Id$";
+const char *version = "$Id$";
 int verbose = 0;
 
 /* debug support */
@@ -135,13 +135,12 @@ typedef enum {
 	PCAP_D_OUT
 } pcap_direction_t;
  
+struct bpf_program;
 
 
 typedef void (*pcap_handler)(u_char *user,
 		const struct pcap_pkthdr *h, const u_char *bytes);
 
-char errbuf[PCAP_ERRBUF_SIZE];
-
 pcap_t *pcap_open_live(const char *device, int snaplen,
                int promisc, int to_ms, char *errbuf);
 
@@ -155,6 +154,24 @@ char *pcap_lookupdev(char *errbuf);
 int pcap_inject(pcap_t *p, const void *buf, size_t size);
 int pcap_fileno(pcap_t *p);
 const char *pcap_lib_version(void);
+void	pcap_freealldevs(pcap_if_t *);
+pcap_t	*pcap_create(const char *, char *);
+int	pcap_activate(pcap_t *);
+int	pcap_can_set_rfmon(pcap_t *);
+int	pcap_set_snaplen(pcap_t *, int);
+int	pcap_snapshot(pcap_t *);
+int	pcap_lookupnet(const char *, uint32_t *, uint32_t *, char *);
+int	pcap_set_promisc(pcap_t *, int);
+int	pcap_set_timeout(pcap_t *, int);
+int	pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
+	    uint32_t);
+int	pcap_setfilter(pcap_t *, struct bpf_program *);
+int	pcap_datalink(pcap_t *);
+const char *pcap_datalink_val_to_name(int);
+const char *pcap_datalink_val_to_description(int);
+int	pcap_stats(pcap_t *, struct pcap_stat *);
+int	pcap_loop(pcap_t *, int, pcap_handler, u_char *);
+char	*pcap_geterr(pcap_t *);
 
 
 struct eproto {
@@ -739,7 +756,8 @@ pcap_loop(pcap_t *p, int cnt, pcap_handl
 #endif /* __PIC__ */
 
 #ifndef __PIC__
-void do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf)
+static void
+do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf)
 {
 	pcap_inject((pcap_t *)user, buf, h->caplen);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210032202.q93M2G6K000140>