|
|
@ -27,6 +27,7 @@
|
|
|
|
#include "suricata.h"
|
|
|
|
#include "suricata.h"
|
|
|
|
#include "util-bpf.h"
|
|
|
|
#include "util-bpf.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined __OpenBSD__
|
|
|
|
|
|
|
|
|
|
|
|
/** protect bpf filter build, as it is not thread safe */
|
|
|
|
/** protect bpf filter build, as it is not thread safe */
|
|
|
|
static SCMutex bpf_set_filter_lock = SCMUTEX_INITIALIZER;
|
|
|
|
static SCMutex bpf_set_filter_lock = SCMUTEX_INITIALIZER;
|
|
|
@ -38,7 +39,8 @@ void SCBPFFree(struct bpf_program *program)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program,
|
|
|
|
int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program,
|
|
|
|
const char *buf, int optimize, uint32_t mask,
|
|
|
|
const char *buf,
|
|
|
|
|
|
|
|
int optimize, uint32_t mask,
|
|
|
|
char *errbuf, size_t errbuf_len)
|
|
|
|
char *errbuf, size_t errbuf_len)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pcap_t *p;
|
|
|
|
pcap_t *p;
|
|
|
@ -71,3 +73,5 @@ int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program,
|
|
|
|
|
|
|
|
|
|
|
|
return (ret);
|
|
|
|
return (ret);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* Not __OpenBSD__ */
|
|
|
|