[Click] station.click complaining about FromHost, same dev_name

Sridhar Srinivasan sridhar at cs.washington.edu
Wed May 11 04:10:40 EDT 2005


Hi,

I seem to be seeing the same problem as the person below. I am using the madwifi.stripped driver with a netgear wag511. I have a 2.4.20 kernel and I patched it with both wifi and non-wifi patches.
/sbin/iwconfig ath0 works. /sbin/iwlist ath0 scan turns up nothing (though that may be normal).

My exact error when running 'click station.click' is:

station.click:109: While initializing 'FromHost at 41 :: FromHost':
  unspecified error
station.click:106: While initializing 'ToHost at 40 :: ToHost':
  ToHost(station) requires an initialized FromHost with the same dev_name
Router could not be initialized!
click: ../lib/routerthread.cc:104: RouterThread::~RouterThread(): Assertion `empty()' failed.
Aborted


When I run the one-line click file that the person below is using, I get the same error he did. Of the two solutions suggested below, option 2 does not seem possible give this on the madwifi.stripped page:
<snippet>
	Next, go to your build director and run the following command 

	  $ CLICKDIR/click_dir/configure --enable-wifi  --disable-linuxmodule
	  $ gmake all install
</snippet>
Notice the disable-linuxmodule.

So how do I disable linux routing? Is that my only problem given the station.click errors above?

I have been stuck on this for a few days, so any help is appreciated.
Thanks a lot!
Sridhar

---------------------------------
Thread follows...
---------------------------------

David,

There is a FromHost userlevel element, look in
<click>/elements/userlevel. As far as I know FromHost allocates the
tun device required by ToHost.

Regards

Beyers


On Sun, 20 Feb 2005 10:17:53 +0100, David Fusté
<f2308030 at est.fib.upc.edu> wrote:
> Ok Beyers,
>
> If I choose option #1 (Disable routing on Linux and have Click do the
> routing/switching), I noticed to pass packets from device to linux I
> have to use the ToHost element with a tun/tap device:
>
> TOHOST MAN PAGE:
>  > ToHost.u: Click element; sends packets to Linux via Universal TUN/TAP
> device.
>  > SYNOPSIS: ToHost([DEVNAME])
>  > DESCRIPTION:
>  > Hands packets to the ordinary Linux protocol stack. Expects packets
> with Ethernet headers.
>  > You should probably give Linux IP packets addressed to the local
> machine (including broadcasts), and a copy of each ARP reply.
>  > ToHost requires an initialized FromHost(n) with the same DEVNAME.
>
> My another question is: why (like the last line says) does ToHost
> require an initialized FromHost(n) with the same DEVNAME?
> Yes, I know FromHost element installs a fake interface called DEVNAME,
> and changes the routing table so that every packet destined for
> ADDR/MASK is sent through that interface, but it isn't possible use a
> FromHost element because I'm in user level mode and FromHost element is
> only available in kernel mode! (don't read my first email, there is a
> mistake related to this)
>
> Two thanks!
> David
>
>
> Beyers Cronje wrote:
>
> >Hi David,
> >
> >Userlevel Click runs ontop of linux as a packet sniffer, in other
> >words the kernel still processes each packet. Each packet received
> >gets processed twice, once for linux, once for click.
> >
> >You have a couple of options
> >
> >1) Disable routing on Linux and have Click do the routing/switching
> >2) Use Click kernel module
> >
> >Beyers
> >
> >
> >On Sat, 19 Feb 2005 15:21:02 +0100, David Fusté
> ><f2308030 at est.fib.upc.edu> wrote:
> >
> >
> >>Hi,
> >>I'm novice in Click and I have simple questions. I'm working with click
> >>in user level mode.
> >>
> >>This is my config file:
> >>
> >>% cat prova.click
> >>FromDevice(wlan0)->Print(ok)->Discard;
> >>%
> >>
> >>When I run it, obviously, click starts to capture packets. Then, when I
> >>open the browser, click starts to print the packets.
> >>My first question is: why does the browser correctly load the web pages?
> >>i.e. why doesn't click discard the packets?
> >>And in relation to this, since click doesn't discard packets and it pass
> >>them to linux, what's the meaning of the ToHost(DEVNAME) element?
> >>
> >>And it isn't all, if I run this other config file:
> >>
> >>% cat prova2.click
> >>FromDevice(wlan0)->Print(ok)->ToHost(wlan0);
> >>% click prova2.click
> >>prova2.click:1: While initializing 'ToHost at 3 :: ToHost':
> >> ToHost(wlan0) requires an initialized FromHost with the same dev_name
> >>Router could not be initialized!
> >>%
> >>
> >>why does ToHost element need a FromHost element? I only want to capture
> >>packets from device to linux, not from linux to device.
> >>Moreover, there isn't a FromHost element in user level mode! Why does
> >>ToHost user level element want a FromHost kernel element? It isn't possible.
> >>
> >>I don't know where I am wrong. Help me please.
> >>Thank you!
> >>
> >>David
> >>_______________________________________________
> >>click mailing list
> >>click at amsterdam.lcs.mit.edu
> >>https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>
> >>
> >>
>
>




More information about the click mailing list