[Click] DropBroadcasts
Eddie Kohler
kohler at cs.ucla.edu
Mon Jun 13 09:48:33 EDT 2005
That's the point -- the implementation in linuxmodule doesn't need to set the
annotations, because the device drivers already do. Checkout eth_type_trans in
LINUX/net/ethernet/eth.c
Eddie
f2308030 at est.fib.upc.edu wrote:
> Quoting Eddie Kohler <kohler at cs.ucla.edu>:
>
>> Hi,
>>
>> f2308030 at est.fib.upc.edu wrote:
>>
>>> Hi,
>>> 1. I want to use the DropBroadcats element in kernel mode.
>>> The man page says...
>>> "Drop packets that arrived as link-level broadcast or multicast. Used to
>>> implement the requirement that IP routers not forward link-level
>>> broadcasts.
>>> Looks at the packet_type_anno annotation, which FromDevice(n) sets."
>>> ...but I haven't found the sentence that sets the
>>> packet_type_annotation in the
>>> linuxmodule/FromDevice element. I only have found this sentence in the
>>> userlevel/fromdevice element.
>>
>>
>> The kernel FromDevice and PollDevice elements should set this annotation
>> correctly. I'll update the documentation.
>
>
> Ok, but I don't refer to the documentation. I refer to the implementation.
> I haven't found the sentence that sets the packet_type_annotation in the
> elements/linuxmodule/fromdevice.cc.
> I only have found this sentence...
>
> // set packet type annotation
> if (p->data()[0] & 1) {
> if (memcmp(bcast_addr, p->data(), 6) == 0)
> p->set_packet_type_anno(Packet::BROADCAST);
> else
> p->set_packet_type_anno(Packet::MULTICAST);
>
> ... in the elements/userlevel/fromdevice.cc.
> Is this an error?
>
>>> Since DropBroadcasts man page say nothing about if DropBroadcasts
>>> element is
>>> only for userlevel, is this an error? or a problem?
>>>
>>> 2. A simple question. Another element like DropBroadcasts but for
>>> IP-level and
>>> not for link-level exists already? I haven't found it but before
>>> start to make
>>> it... :)
>>
>>
>> I don't think so! Go for it! Then send it to the list.
>
>
> OK!
>
> Thank you very much!
>
>> Eddie
>>
>>>
>>> Thank you very much!
>>> _______________________________________________
>>> click mailing list
>>> click at amsterdam.lcs.mit.edu
>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>
>>
>>
>
>
More information about the click
mailing list