On Mon, 2005-01-17 at 11:56, Thomas Graf wrote:
> * jamal <1105979807.1078.16.camel@xxxxxxxxxxxxxxxx> 2005-01-17 11:36
[..]
> > Didnt follow this - uses the same code as command line. What logic gets
> > duplicated?
>
> The parsing of top level nodes.
Probably not very big deal - will just force you to type in
the commands in full over and over in your batch file
> > > - it doesn't allow any commenting
> >
> > Trivial thing you can fix in about 33.5 seconds ;-
>
> Simple full-line comments yes, mid-line comments no. -batch
> is also not able to split things across multiple lines.
>
> I want my scripts to look like this:
>
> /**
> * filter dla_fp
> * match DLA traffic at lower watermark
> */
> tc filter add
> dev %DEV
> parent 1:12
> prio 40
> protocol all
> basic match meta(nfmark eq %LOW_WATERMARK)
> and (
> nbyte("\x0\x1\x2\x3\x4" at 4 layer 2) /* 00 01 02 03 04
> (dla fp) */
> or u32(ip src 10.0.0.0/8)
> )
> flowid 1:20
>
>
It does look clean. - btw look at Werners approach on tcng as well.
> > > - it doesn't get along with my more complicated ematch parsing
> >
> > Example?
>
> stuff like nbyte, kmp or regexp rely on quoted strings and those
> would be destroyed if they'd contain whitespaces.
sounds reasonable.
Another thing that would be really neat is to have a iso like cli
(something like what zebra has) so you can go down the parse tree to
say the ematch level and just start typing away these commands.
Should probably be easy to rip off the vtysh stuff off zebra or
use libio or something along those lines to do this.
cheers,
jamal
|