[Click] Re: Where are packet types used by Classifier element defined?

Eddie Kohler kohler at cs.ucla.edu
Tue Jul 5 12:45:37 EDT 2005


Bita

As Bart says, those offsets are defined outside of Click, by various  
standards.  But if you want to look just at Click's files, you can  
get a lot of this information from the headers in include/clicknet.   
For example include/clicknet/ip.h gives the byte offset for every  
field in a comment.  For some other headers, though, you'll have to  
(gasp) use arithmetic.  The "12" in "Classifier(12/0800)" comes from  
the fact that ether_type is at offset 12 into the Ethernet header, as  
defined by the Ethernet standards.  You can figure this out from  
'struct click_ether's definition.  I've added some more comments just  
now as well.

Eddie


On Jun 29, 2005, at 1:32 PM, betamaz wrote:

> Hi,
>
> Thanks Bart. I know that click uses marcros to define the RFC  
> protocols, for
> example ehter.h defines the ARP RFC 826.
>
> /* ARP protocol opcodes. */
> #define ARPOP_REQUEST 1 /* ARP request */
> #define ARPOP_REPLY 2 /* ARP reply */
>
> Could you direct me to where I can find the definitions of the  
> offset values
> (for use by the Classifier element)?
>
> Bita.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>



More information about the click mailing list