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
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