Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing up pcap_util name to avoid name conflict. #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ Installation on OS X:

brew install berkeley-db libnet libnids libpcap openssl

1.a. Install openssl 1.0:

brew install rbenv/tap/openssl@1.0


2. Configure with correct paths:

./configure \
--with-libpcap=/usr/local/opt/libpcap \
--with-openssl=/usr/local/opt/openssl \
--with-openssl=/usr/local/Cellar/openssl@1.0/1.0.2t \
--with-libnet=/usr/local/opt/libnet \
--with-libnids=/usr/local/opt/libnids \
--without-x
Expand Down
2 changes: 1 addition & 1 deletion dnsspoof.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ main(int argc, char *argv[])
else snprintf(buf, sizeof(buf), "udp dst port 53 and not src %s",
libnet_addr2name4(lnet_ip, LIBNET_DONT_RESOLVE));

if ((pcap_pd = pcap_init(dev, buf, 128)) == NULL)
if ((pcap_pd = pcap_init_ds(dev, buf, 128)) == NULL)
errx(1, "couldn't initialize sniffing");

if ((pcap_off = pcap_dloff(pcap_pd)) < 0)
Expand Down
2 changes: 1 addition & 1 deletion pcaputil.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pcap_dloff(pcap_t *pd)
}

pcap_t *
pcap_init(char *intf, char *filter, int snaplen)
pcap_init_ds(char *intf, char *filter, int snaplen)
{
pcap_t *pd;
u_int net, mask;
Expand Down
2 changes: 1 addition & 1 deletion pcaputil.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef PCAPUTIL_H
#define PCAPUTIL_H

pcap_t *pcap_init(char *intf, char *filter, int snaplen);
pcap_t *pcap_init_ds(char *intf, char *filter, int snaplen);

int pcap_dloff(pcap_t *pd);

Expand Down
2 changes: 1 addition & 1 deletion tcpkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ main(int argc, char *argv[])

filter = copy_argv(argv);

if ((pd = pcap_init(intf, filter, 64)) == NULL)
if ((pd = pcap_init_ds(intf, filter, 64)) == NULL)
errx(1, "couldn't initialize sniffing");

if ((pcap_off = pcap_dloff(pd)) < 0)
Expand Down
2 changes: 1 addition & 1 deletion tcpnice.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ main(int argc, char *argv[])

filter = copy_argv(argv);

if ((pd = pcap_init(intf, filter, 128)) == NULL)
if ((pd = pcap_init_ds(intf, filter, 128)) == NULL)
errx(1, "couldn't initialize sniffing");

if ((pcap_off = pcap_dloff(pd)) < 0)
Expand Down