7
|
1 " ipfilter syntax file
|
|
2 " Language: ipfilter configuration file
|
|
3 " Maintainer: Hendrik Scholz <hendrik@scholz.net>
|
146
|
4 " Last Change: 2005 Jan 27
|
7
|
5 "
|
146
|
6 " http://www.wormulon.net/files/misc/ipfilter.vim
|
7
|
7 "
|
|
8 " This will also work for OpenBSD pf but there might be some tags that are
|
|
9 " not correctly identified.
|
|
10 " Please send comments to hendrik@scholz.net
|
|
11
|
|
12 " For version 5.x: Clear all syntax items
|
|
13 " For version 6.x: Quit when a syntax file was already loaded
|
|
14 if version < 600
|
|
15 syntax clear
|
|
16 elseif exists("b:current_syntax")
|
|
17 finish
|
|
18 endif
|
|
19
|
146
|
20 " Comment
|
|
21 syn match IPFComment /#.*$/ contains=ipfTodo
|
|
22 syn keyword IPFTodo TODO XXX FIXME contained
|
7
|
23
|
146
|
24 syn keyword IPFActionBlock block
|
|
25 syn keyword IPFActionPass pass
|
|
26 syn keyword IPFProto tcp udp icmp
|
|
27 syn keyword IPFSpecial quick log first
|
|
28 " how could we use keyword for words with '-' ?
|
|
29 syn match IPFSpecial /return-rst/
|
|
30 syn match IPFSpecial /dup-to/
|
|
31 "syn match IPFSpecial /icmp-type unreach/
|
|
32 syn keyword IPFAny all any
|
|
33 syn match IPFIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
|
|
34 syn match IPFNetmask /\/\d\+/
|
7
|
35
|
146
|
36 " service name constants
|
|
37 syn keyword IPFService auth bgp domain finger ftp http https ident
|
|
38 syn keyword IPFService imap irc isakmp kerberos mail nameserver nfs
|
|
39 syn keyword IPFService nntp ntp pop3 portmap pptp rpcbind rsync smtp
|
|
40 syn keyword IPFService snmp snmptrap socks ssh sunrpc syslog telnet
|
|
41 syn keyword IPFService tftp www
|
|
42
|
|
43 " Comment
|
|
44 hi def link IPFComment Comment
|
|
45 hi def link IPFTodo Todo
|
|
46
|
|
47 hi def link IPFService Constant
|
|
48
|
|
49 hi def link IPFAction Type
|
7
|
50 hi def link ipfActionBlock String
|
|
51 hi def link ipfActionPass Type
|
146
|
52 hi def link IPFSpecial Statement
|
|
53 hi def link IPFIPv4 Label
|
|
54 hi def link IPFNetmask String
|
|
55 hi def link IPFAny Statement
|
|
56 hi def link IPFProto Identifier
|
7
|
57
|