Re: Configuration parsing with Args: variable argument list with minimum size?

Eddie Kohler <[email protected]>
Newsgroups gmane.network.routing.click
Organization Harvard University
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.