Linux noob needs a bit of help with Slack 9 and kismet

DaiShan

Diamond Member
Jul 5, 2001
9,617
1
0
Ok, I will try to keep this short. I want to install kismet on my slack 9 laptop, however I need libpcap to do this, which requires a file bpf_filter.c that is not packaged with slack 9. So I downloaded the appropriate tar, and read the install file, which is greek to me. Basically I just need to know how to do the following:

Add the line pseudo-device bpfilter 16 to your kernel config file. (where is the kernel config file, and what do I have to do with that?)

add the line: options BPF_KERN_FILTER to your kernel config file. (same question)

Add these lines to conf/files: (where is this located?)
net/bpf.c optional bpfilter
net/bpf_filter.c optional bpfilter

Copy these files into /sys/net: (I think I found this one under /linux/net but dunno if that is the right place?)

net/bpf.c
net/bpf_filter.c
net/bpf.h
net/bpfdesc.h
net/bpf_compat.h

(5) Install net/bpf.h in /usr/include/net. (This step may not be
necessary if your /usr/include tree as symlinks into the /sys
tree.)

(6) Add BPF to the character device switch which is usually found
in:

/sys/<machine>/conf.c

where <machine> is sun, hp300, etc.

Add these lines just before the cdevsw struct array:

#include "bpfilter.h"
#if NBPFILTER > 0
int bpfopen(), bpfclose(), bpfread(), bpfwrite(),
bpfioctl(),bpfselect();
#else
#define bpfopen nodev
#define bpfclose nodev
#define bpfread nodev
#define bpfwrite nodev
#define bpfioctl nodev
#define bpfselect nodev
#endif

Add an cdevsw struct entry for BPF, probably at the end of
the cdevsw struct. You will need to look at the definition
for the cdevsw struct but for SunOS 4, it looks like this:

{
bpfopen, bpfclose, bpfread, bpfwrite, /*---*/
bpfioctl, nodev, bpfselect, 0,
0, 0,
}

In order to avoid having to change the major device number,
when new versions of the OS, you might choose to "pad out" the
cdevsw struct array with a few empty entries:

{
nodev, nodev, nodev, nodev, /*---*/
nodev, nodev, nodev, 0,
0, 0,
},

(7) Create the special device files /dev/bpf0, /dev/bpf1, etc.
Make sure the major device number correpsonds to the entry in
cdevsw; the minor device number should be the same as the
trailing digit of the file name.

Access to the packet interface is controlled by the permissions
on the device files. We recommend that access be restricted to
group `wheel'. For example,

set major=119
/etc/mknod /dev/bpf0 c $major 0
/etc/mknod /dev/bpf1 c $major 1
/etc/mknod /dev/bpf2 c $major 2
/etc/mknod /dev/bpf3 c $major 3
...
chgrp wheel /dev/bpf*
chmod 640 /dev/bpf*

The highest allowable minor device number is one less than the
number given in the "pseudo-device" config line.

(8) Modify the link level device drivers to interact with BPF.

The rest of the install readme is talking about sun os4 installs I think. I know this is a long post, I just don't know where else to go :(
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
You shouldn't have to go through all that trouble. I just installed libpcap on my Slack9 system by getting the 0.7.2 release from here. The steps are as follows:

tar zxvf libpcap-0.7.2.tar.gz
cd libpcap-0.7.2
./configure
make
make install

Make sure you have the Linux kernel source in your /usr/src directory.
 

DaiShan

Diamond Member
Jul 5, 2001
9,617
1
0
I always get the same error on make I get "ln: creating symbolic link 'bpf_filter.c' to ./bpf/net/bpf_filter.c' : operation not permitted then it says make *** [bpf_filter.c] error 1
after that on make install I get "/usr/bin/ginstall: cannot stat 'libpcap.a': no such file or directory make ***[install] error 1
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
Before you type make install, be sure you are root (type su at the command prompt and enter your root password).
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
./configure gives you no errors or anything? If all else fails you could try a slightly older version of libpcap (0.7.1) from here
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
Try one of the packages from that link. It has tgz files made for Slackware (run pkgtool to install).
 

DaiShan

Diamond Member
Jul 5, 2001
9,617
1
0
I installed using pkgtool, seemed to go fine, brough be back to bash prompt, then I went to do kismet again and got same error at the make command.
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
Are you doing a make dep or just a plain make? Also, you could disabling certain options in the compile. The first time I compiled it, it gave me errors about GPS, so I did...

./configure --disable-gps

followed by a make, which worked just fine. Check the documentation on this page to view available optoins.
 

DaiShan

Diamond Member
Jul 5, 2001
9,617
1
0
I did make dep first, which completed without errors, thanks for the link I think I may try --disable-pcap Thanks so much for all of your help! :)