Setup OpenWrt development environment following official instructions.
We will assume it is configured in the /opt/openwrt
directory
cd /opt/openwrt/trunk
# update and install all feed packages
cp feeds.conf.default feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
> Network -> cshark
> LuCI -> 3. Applications -> luci-app-cshark
# select options in 'make menuconfig'
> Target System -> x86
> Subtarget -> Generic
> Target Profile -> Generic
# optional if you want VirtualBox image
> Target Images -> Build VirtualBox image files (VDI)
# save configuration and build image as usual
# images will be found in '/opt/openwrt/trunk/bin/x86'
# start OpenWrt using bridge 'br0' interface on the host
cd /opt/openwrt/trunk/bin/x86
sudo qemu-system-i386 -net nic -net bridge,br=br0 openwrt-x86-generic-combined-ext4.img
# configure 'lan' interface in '/etc/config/network'
# set ip address and correct mask for you network
# or
# change proto from 'static' to 'dhcp'
# restart network
/etc/init.d/network restart
# open web interface from you host
http://guest_ip
# login with root/root
# access CloudShark section
> Network -> CloudShark