Subject: [AAA-WG]: IPFilterRule, QoSFilterRule format description.

From: [email-masked]
Date: Fri, 30 Nov 2001 14:01:37 +0200

Hi,

The format description of the filter rule datatypes is difficult to
understand as it is difficult to differentiate between the tokens and the
values. 

For example 
            action       permit - Allow packets that match the rule.
                         deny   - Drop packets that match the rule.
It is difficult to make out whether the value of action can be the character
strings "permit" or "deny",  (OR) permit and deny mean something else. It
would be better if we could specify these data types in ABNF grammar. 
Any comments.

Regards,
Kishore

I tried to describe IPFilterRule in ABNF below(if it is useful).
IPFilterRule = action SP dir SP proto SP "from" SP src SP "to" SP dst SP
[options]

action = "permit" | "deny"

dir = "in" | "out"

proto = ipumber | "ip"
ipnumber = (1*3)DIGIT

src = addressmask
dst = addressmask

addressmask = ipno["/"bits] SP [ports]
ipno = IPV4Address | IPV6Address
IPV4Address          = 1*3(DIGIT) "." 1*3(DIGIT) "." 1*3(DIGIT) "."
1*3(DIGIT)
IPV6Address = hexaddress [ ":" IPV4address ]
hexAddress = hexseq "::" [ hexseq ] / "::" [ hexseq ] / hexseq
hexseq               = (1*4HEXDIG) *( ":" (1*4HEXDIG))

ports = *(portnumber/portrange)
portnumber = 1*(DIGIT)
portrange = portnumber "-" portnumber

options = (*1(frag)) SP (*1(ipoptions)) SP 
                   (*1(tcpoptions)) SP (*1(established)) SP 
                   (*1(setup)) SP (*1(tcpflags)) SP (*1(icmptypes))

frag = "frag"

ipoptions = "ipoptions" SP ipspec
ipspec = ssrr COMMA lsrr COMMA RR COMMA ts
COMMA = ","
ssrr = "ssrr" | "!"
lsrr = "lsrr" | "!"
RR = "rr" | "!"
ts = "ts" | "!"

tcpoptions = "tcpoptions" SP tcpspec
tcpspec = mss COMMA window COMMA sack COMMA ts COMMA cc
mss = "mss" | "!"
window = "window" | "!"
sack = "sack" | "!"
ts = "ts" | "!"
cc = "cc" | "!"

established = "established"
setup = "setup"

tcpflags = tcpflags tcpflagspec
tcpflagspec = fin COMMA syn COMMA rst COMMA psh COMMA ack COMMA urg
fin = "fin" | "!"
syn = "syn" | "!"
rst = "rst" | "!"
psh = "psh" | "!"
ack = "ack" | "!"
urg = "urg" | "!"

icmptypes = "icmptypes" SP (type *(COMMA type))
type = "0" | "3" | "5" | "8" | "9" | "10" | "11" |
       "12" | "13" | "14" | "15" | "16" | "17" | "18"