|
|||||||||||
|
Re: linux-ipsec: syntax conventions, part 1
From: John Gilmore <gnu(at)toad.com>
Date: Wed Mar 18 1998 - 15:00:29 EST
> Having precisely the optimal syntax in any particular context is not
And in particular, the conventions we use should match traditional Unix and Internet usage. This means not having piles of metacharacters like @ and : and .. and such, but instead using positional parameters and -options to specify arguments. > Octal values, should we have cause to use any, are always written with a
> Codes (enumerations selecting, e.g., encryption algorithms) and flags
I could also see using individual letters for them, as in chmod and ls, or in "ps" displays. > left-to-right existing practice that we should conform to? I do think
I think we shouldn't obsess to this extent. > An IPv4 subnet mask syntactically is like an address, with the addition
We should never use subnet masks. We should designate subnets using IP address prefix notation: a.b.c.d/bits where bits is how many high-order bits of a.b.c.d are in the subnet mask. E.g. 140.174.2.0/24 has a 24-bit network number and an 8-bit host number. > A range of IPv4 addresses is written as two addresses separated by a pair
Dots can also appear in DNS names, and let's not depend on being finicky about whether trailing dots can appear in them, etc. Do we ever need to specify ranges that aren't also whole subnets? > If a command argument (etc.) is written as @ immediately followed by a
This shouldn't be a general rule for argument parsing; we aren't on DOS. There should just be a way to specify keys from a file. I would suggest using a slash or backslash as an indicator of a file name, rather than "@", which tends to mean a network address. I.e. if the key is hex values, it's in the command line; if it starts with a slash or backslash, it's the start of an absolute file name. > A tuple is formed out of values by separating them by color (:) or
A truly bad idea. If an IP address is going to be part of a tuple, then this will screw up IPv6 addresses. We shouldn't need to retool to support IPv6. > For a number of purposes, it is desirable to group individual values into
My suggestion is to handle these case-by-case. I would probably simply use separate arguments (either positional or designated by -options). If you want to manipulate them as a whole, just lump them together with a space between. John Received on Wed Mar 18 15:58:45 1998 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:59:28 EDT |
||||||||||
|
|||||||||||