Well, you could make it so that click-align knew that there were no alignment guarantees after your element (assuming that your element actually does not provide any alignment guarantees)
I think that you would do this by adding a clause in click-align.cc with your element and GeneratorAligner(Alignment(1, 0)) as the type of alignment that your element provided. However, some elements that pull an arbitrary number of bytes (like StripToNetworkHeader) can likely be given a GeneratorAligner of (4, 0), because the network header is (almost) always 4 byte aligned. Cliff On Tue, Nov 9, 2010 at 10:56 AM, Roberto Riggio < [email protected]> wrote: > Hi, > > which is the right approach (if any) to handle the alignment info (in > the click_align tool) > for an element which pulls a variable number of bytes from a packet. The > amount of bytes > is contained in the header itself. > > I was thinking about putting a classifier element before the custom > element (and then handle > the alignment for each case), but this solution does not look very elegant. > > Any idea > R. > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
