[Click] FreeBSD 6.0

Eddie Kohler kohler at CS.UCLA.EDU
Mon Apr 3 15:05:03 EDT 2006


You can use them at user level, either by using the ControlSocket  
element (for interactive investigation) or by using a Script element  
(for timer-based reporting).  For example:

    $ click -p 8000 -e ' ... arpq::ARPQuerier(...) ... ' &
    $ telnet localhost 8000
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Click::ControlSocket/1.1
    READ arpq.table                           <<<  I TYPED THIS LINE
    200 Read handler 'arpq.table' OK
    DATA ....

Eddie


On Apr 3, 2006, at 11:18 AM, Andrew Chanler wrote:

> Thanks for the reply.
>
> I found a way to run a NAT in userspace on my freeBSD machine so  
> that I
> do not need to use the kernel module.  I setup freeBSD's packet filter
> to block everything except ssh connections (so I can still connect to
> it).  Then I use FromDevice and ToDevice Click elements to read  
> packets
> from both of my NIC cards.
>
> One other question. Because I am pretty new to click, I haven't  
> figured
> out how to use element handlers.  For example, when click is  
> running in
> user space, how can I view the arp table that my ARPQuerier has built
> up?
>
> Andrew Chanler
>
>
> --- Eddie Kohler <kohler at cs.ucla.edu> wrote:
>
>> Hi Andrew,
>>
>> Our FreeBSD kernel support tends, unfortuantely, to rot quickly, as I
>> don't
>> believe anyone uses it day to day.
>>
>> The "invalid conversion from `void*' to `T*'" errors can probably be
>> fixed
>> with -fpermissive.
>>
>> The last errors are maybe more serious, and indicate an interface
>> difference
>> between 5.0 (which is what we currently more or less support) and
>> 6.0.  I
>> don't know what to do there.
>>
>> We'll accept any patches that make this situation better!
>> Eddie
>>
>>
>> Andrew Chanler wrote:
>>> Has anyone built the freebsd kernel module on a FreeBSD 6.0
>> machine?  I
>>> am having build problems.  first ./configure failed because it
>> couldn't
>>> /usr/src/sys/kern/vnode_if.pl and I searched around and found
>>> /usr/src/sys/tools/vnode_if.awk which does the samething.  So I
>> fixed
>>> ./configure and the makefile to use that awk script.  But now I get
>> a
>>> much tougher error.  anyone seen something like this before?
>>>
>>>
>>> g++ -w -W -Wall -fno-exceptions -fno-rtti  -DHAVE_CONFIG_H
>> -nostdinc
>>> -I../include -I../include -I. -I.. -I. -I/usr/include
>> -DCLICK_BSDMODULE
>>> -DBSD_NETISRSCHED -O2 -g -c module.cc
>>> In file included from /usr/include/sys/systm.h:246,
>>>                  from modulepriv.hh:13,
>>>                  from module.cc:20:
>>> /usr/include/sys/libkern.h: In function `uint32_t crc32_raw(const
>>> void*, size_t, uint32_t)':
>>> /usr/include/sys/libkern.h:118: error: invalid conversion from
>> `const
>>> void*' to `const uint8_t*'
>>> In file included from /usr/include/sys/vnode.h:547,
>>>                  from modulepriv.hh:16,
>>>                  from module.cc:20:
>>> ./vnode_if.h:9:30: vnode_if_typedef.h: No such file or directory
>>> ./vnode_if.h:10:31: vnode_if_newproto.h: No such file or directory
>>> In file included from ../include/click/glue.hh:50,
>>>                  from ../include/click/element.hh:4,
>>>                  from ../include/click/router.hh:4,
>>>                  from modulepriv.hh:21,
>>>                  from module.cc:20:
>>> /usr/include/sys/mbuf.h: In function `mbuf* m_get(int, short int)':
>>> /usr/include/sys/mbuf.h:376: error: invalid conversion from `void*'
>> to
>>> `mbuf*'
>>> /usr/include/sys/mbuf.h: In function `mbuf* m_getclr(int, short
>> int)':
>>> /usr/include/sys/mbuf.h:389: error: invalid conversion from `void*'
>> to
>>> `mbuf*'
>>> /usr/include/sys/mbuf.h: In function `mbuf* m_gethdr(int, short
>> int)':
>>> /usr/include/sys/mbuf.h:403: error: invalid conversion from `void*'
>> to
>>> `mbuf*'
>>> /usr/include/sys/mbuf.h: In function `mbuf* m_getcl(int, short int,
>>> int)':
>>> /usr/include/sys/mbuf.h:414: error: invalid conversion from `void*'
>> to
>>> `mbuf*'
>>> /usr/include/sys/mbuf.h: In function `void m_clget(mbuf*, int)':
>>> /usr/include/sys/mbuf.h:438: error: invalid conversion from `void*'
>> to
>>> `char*'
>>> /usr/include/sys/mbuf.h: In function `void m_tag_init(mbuf*)':
>>> /usr/include/sys/mbuf.h:697: error: invalid conversion from `void*'
>> to
>>> `m_tag*'
>>> /usr/include/sys/mbuf.h: In function `m_tag* m_tag_find(mbuf*, int,
>>> m_tag*)':
>>> /usr/include/sys/mbuf.h:773: error: invalid conversion from `void*'
>> to
>>> `m_tag*'
>>> In file included from ../include/click/element.hh:7,
>>>                  from ../include/click/router.hh:4,
>>>                  from modulepriv.hh:21,
>>>                  from module.cc:20:
>>> ../include/click/packet.hh: In member function `net_device*
>>> Packet::device_anno() const':
>>> ../include/click/packet.hh:230: error: invalid conversion from
>> `void*'
>>> to `net_device*'
>>> ../include/click/packet.hh: In static member function `static
>> Packet*
>>> Packet::make(mbuf*)':
>>> ../include/click/packet.hh:474: error: invalid conversion from
>> `void*'
>>> to `int*'
>>> ../include/click/packet.hh:474: error:   initializing argument 4 of
>>> `mbuf* m_pulldown(mbuf*, int, int, int*)'
>>> module.cc: At global scope:
>>> module.cc:373: error: invalid conversion from `vfsops*' to `u_int'
>>> module.cc:373: error: invalid conversion from `int' to `vfsops*'
>>> module.cc:382: error: expected constructor, destructor, or type
>>> conversion before '(' token
>>> module.cc:382: error: expected `,' or `;' before '(' token
>>> gmake: *** [module.o] Error 1
>>> *** Error code 2
>>>
>>>
>>>
>>> I am trying to run some of the example click files that do NATing,
>> but
>>> they all seem to use ToHost, so I can't run them in userspace.  If
>> I
>>> can't get this BSD module to build, is there away to use something
>> like
>>> mazu-nat.click or thomer-nat.click in userspace?
>>>
>>> Thanks,
>>> Andrew Chanler
>>>
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam?  Yahoo! Mail has the best spam protection around
>>> http://mail.yahoo.com
>>> _______________________________________________
>>> click mailing list
>>> click at amsterdam.lcs.mit.edu
>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



More information about the click mailing list