kohler / click

The Click modular router: fast modular packet processing and analysis
Other
740 stars 321 forks source link

A newbie question #387

Open gitpop opened 6 years ago

gitpop commented 6 years ago

I am new to Click and just installed it and try to run, I got following errors:

root@UB33:~/git/click-johan/click# userlevel/click -p 10000 conf/sampler.click conf/sampler.click:19: undeclared element PollDevice' conf/sampler.click:21: undeclared elementToHostSniffers'

What steps did I miss?

Thanks, Hui

bcronje commented 6 years ago

PollDevice and ToHostSniffers are both elements only available in the linux kernel driver of Click as noted in sampler.click:

// This configuration will only run in the kernel (so you must use // 'click-install sampler.click').

Seeing that you are running the userlevel driver you need to use elements that are either userlevel specific like FromDevice or elements that can run in both userlevel and kernel mode. In most cases elements that interact with devices like FromDevice/ToDevice have either a kernel mode or userlevel equivalent. PollDevice and ToHostSniffers are two of the very few elements that are only available in the kernel driver. Most other elements can freely be used in either kernel mode of userlevel drivers.

Elements are documented as such in the element documentation.

gitpop commented 6 years ago

Thank you for such a prompt response! I am able to use test-ping-userlevel.click to test out.
Currently, I am running the click on host. Could yo please provide a link about installing click on VM? Thanks! Hui

bcronje commented 6 years ago

Just configure and install. Typical process assuming no kernel mode:

./configure --enable-userlevel --disable-linuxmodule
sudo make install

See https://github.com/kohler/click/blob/master/INSTALL.md