Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: linux-ipsec: syntax conventions, part 1

From: John Gilmore <gnu(at)toad.com>
Date: Wed Mar 18 1998 - 15:00:29 EST


I hope we don't spend too much time on the rathole of arguing over formatting and syntax.

> 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

We should never use octal output, and never parse any octal input. Leading zeros should not indicate octal. We should not worry about whether our decimal output has leading zeros (though in general it shouldn't).

> 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

Do you need help?X

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.

Note that the a.b.c.d part need not be zero in the host part. For example, you could specify an interface address as 206.14.61.19/28, which gives both the address and the size of the subnet it's on.

Note also that "10" is a valid IP address; it means 10.0.0.0. You can't assume that a single number is not a valid IP address.

> 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

Do you need more help?X

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


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library