Yanfeng Zhang | 1 Jul 2008 16:21
Picon

how to debug click?

Hello,

I am a beginner of click, and want to have an overall view of
click's structure, while I think debugging is a good way. Then, how to debug
click? Should I use gdb or there is some other debugging tools?

Thanks in advance!

-Yanfeng
Beyers Cronje | 1 Jul 2008 17:31
Picon
Gravatar

Re: how to debug click?

For userlevel Click you can use gdb. For information purposes I use
click_chatter a lot to print statements to the screen. You can also use the
Print element in your configuration to "debug" packet flow.

On Tue, Jul 1, 2008 at 4:21 PM, Yanfeng Zhang <threewells14 <at> gmail.com>
wrote:

> Hello,
>
> I am a beginner of click, and want to have an overall view of
> click's structure, while I think debugging is a good way. Then, how to
> debug
> click? Should I use gdb or there is some other debugging tools?
>
> Thanks in advance!
>
> -Yanfeng
> _______________________________________________
> click mailing list
> click <at> amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
Michael Voorhaen | 2 Jul 2008 12:49
Picon

Re: how to debug click?

I also suggest using valgrind (http://valgrind.org/). While it is a  
bit steep at first, you can use to check for mistakes in memory  
management (e.g. forgetting to free memory or reading out of bounds  
when parsing a packet) and profile a click script for Tasks that are  
taking up too much CPU. I regularly run it on all my C/C++ code to  
detect these kinds of problems in an early stage.

Groeten,
Michael

-------------------------
IBBT - PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
Campus Middelheim, G3.30
Middelheimlaan 1
B-2020 Antwerpen, Belgium
Phone: +32 (0)3 265.32.91
Fax: +32 (0)3 265.37.77
Web: www.pats.ua.ac.be/michael.voorhaen

On 01 Jul 2008, at 17:31, Beyers Cronje wrote:

> For userlevel Click you can use gdb. For information purposes I use
> click_chatter a lot to print statements to the screen. You can also  
> use the
> Print element in your configuration to "debug" packet flow.
>
> On Tue, Jul 1, 2008 at 4:21 PM, Yanfeng Zhang <threewells14 <at> gmail.com>
> wrote:
(Continue reading)

Miguel Naranjo | 2 Jul 2008 19:19
Picon
Picon
Favicon

Creating IP packets inside an element!!

Hello All,

I have an element with the IP source, IP destination, MAC source, and 
MAC destination. What is the easiest way to create a packet with valid 
headers in the way that EtherEncap and IPEncap do it from my element? Do 
I need to set all the fields of the IP header manually for example?

Thanks and Regards,

Miguel Naranjo
MSc Data Communications, Networks and Distributed Systems
University College London.
Roman Chertov | 2 Jul 2008 19:31
Picon
Favicon

Re: Creating IP packets inside an element!!

Miguel Naranjo wrote:
> Hello All,
> 
> I have an element with the IP source, IP destination, MAC source, and 
> MAC destination. What is the easiest way to create a packet with valid 
> headers in the way that EtherEncap and IPEncap do it from my element? Do 
> I need to set all the fields of the IP header manually for example?

Take a look at FastUDPSrc element for reference.

Roman

> 
> 
> Thanks and Regards,
> 
> Miguel Naranjo
> MSc Data Communications, Networks and Distributed Systems
> University College London.
> _______________________________________________
> click mailing list
> click <at> amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> 
aka aka | 3 Jul 2008 23:32
Picon

Help on feedback of transmitted packets

Dear All,

I am using latest version of click (user level ) with madwifi drivers
(0.9.4) on wireless nodes running Ubuntu linux (2.6.22-14). I have setup a
very simple testbed of three wireless nodes which are communicating in
"adhoc" mode in 802.11b.  On one wireless node, I want to record statistics
of  transmitted packets: retried, acked, or dropped. After going through
click and madiwifi documentation (including madwifi stripped) and related
mailing lists,  I had written several variation of click script files to get
the feedback about transmitted packets. However,  I have not been
successful.  I have gone through lot of documentation before posting  the
question.

I also wanted to use old madwifi drivers (stripped) as given on the "
http://pdos.csail.mit.edu/~jbicket/madwifi.stripped/". However, the "README"
file in the driver directory asks to patch the linux kernel before compiling
the driver. As i could not find the required patch for the kernel
(2.6.22-14) i am running, i could not try it, and have been using userlevel
click.

Below I am providing a simple click script file which i was using for
obtaining the desired feedback. On the node where i want to record the
statistics,  the wireless interface is configured as ath0.

FromDevice(ath0)
->ExtraDecap()
->FilterFailures()
->Print(0)
-> tx_filter :: FilterTX()
tx_filter[1]->PrintTXFeedback(A)->Queue()->Discard;
(Continue reading)

Harald Schiöberg | 4 Jul 2008 10:02
Picon

Re: Help on feedback of transmitted packets


aka aka wrote:
> Dear All,
> 
> I am using latest version of click (user level ) with madwifi drivers
> (0.9.4) on wireless nodes running Ubuntu linux (2.6.22-14). I have setup a
> very simple testbed of three wireless nodes which are communicating in
> "adhoc" mode in 802.11b.  On one wireless node, I want to record statistics
> of  transmitted packets: retried, acked, or dropped. After going through
> click and madiwifi documentation (including madwifi stripped) and related
> mailing lists,  I had written several variation of click script files to get
> the feedback about transmitted packets. However,  I have not been
> successful.  I have gone through lot of documentation before posting  the
> question.
> 
> I also wanted to use old madwifi drivers (stripped) as given on the "
> http://pdos.csail.mit.edu/~jbicket/madwifi.stripped/". However, the "README"
> file in the driver directory asks to patch the linux kernel before compiling
> the driver. As i could not find the required patch for the kernel
> (2.6.22-14) i am running, i could not try it, and have been using userlevel
> click.

the stripped driver is not needed anymore, as madwifi "monitor"
virtual-interfaces do the same thing.

set up your device using "wlanconfig ... wlanmode monitor ..."

you also want to run
echo '804' > /proc/sys/net/ath0/dev_type

(Continue reading)

Giovanni Di Stasi | 4 Jul 2008 12:00
Picon

Pass packets to click through an handler

Hi,
I'd like to pass packets to Click through an handler. Are there handlers that 
let me pass packets to Click (in a binary form)?

I think I coul also add a tap interface to the node (by means of a FromHost); 
in that case I would have to pass packets in an Ethernet format (and answer 
to ARP queries), while in fact I want to pass raw packets.

Thanks

--

-- 
Giovanni Di Stasi, Junior Researcher
Dipartimento di Informatica e Sistemistica
Università degli Studi di Napoli "Federico II"
Via Claudio, 21 - 80125 Napoli - Italy

Phone:    +39 081 7683821
Fax:      +39 081 7683816
E-mail:   giovanni.distasi <at> unina.it
Tushar Soni | 4 Jul 2008 17:06
Picon
Favicon

No network header/Segmentation fault

Hi everyone,

I have a scenario where coding some packets at the access point and decoding the packets at receiver side
using click. Now when i decode the packet and use Print() element, the packet structure and ip header looks
ok. But when i use IPPrint it gives me segmentation fault. When i try to get the ip
header(Packet::ip_header()) or the udp header(Packet::udp_header()) it returns null (so this is the
reason why IPPrint does not work). The commented code should explain better about what i am doing and the
problems i am facing. I would be glad if someone could help me figure out what i am doing wrong. Thanks.

Tushar 

For coding i combine a certain number of packets, from ip header onwards(ip header included). So when i
decode i should have a packet from ipheader onwards.

void
Decoder::check_uncoded(Packet *p) //p is the coded packet
{
    FoundPacketsList found_pkts_list;// this is typedef of type : Vector<Packet *>
    WritablePacket *wp = p->uniqueify();
   xor_header *xor_h_cod = (xor_header *)wp->data();//i have created my own header
    int entries_cod = xor_h_cod->get_entries();
    int coded_hlen = xor_header::get_header_length(entries_cod);
    for( int i = 0; i < entries_cod; i++)
    {
        //_ddhq is a type if queue and here i am basically checking if the ipid of the unocoded packet
       //is present in the coded header that i created
        int location =  _ddhq.is_present(xor_h_cod->get_entry_ipid(i));
        if( location >= 0 )
        {
                //if the id is in the coded header i add it to a list
(Continue reading)

Beyers Cronje | 4 Jul 2008 17:27
Picon
Gravatar

Re: No network header/Segmentation fault

Hi,

You have to use either MarkIPHeader of CheckIPHeader elements to set the IP
header annotations.

Beyers

On Fri, Jul 4, 2008 at 5:06 PM, Tushar Soni <omega_marines <at> yahoo.com> wrote:

> Hi everyone,
>
> I have a scenario where coding some packets at the access point and
> decoding the packets at receiver side using click. Now when i decode the
> packet and use Print() element, the packet structure and ip header looks ok.
> But when i use IPPrint it gives me segmentation fault. When i try to get the
> ip header(Packet::ip_header()) or the udp header(Packet::udp_header()) it
> returns null (so this is the reason why IPPrint does not work). The
> commented code should explain better about what i am doing and the problems
> i am facing. I would be glad if someone could help me figure out what i am
> doing wrong. Thanks.
>
> Tushar
>
> For coding i combine a certain number of packets, from ip header onwards(ip
> header included). So when i decode i should have a packet from ipheader
> onwards.
>
> void
> Decoder::check_uncoded(Packet *p) //p is the coded packet
> {
(Continue reading)


Gmane