aboutsummaryrefslogtreecommitdiff
path: root/pcap.h
diff options
context:
space:
mode:
authorguy <guy>2005-05-03 18:53:58 +0000
committerguy <guy>2005-05-03 18:53:58 +0000
commite987a615e2b8d2c9215eb3b6c14ec18845c20daa (patch)
tree189e6d2c79c88a75a1d7b4ceed2aeeb189571614 /pcap.h
parenta27ec8748269d08509f49dda0a07deaa4c732649 (diff)
From Pawel Pokrywka: add support for requesting that only received
packets, only sent packets, or all packets be accepted, with an implementation for Linux. Add an implementation for BPF platforms that support BIOCSSEESENT.
Diffstat (limited to 'pcap.h')
-rw-r--r--pcap.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/pcap.h b/pcap.h
index bfa81992..f8a8f035 100644
--- a/pcap.h
+++ b/pcap.h
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.52 2004-12-18 08:52:11 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.53 2005-05-03 18:54:02 guy Exp $ (LBL)
*/
#ifndef lib_pcap_h
@@ -120,6 +120,12 @@ struct pcap_file_header {
bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
};
+typedef enum {
+ D_INOUT = 0,
+ D_IN,
+ D_OUT
+} direction_t;
+
/*
* Each packet in the dump file is prepended with this generic header.
* This gets around the problem of different headers for different
@@ -218,6 +224,7 @@ int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
void pcap_breakloop(pcap_t *);
int pcap_stats(pcap_t *, struct pcap_stat *);
int pcap_setfilter(pcap_t *, struct bpf_program *);
+int pcap_setdirection(pcap_t *, direction_t);
int pcap_getnonblock(pcap_t *, char *);
int pcap_setnonblock(pcap_t *, int, char *);
void pcap_perror(pcap_t *, char *);