[Click] Help with Click HashMap

Swati Sinha Deb Swati.Deb at bristol.ac.uk
Wed Apr 5 04:44:31 EDT 2006


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 <kohler at CS.UCLA.EDU> 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
>>>
>>
>>
>>





More information about the click mailing list