Basics
------
The lay-out of this appendix is:
{basic} == (primitive) with or without leading/trailing spaces
{basic} != `word' ==> {basic} cannot include the string "word".
[ ... ] == character class or range of characters.
However, if "[", "]" enclose or surround a primitive, or a string
==> the primitive or sting is optional.
^^^^^^^^
E.g.
[(nic-hdl-number)] ==> nic-handle number is optional.
-----
{free text} == (All characters possible)
-----
{auto-nic-assign} == `AUTO-'([1 or more [0..9])(0 or more [`A'..`Z'])
-----
{nic-handle} == (Japanese nic-handle) | (Standard nic-handle)
(Japanese nic-handle) == (2 [`A'..`Z'] 3 [0..9]`JP')(0 or 1 `-JP')
(Japanese nic-handle) == (Jap-nic-hdl-initials)(Jap-nic-hdl-number)`JP'\
[(Jap-suffix)}
(Jap-nic-hdl-initials) == 2 [`A'..`Z'] == 2 uppercase letters
(Jap-nic-hdl-number) == 3 [0..9] == 0 ... 999 # leading zero allowed
(Jap-suffix) == `-JP'
(Standard nic-handle) == (nic-hdl-initials) [(nic-hdl-number)] (nic-hdl-suffix)
(nic-hdl-initials) == (2 - MAXLEN [`A'..`Z']
MAXLEN == defined in configuration file
(nic-hdl-number) == [1..9](0 to five [0..9]) == 1 ... 99999
N.B. the nic-hdl-number is _optional_.
(nic-hdl-suffix) == <(source)| ORG | ARIN | ORG-ARIN | 1-AU | 2-AU | CC-AU>
(source) == <RIPE | RADB | INTERNIC | MCI | ANS | CANET | APNIC>
# source is defined in configuration file
-----
{name} != `AUTO-'
{name} cannot include {Titles}, cannot include (abbreviation)
(abbreviation) == (^0 or more [non-blank])`.' || ([non-blank])`.'
# no "Amb. Magee" or "Ambrose M."
{Titles} == ([mr|ms|mrs|dr|drs||ir|ing|sign|herr|hr|frau|prof]`.')
{name} == NUMOFNAMES x (personal name)
# NUMOFNAMES is defined in the configuration file
(personal name) == (personal-name-part-1)(personal-name-part-2)
(personal-name-part-1) == ([`a'..`z', `A'..`Z'])
(personal-name-part-2) == (0 or more [alphanumeric, `-', `.', `|', "`", "'" ])
-----
{aut-num} == `AS'(as-integer)
(as-integer) == (1 or more [1..9])(0 or more [0..9])
(as-integer) == 0 <= as-integer < = 65535
#
# Yes; the syntax of (as-integer) prevents it from being == 0
-----
{cost} == positive, non-zero integer
-----
{brackets} == `{'.....`}'
-----
{braces} == `(' ..... `)'
-----
{netlist} == (0 or more spaces {netlist expression} 0 or more spaces)
{netlist expression} == `{'(netlist element) \
[(subsequent netlist element)]`}'
(netlist element) == 0 or more spaces (Valid IP 4 prefix) \
0 or more spaces
(subsequent netlist element) == 0 or more spaces `,' 0 or more spaces \
(Valid IP 4 prefix) 0 or more spaces
(Valid IP 4 prefix) == (Valid IP 4)/(1 or more decimal digits)
(Valid IP 4 prefix) == (Valid IP 4)/(decimal number)
(Valid IP 4) == 0 or more `0'(#1 quad)[(subsequent quad)(subsequent quad) \
(subsequent quad)]
# There can be 0, 1, 2 or 3 (subsequent quad)
(#1 quad) == (0 or 1 `1')(0 or 1 [1..9])[0..9] _or_
(`1'|`2')[0..4][0..9] _or_
`25'[0..5]
# (#1 quad) is in the range 0 ... 255
(subsequent quad) == `.'(0 or more `0')(#1 quad)
# (subsequent quad) is .00 ... .0255
# (Valid IP 4) should be four integers, separated by ".",
# where each integer is in the range 0 - 255
# 0.0.0.0 _is_ a valid IP 4 number.
-----
{askeyword} == ({aut-num} | {KEYWORD} | {community} | {as-macro} | {netlist})
{KEYWORD} == (ANY | AND | OR | NOT | `(' | `)' )
-----
{as-macro} == `AS-'(1 or more `A'...`Z')
-----
{netname} == [`A'..`Z'](0 or more [`A'..`Z'|0..9|`-'])
# {netname} must begin with an uppercase letter, but can otherwise
# have uppercase letters, digits or `-'. {netname} cannot begin
# with a number; i.e. "193-RIPE-NET" is not allowed.
-----
{auth_NONE} == `NONE'
{auth_MAIL-FROM} == (0 or more spaces `MAIL-FROM' 0 or more spaces) \
{valid PERL 5 regular expression}
{auth_CRYPT-PW} == `CRYPT-PW' (crypted password)
(crypted password) == string of 13 characters
-----
{CLNS prefix} == (clns0).(clns1).(clns2).(clns2)...(clns-last)
(clns0) == [0..9,`a'..`f'][0..9,`a'..`f']
(clns1) == [0..9,`a'..`f'][0..9,`a'..`f'][0..9,`a'..`f'][0..9,`a'..`f']
(clns2) == (4 of [0..9,`a'..`f'])
(clns-last) == (1 or more [0..9,`a'..`f']
{CLNS prefix} == (2 digit hexadec)(4 digit hexadec)(4 digit hexadec) ...
(4 digit hexadec)(1-4 digit hexadec)
-----
{RFC-822 address} == (0 or more spaces)(first name)[`.'(other name)] \
`@'(DOMAINNAME)
(first name) == [1 or more non-punctuation chars]
(other name) == [1 or more non-punctuation chars]
-----
{DATE}== (year)(month)(day)
(date) == must be today or in the past
<year> == ( 2 or 4 decimal digits)
year) == (year > 88) || (year > 1988)
(month) == (0 <= month <= 12)
(day> == (0 <= day <= 31)
-----
{community} == (`A'...`Z')(community-text)
(community-text) == `A'...`Z', `0'...`9', `_', `-'
{community} != (AS | LIM- | ANY | AND | OR | NOT )
-----
{net number} == (netnum element).(netnum element).(netnum element) \
.(netnum element)
(netnum element) == (1 or more [0..9]) &&
( (netnum element) <= 255) && (netnum element) >= 0) )
-----
{domain name} == ( 1 or more alphanumeric characters ) (0 or more extensions>
(extension) == <"." or "-"><0 or more "-"><1 or more alphanumeric>
#
# N.B. this does not exactly match the definition from RFC 1034.
-----
{phone number}
{phone number} == [0 or more sp][`+']<Country Code><Area Code><Tel Number>
<Country Code> == [0 or more sp]<Code>
<Code> == [`(' (0 or more spaces)(1 or more dec dig)(0 or more sp) `)'
(0 or more sp)]
<Area Code> == (0 or more Area Code components)
<A C components> == (0 or more sp)(0 or more [`-', `.', `('])(0 or more sp
(1 or more dec digit)(0 or more sp) (0 or 1 `)' )
<extension> == (0 or 1 <extn. numbers>)
<extn. numbers> == (0 or more sp)(`ext.')(0 or more sp)(1 or more dec digit)
(0 or more sp)
-----
{IP number} = <quad>.<quad>.<quad>.<quad>
<quad> == 0 <= X <= 255
{prefix length} == 0 <= X <= 32
-----
{Interface Address} == (IP address)
(IP address) == <net address>/<prefix>
<net address> == <net1>.<net2>.<net2>.<net2>
<net1> == 0 <= X <= 223
<net1>, <net2> == 0 <= X <= 255
<prefix> == 32
{Interface Subnet Mask} == <net address>
<net address> == <net1>.<net1>.<net1>.<net1>
<net1> == 0 <= X <= 255
------
{inetnum range} == (ip-number1) `-' (ip-number2)
ip-number2 > ip-number1
ip-number1 > 0, ip-number2 > 0
{inetnum prefix}/{inetnum length}
{inetnum prefix} == (1 or more dec digits)(0 or 1 <prefix element>)
<prefix element> == (`.'(0 or more [`.'|dec digit])
{inetnum prefix} =! [0/8 | 10/8 | 127/8 | 224/4]
{inetnum length} == (0 - 32)
-----
{IP address} == <net address>/<prefix>
<net address> == <net1>.<net2>.<net2>.<net2>
<net1> == 0 <= X <= 223
<net1>, <net2> == 0 <= X <= 255
<prefix> == 32
<Interface Subnet Mask> == <net address>
<net address> == <net1>.<net1>.<net1>.<net1>
<net1> == 0 <= X <= 255
-----
{Name} != `AUTO-'
{Name} cannot include <Titles>
<Titles> == ([mr|ms|mrs|dr|drs||ir|ing|sign|herr|hr|frau|prof]`.')
{Name} == (At least two characters, neither can be the `.' character)
{Name} == !(`AUTO-') && <Name-part-1><Name-part-2>
<Name-part-1> == ([`a'..`z', `A'..`Z'])
<Name-part-2> == (0 or more [alphanumeric, `-', `.', `|', "`", "'" ])
-----