[Click] click Digest, Vol 34, Issue 9
Homayara Akter
nodimekhla at yahoo.com
Thu Apr 6 14:51:23 EDT 2006
Hi,
I have written an element Checkmy() ,to check logical link layer of a sip packet.I put it on the /elements/local and also etc/samplepackage/
I wrote
make elemlist
make
But when I used it
FromDump(client.cap,FORCE_IP true)
->Checkmy()
->Print(ok)
->Discard
I got
"unknown element Checkmy()"
Homayara
click-request at pdos.csail.mit.edu wrote:
Send click mailing list submissions to
click at amsterdam.lcs.mit.edu
To subscribe or unsubscribe via the World Wide Web, visit
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
or, via email, send a message with subject or body 'help' to
click-request at amsterdam.lcs.mit.edu
You can reach the person managing the list at
click-owner at amsterdam.lcs.mit.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of click digest..."
Today's Topics:
1. Re: gen_config_roofnet.sh broken (Bob Keyes)
2. Re: Help with Click HashMap (Swati Sinha Deb)
3. Re: Help with Click HashMap (Swati Sinha Deb)
4. Re: strange string (Koen Segers)
5. Seg fault in IPFilter (Alastair McKinley)
6. ARP problem (Koen Segers)
----------------------------------------------------------------------
Message: 1
Date: Wed, 5 Apr 2006 02:48:29 -0400 (EDT)
From: Bob Keyes
Subject: Re: [Click] gen_config_roofnet.sh broken
To: click at pdos.csail.mit.edu
Message-ID:
Content-Type: TEXT/PLAIN; charset=US-ASCII
My original posting was incorrect: It appears as though
gen_config_roofnet.sh is simply behind the rest of click - lots of
elements have been deleted (such as GatewaySelector, SetSRChecksum, and
StripSRHeader) and the roofnet code doesn't reflect this.
------------------------------
Message: 2
Date: Wed, 05 Apr 2006 09:44:31 +0100
From: Swati Sinha Deb
Subject: Re: [Click] Help with Click HashMap
To: Eddie Kohler
Cc: click at pdos.csail.mit.edu
Message-ID: <87AABA213CE4C17C6D3F0277@[192.168.0.6]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi Eddie,
Sending the copy of packet does work. I was getting error "LinearIPLookup:
no gw for 90000e0" because I was calling _pkt_map.remove(pktid_) in my
callback. I thought that "remove" simply removes the entry from HashMap but
looking at the code seems it destroys the Key and the Value. If I don't
remove the entry can HashMap handle very very large number of entries?
Another question, clone won't help me to change the packet. I would like to
change the packet in my callback and send the packet from there to
downstream element. Please advice. Thanks.
regards,
Swati
--On 04 April 2006 10:08 -0700 Eddie Kohler wrote:
> You need to be much more specific about your problem.
>
>
> On Apr 4, 2006, at 9:12 AM, Swati Sinha Deb wrote:
>
>> Hi Eddie,
>>
>> Thanks for the reply.
>>
>>>
>>> _pkt_map.insert(_pktid, p->clone());
>>> ....
>>> return p;
>>>
>> I tried the changes you mentioned but I get loads of following
>> error as soon as I start reading the packets from my callback
>> function.
>>
>> LinearIPLookup: no gw for 90000e0
>>
>> It's probably as you explained the packets might be getting
>> modified or destroyed by the downstream element. Is there any other
>> way to get around this problem? Thanks.
>>
>> regards,
>> Swati
>>
>>
>>> Either that or return 0.
>>> Eddie
>>>
>>>
>>>
>>>>
>>>> void PktHandler::callback(uint32_t pktid_, int token_)
>>>> {
>>>> WritablePacket *p = _pkt_map.find(pktid_);
>>>> //here I am not able to read the packet p.
>>>> .....................
>>>> }
>>>>
>>>> regards,
>>>> Swati
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> click mailing list
>>>> click at amsterdam.lcs.mit.edu
>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>
>>
>>
>>
------------------------------
Message: 3
Date: Wed, 05 Apr 2006 11:45:49 +0100
From: Swati Sinha Deb
Subject: Re: [Click] Help with Click HashMap
To: Eddie Kohler
Cc: click at pdos.csail.mit.edu
Message-ID:
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi Eddie,
I did solve my problem by implementing it inside push method. In this way I
do not have to work on the copy of packet. And before removing the entry
from the hashmap I am calling uniqueify and then sending this uniqueify
packet to the downstream element. Thank you very much for your help.
regards,
Swati
--On 05 April 2006 09:44 +0100 Swati Sinha Deb
wrote:
> Hi Eddie,
>
> Sending the copy of packet does work. I was getting error
> "LinearIPLookup: no gw for 90000e0" because I was calling
> _pkt_map.remove(pktid_) in my callback. I thought that "remove" simply
> removes the entry from HashMap but looking at the code seems it destroys
> the Key and the Value. If I don't remove the entry can HashMap handle
> very very large number of entries? Another question, clone won't help me
> to change the packet. I would like to change the packet in my callback
> and send the packet from there to downstream element. Please advice.
> Thanks.
>
> regards,
> Swati
>
> --On 04 April 2006 10:08 -0700 Eddie Kohler wrote:
>
>> You need to be much more specific about your problem.
>>
>>
>> On Apr 4, 2006, at 9:12 AM, Swati Sinha Deb wrote:
>>
>>> Hi Eddie,
>>>
>>> Thanks for the reply.
>>>
>>>>
>>>> _pkt_map.insert(_pktid, p->clone());
>>>> ....
>>>> return p;
>>>>
>>> I tried the changes you mentioned but I get loads of following
>>> error as soon as I start reading the packets from my callback
>>> function.
>>>
>>> LinearIPLookup: no gw for 90000e0
>>>
>>> It's probably as you explained the packets might be getting
>>> modified or destroyed by the downstream element. Is there any other
>>> way to get around this problem? Thanks.
>>>
>>> regards,
>>> Swati
>>>
>>>
>>>> Either that or return 0.
>>>> Eddie
>>>>
>>>>
>>>>
>>>>>
>>>>> void PktHandler::callback(uint32_t pktid_, int token_)
>>>>> {
>>>>> WritablePacket *p = _pkt_map.find(pktid_);
>>>>> //here I am not able to read the packet p.
>>>>> .....................
>>>>> }
>>>>>
>>>>> regards,
>>>>> Swati
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> click mailing list
>>>>> click at amsterdam.lcs.mit.edu
>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>>
>>>
>>>
>>>
>
>
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
------------------------------
Message: 4
Date: Wed, 5 Apr 2006 13:32:50 +0200
From: Koen Segers
Subject: Re: [Click] strange string
To: "Szymon Jakubczak" ,
click at pdos.csail.mit.edu
Message-ID: <200604051332.55350.koen.segers at edpnet.be>
Content-Type: text/plain; charset="iso-8859-1"
On Wednesday 05 April 2006 03:37, Szymon Jakubczak wrote:
> BTW, I suggest using the StringAccum class:
>
> StringAccum sa;
> sa << ?"Hello with xid=" << _info->get_network_id() << " and seqnr="
> << _info->get_broadcast_seqnr() << ?" and size=" <<
> _info->get_network_size();
> _dump->add_detailed_info(sa.take_string());
Thx!
--
Koen Segers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20060405/b54870ad/attachment-0001.pgp
------------------------------
Message: 5
Date: Wed, 05 Apr 2006 12:34:57 +0100
From: Alastair McKinley
Subject: [Click] Seg fault in IPFilter
To: click at pdos.csail.mit.edu
Message-ID: <4433AB61.3070306 at qub.ac.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi everyone,
Im getting a reproducible seg fault in IPFilter when I run a particular
configuration at userlevel.
A similar config at kernel level does not cause any problems.
The configuration is as follows:
*******************************************************************************
FromDevice(eth0, PROMISC true) -> Tee(2);
Tee[0] -> IPFilter(dst tcp port 24, /* To drop SSH packets on
port 24 */
-);
Tee[1] -> ToHost(eth0);
IPFilter[0] -> Discard();
IPFilter[1] -> Queue(32); -> Timedsink(0.1);
*******************************************************************************
When I run this under gdb at userlevel I get this:
Program received signal SIGSEGV, Segmentation fault.
0x080a1156 in IPFilter::push (this=0x81a73e8, p=0x81ac040)
at ../elements/ip/ipfilter.cc:1215
1215 data = *(const unsigned *)(neth_data + off);
Does anyone know why this might be? Is there some more debugging I can
do here to find the problem?
Im running normally at kernel level, but this problem is stopping me
from debugging at userlevel.
Best regards,
Alastair
------------------------------
Message: 6
Date: Wed, 5 Apr 2006 16:02:31 +0200
From: Koen Segers
Subject: [Click] ARP problem
To: click at pdos.csail.mit.edu
Message-ID: <200604051602.34708.koen.segers at edpnet.be>
Content-Type: text/plain; charset="us-ascii"
I have changed the arp elements from click-1.4.3 a bit, so that they work with
my dynamicly generated ip. All that was needed was to change the static
IPAddress to a pointer to the dynamic IPAddress.
Recently I added merging of manet's to my DDHCP protocol. This implies that
some nodes reconfigure and get a new ip address.
The ARP elements become freaky now...
ARPQuerier crashes with a segmentation fault on the following rules of
insert_entry (function is added as appendix):
if (_age_tail)
ae->age_pprev = &_age_tail->age_next;
else
ae->age_pprev = &_age_head;
_age_tail = *ae->age_pprev = ae;
I tried to clear the arp table by calling clear_map but it gave the same
problem.
Can somebody explain me what's going on? And how I can overcome this problem?
I understand the meaning of ARP, but I can't figure out how this code works.
greetz
Appendix:
This is what I get from valgrind:
00:03:47:70:89:05: OLSRARPQuerier::there was no entry for 192.168.0.2
00:03:47:70:89:05: OLSRARPQuerier::possible error
==32368==
==32368== Conditional jump or move depends on uninitialised value(s)
==32368== at 0x8258A94:
Click::OLSRARPQuerier::insert_entry(Click::IPAddress const&,
Click::EtherAddress const&) (olsr_arpquerier.cc:303)
==32368== by 0x8257A9A: Click::AddARPEntry::simple_action(Click::Packet*)
(packet.hh:655)
==32368== by 0x81E6CFA: Click::Element::push(int, Click::Packet*)
(element.cc:848)
==32368== by 0x825CAF9: Click::OLSRClassifier::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x825C22B: Click::OLSRCheckPacketHeader::push(int,
Click::Packet*) (element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x8241C01: Click::IPFilter::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
00:03:47:70:89:05: OLSRARPQuerier::no error occured
link 192.168.0.1 <--> 192.168.0.2 insert | 31 161050
192.168.0.1 adding link to 192.168.0.2
Adding new neighbor: 192.168.0.2
No click upcall set!
00:03:47:70:89:04: OLSRARPQuerier::there was no entry for 192.168.0.1
00:03:47:70:89:04: OLSRARPQuerier::possible error
==32368==
==32368== Use of uninitialised value of size 4
==32368== at 0x8258AA5:
Click::OLSRARPQuerier::insert_entry(Click::IPAddress const&,
Click::EtherAddress const&) (olsr_arpquerier.cc:307)
==32368== by 0x8257A9A: Click::AddARPEntry::simple_action(Click::Packet*)
(packet.hh:655)
==32368== by 0x81E6CFA: Click::Element::push(int, Click::Packet*)
(element.cc:848)
==32368== by 0x825CAF9: Click::OLSRClassifier::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x825C22B: Click::OLSRCheckPacketHeader::push(int,
Click::Packet*) (element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x8241C01: Click::IPFilter::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368==
==32368== Invalid write of size 4
==32368== at 0x8258AA5:
Click::OLSRARPQuerier::insert_entry(Click::IPAddress const&,
Click::EtherAddress const&) (olsr_arpquerier.cc:307)
==32368== by 0x8257A9A: Click::AddARPEntry::simple_action(Click::Packet*)
(packet.hh:655)
==32368== by 0x81E6CFA: Click::Element::push(int, Click::Packet*)
(element.cc:848)
==32368== by 0x825CAF9: Click::OLSRClassifier::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x825C22B: Click::OLSRCheckPacketHeader::push(int,
Click::Packet*) (element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x8241C01: Click::IPFilter::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== Address 0x59 is not stack'd, malloc'd or (recently) free'd
==32368==
==32368== Process terminating with default action of signal 11 (SIGSEGV)
==32368== Access not within mapped region at address 0x59
==32368== at 0x8258AA5:
Click::OLSRARPQuerier::insert_entry(Click::IPAddress const&,
Click::EtherAddress const&) (olsr_arpquerier.cc:307)
==32368== by 0x8257A9A: Click::AddARPEntry::simple_action(Click::Packet*)
(packet.hh:655)
==32368== by 0x81E6CFA: Click::Element::push(int, Click::Packet*)
(element.cc:848)
==32368== by 0x825CAF9: Click::OLSRClassifier::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x825C22B: Click::OLSRCheckPacketHeader::push(int,
Click::Packet*) (element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x8241C01: Click::IPFilter::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
==32368== by 0x81E6D25: Click::Element::push(int, Click::Packet*)
(element.hh:314)
void OLSRARPQuerier::insert_entry(const IPAddress &ip, const EtherAddress
ðer)
{
int bucket = ip_bucket(ip);
//click_chatter("OLSRARPQuerier::insert_entry met ip %s en ethernet %s",
ip.s().cc(), ether.s().cc());
_lock.acquire_read();
ARPEntry *ae = _map[bucket];
while (ae && ae->ip != ip)
ae = ae->next;
if (ae)
{
//click_chatter("%s:\t:OLSRARPQuerier::there was allready an entry for %s",
_info->get_hw_addr().s().cc(), ip.s().cc());
if (ae->ok && ae->en != ether)
click_chatter("OLSRARPQuerier overwriting an entry");
ae->en = ether;
ae->last_response_jiffies = click_jiffies();
_lock.release_read();
}
else
{
click_chatter("%s:\tOLSRARPQuerier::there was no entry for %s",
_info->get_hw_addr().s().cc(), ip.s().cc());
_lock.release_read();
_lock.acquire_write();
if (_cache_size >= _capacity)
expire_hook(0, this);
if (ARPEntry *ae = new ARPEntry)
{
ae->ip = ip;
ae->en = ether;
ae->ok = 1; // the entry is automatically ok, since we are setting the
mac address
ae->polling = 0; // don't know what polling does ..
ae->head = ae->tail = 0; // no buffered packets
ae->last_response_jiffies = click_jiffies();
ae->pprev = &_map[bucket];
if ((ae->next = _map[bucket]))
ae->next->pprev = &ae->next;
_map[bucket] = ae;
click_chatter("%s:\tOLSRARPQuerier::possible error",
_info->get_hw_addr().s().cc());
if (_age_tail)
ae->age_pprev = &_age_tail->age_next;
else
ae->age_pprev = &_age_head;
_age_tail = *ae->age_pprev = ae;
click_chatter("%s:\tOLSRARPQuerier::no error occured",
_info->get_hw_addr().s().cc());
ae->age_next = 0;
}
_lock.release_write();
}
}
--
Koen Segers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20060405/2fdb582e/attachment.pgp
------------------------------
_______________________________________________
click mailing list
click at amsterdam.lcs.mit.edu
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
End of click Digest, Vol 34, Issue 9
************************************
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the click
mailing list