click-devirtualize tool does not work, why?

위승민 wesm at wins21.com
Thu Mar 21 19:54:29 EST 2002


Dear,
I wanted to test simple configuration, that is just forwarding any packets.
Here is the configuration.

FromDevice(eth0, 1) -> Counter -> Queue -> ToDevice(eth1);
FromDevice(eth1, 1) -> Counter -> Queue -> ToDevice(eth0);

And I know the bug that is FromDevice element can't work on promiscuous mode, so I fixed it.
The test is going, and I want to speed up the configuration through click-devirtualize tool. But It did not work.
While create specialized C++ source and compile it, some errors appeared, that is described here.

[root at Seungmin click-1.2.3]# click-devirtualize -k -f ./conf/sniperx-test.click
g++ -w -Wall -fno-exceptions -fno-rtti -fvtable-thunks -D__SMP__ -DHAVE_CONFIG_H
  DCLICK_LINUXMODULE -I/usr/local/share/click/src -I/usr/local/include -I/usr/sr
c/linux/include -O2 -c -DCLICK_PACKAGE -w -fno-access-control devirtualize.k.cc
devirtualize.k.cc:130:1: unterminated #ifdef
`/usr/local/bin/click-compile --directory=/tmp/clicktmp7067/ --target=kernel --pa
ckage=devirtualize.ko devirtualize.k.cc' failed

According to this error message, I think that specialize new C++ source have syntax errors.
Here is speciallized C++ source code arround line 130 and the source file is attatched.

#include <click/config.h>
#include "/home/click/click-1.2.3/elements/standard/counter.hh"
#include <click/error.hh>
#include <click/confparse.hh>
#include <click/handlercall.hh>

#ifdef HAVE_INT64_TYPES	// <------- here!!!!!!
void *
Counter_a_aCounter_a2::cast(const char *n)
{
  if (void *v = Counter::cast(n))
    return v;
  else if (strcmp(n, "Counter@@Counter at 2") == 0
	  || strcmp(n, "Counter") == 0)
    return (Element *)this;
  else
    return 0;
}

There is no #endif correspoding to #ifdef HAVE_INT64_TYPES.
I used pentium III CPU under click patched linux kernel 2.4.9.

There's something wrong?
Please give me answer.
Thank you.



More information about the click mailing list