libpcap  1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
  Fossies Dox: libpcap-1.10.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

bpf_filter.c File Reference
#include <pcap/pcap-inttypes.h>
#include "pcap-types.h"
#include "extract.h"
#include "diag-control.h"
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <pcap-int.h>
#include <stdlib.h>
Include dependency graph for bpf_filter.c:

Go to the source code of this file.

Macros

#define EXTRACT_SHORT   EXTRACT_BE_U_2
 
#define EXTRACT_LONG   EXTRACT_BE_U_4
 

Enumerations

enum  { BPF_S_ANC_NONE , BPF_S_ANC_VLAN_TAG , BPF_S_ANC_VLAN_TAG_PRESENT }
 

Functions

u_int pcap_filter_with_aux_data (const struct bpf_insn *pc, const u_char *p, u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data)
 
u_int pcap_filter (const struct bpf_insn *pc, const u_char *p, u_int wirelen, u_int buflen)
 
int pcap_validate_filter (const struct bpf_insn *f, int len)
 
u_int bpf_filter (const struct bpf_insn *pc, const u_char *p, u_int wirelen, u_int buflen)
 
int bpf_validate (const struct bpf_insn *f, int len)
 

Macro Definition Documentation

◆ EXTRACT_LONG

#define EXTRACT_LONG   EXTRACT_BE_U_4

Definition at line 51 of file bpf_filter.c.

◆ EXTRACT_SHORT

#define EXTRACT_SHORT   EXTRACT_BE_U_2

Definition at line 50 of file bpf_filter.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BPF_S_ANC_NONE 
BPF_S_ANC_VLAN_TAG 
BPF_S_ANC_VLAN_TAG_PRESENT 

Definition at line 69 of file bpf_filter.c.

Function Documentation

◆ bpf_filter()

u_int bpf_filter ( const struct bpf_insn pc,
const u_char *  p,
u_int  wirelen,
u_int  buflen 
)

Definition at line 536 of file bpf_filter.c.

References pcap_filter().

◆ bpf_validate()

int bpf_validate ( const struct bpf_insn f,
int  len 
)

Definition at line 543 of file bpf_filter.c.

References pcap_validate_filter().

Referenced by daemon_unpackapplyfilter(), and main().

◆ pcap_filter()

◆ pcap_filter_with_aux_data()

◆ pcap_validate_filter()