[RFC} New Commanline Syntax for Telnet interface

Jean-Paul Saman jpsaman at wxs.nl
Sun Sep 1 23:20:56 CEST 2002


Tristan Leteurtre wrote:
> On Fri, Aug 30, 2002, Jean-Paul Saman wrote:

>>channel <name> <channeltype=[local|network]> 
>><dest_host=[FQDN|ipaddress]> <dest_port> <type 
>>(unicast|multicast|broadcast)> [domain (inet4|inet6)] [ttl] [intf] 
>>[--add] [--delete]
> 
> 
> This actual syntax does not fit me (sorry to tell you only now :),
> because this imply to type all the parameters (or random ones) when
> deleting a channel or a program :
> 
> 

This was my problem too. The real problem here is that the parser class 
cannot handle it.

>>channel bogey network bogey.humprey.com 1234 unicast domain inet4 --add
> 
> 
> To delete it, one would have to type :
> channel bogey network bogey.humprey.com 1234 unicast --delete
> 
> and it would be better to have : 
> channel bogey --delete
> 

This would be nice. The questions is do we want to sacrifise syntax 
checking for convenience.

> which is not possible, since <name> <channeltype> ... are compulsory.
> 

This can always be checked in the Manager class where the command is 
handled. It circumvents the arguments checking from the parser which is 
not nice, but currently this is the only way withour rewriting the 
Parser class. This is a tradeoff.

> So we could make <name> <channeltype> (...) become optionnal, but we
> would not get the benefit of arguments checking.
> 


> So I propose to split up in 2 commands :
> 
> channeladd <name> <channeltype=[local|network]> 
>  <dest_host=[FQDN|ipaddress]> <dest_port> <type 
>  (unicast|multicast|broadcast)> [domain (inet4|inet6)] [ttl] [intf] 
> 
> and 
> 
> channeldelete <name> ,
> 
> and the same for input and program.
> 
> Do you think it is a better idea ?

No, I do not like this idea. It does not solve the real problem, which 
lies in the Parser class. And it means that every configure command will 
a special delete command. This will make the use more cloudy. The idea 
was to make thing more clear/convenient.

I'd rather go for less syntax checking now instead of adding a new 
command for that. If we make the tradeoff I'd prefer this syntax:

channel bogey --delete

and sacrifice syntax checking.

Solving the problem
=====================
To get syntax checking back the parser should be rewritten to include a 
syntax tree. This will make it possible to have commands like, "channel 
.... ... .... --add" and "channel <name> --delete" handled by the parser.

Adding this feature takes quite some work. Though my time is limited and 
do not know when I get around to this. So help is welcome.

Greetings,
Jean-Paul Saman.




-- 
This is the vls-devel mailing-list, see http://www.videolan.org/vls-devel/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vls-devel mailing list