Hi Bart,

What I would do is use Args for the mandatory & optional arguments, but 
rather than end with .complete(), end with .consume(). Then process the 
leftovers however best makes sense.

For an example, see UDPRewriter, which strips off a bunch of keywords 
with Args(this, errh).bind(conf).read........consume().

Make sense?
Eddie


On 1/19/12 10:57 AM, Bart Braem wrote:
> Hi all,
>
> I'm creating a new element which would be something like HostEtherFilter but 
> with multiple ethernet addresses and less focused on host based 
> functionality. To do this, I'm trying to parse a configuration consisting of
> - some mandatory arguments
> - some optional keywords
> - and then a variable size argument list with a minimum size
> What would be the cleanest way to implement this with the recent Args 
> argument parsing code? Especially the last part, the variable size argument 
> list, seems tricky to do properly. I've looked into the regular Classifier 
> etc, but these elements do not seem to use the Args code.
>
> best regards,
> Bart
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to