2 " Language: xinetd.conf(5) configuration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-04-19
6 if exists("b:current_syntax")
13 syn keyword xinetdTodo contained TODO FIXME XXX NOTE
15 syn region xinetdComment display oneline start='^\s*#' end='$'
16 \ contains=xinetdTodo,@Spell
18 syn match xinetdService '^\s*service\>'
19 \ nextgroup=xinetdServiceName skipwhite
21 syn match xinetdServiceName contained '\S\+'
22 \ nextgroup=xinetdServiceGroup skipwhite skipnl
24 syn match xinetdDefaults '^\s*defaults'
25 \ nextgroup=xinetdServiceGroup skipwhite skipnl
27 syn region xinetdServiceGroup contained transparent
28 \ matchgroup=xinetdServiceGroupD start='{'
29 \ matchgroup=xinetdServiceGroupD end='}'
30 \ contains=xinetdAttribute,xinetdReqAttribute,
33 syn keyword xinetdReqAttribute contained user server protocol
34 \ nextgroup=xinetdStringEq skipwhite
36 syn keyword xinetdAttribute contained id group bind
38 \ nextgroup=xinetdStringEq skipwhite
40 syn match xinetdStringEq contained display '='
41 \ nextgroup=xinetdString skipwhite
43 syn match xinetdString contained display '\S\+'
45 syn keyword xinetdAttribute contained type nextgroup=xinetdTypeEq skipwhite
47 syn match xinetdTypeEq contained display '='
48 \ nextgroup=xinetdType skipwhite
50 syn keyword xinetdType contained RPC INTERNAL TCPMUX TCPMUXPLUS
52 \ nextgroup=xinetdType skipwhite
54 syn keyword xinetdAttribute contained flags
55 \ nextgroup=xinetdFlagsEq skipwhite
57 syn cluster xinetdFlagsC contains=xinetdFlags,xinetdDeprFlags
59 syn match xinetdFlagsEq contained display '='
60 \ nextgroup=@xinetdFlagsC skipwhite
62 syn keyword xinetdFlags contained INTERCEPT NORETRY IDONLY NAMEINARGS
63 \ NODELAY KEEPALIVE NOLIBWRAP SENSOR IPv4 IPv6
64 \ nextgroup=@xinetdFlagsC skipwhite
66 syn keyword xinetdDeprFlags contained REUSE nextgroup=xinetdFlagsC skipwhite
68 syn keyword xinetdDisable contained disable
69 \ nextgroup=xinetdBooleanEq skipwhite
71 syn match xinetdBooleanEq contained display '='
72 \ nextgroup=xinetdBoolean skipwhite
74 syn keyword xinetdBoolean contained yes no
76 syn keyword xinetdReqAttribute contained socket_type
77 \ nextgroup=xinetdSocketTypeEq skipwhite
79 syn match xinetdSocketTypeEq contained display '='
80 \ nextgroup=xinetdSocketType skipwhite
82 syn keyword xinetdSocketType contained stream dgram raw seqpacket
84 syn keyword xinetdReqAttribute contained wait
85 \ nextgroup=xinetdBooleanEq skipwhite
87 syn keyword xinetdAttribute contained groups mdns
88 \ nextgroup=xinetdBooleanEq skipwhite
90 syn keyword xinetdAttribute contained instances per_source rlimit_cpu
91 \ rlimit_data rlimit_rss rlimit_stack
92 \ nextgroup=xinetdUNumberEq skipwhite
94 syn match xinetdUNumberEq contained display '='
95 \ nextgroup=xinetdUnlimited,xinetdNumber
98 syn keyword xinetdUnlimited contained UNLIMITED
100 syn match xinetdNumber contained display '\<\d\+\>'
102 syn keyword xinetdAttribute contained nice
103 \ nextgroup=xinetdSignedNumEq skipwhite
105 syn match xinetdSignedNumEq contained display '='
106 \ nextgroup=xinetdSignedNumber skipwhite
108 syn match xinetdSignedNumber contained display '[+-]\=\d\+\>'
110 syn keyword xinetdAttribute contained server_args
112 \ nextgroup=xinetdStringsEq skipwhite
114 syn match xinetdStringsEq contained display '='
115 \ nextgroup=xinetdStrings skipwhite
117 syn match xinetdStrings contained display '\S\+'
118 \ nextgroup=xinetdStrings skipwhite
120 syn keyword xinetdAttribute contained only_from no_access passenv
121 \ nextgroup=xinetdStringsAdvEq skipwhite
123 syn match xinetdStringsAdvEq contained display '[+-]\=='
124 \ nextgroup=xinetdStrings skipwhite
126 syn keyword xinetdAttribute contained access_times
127 \ nextgroup=xinetdTimeRangesEq skipwhite
129 syn match xinetdTimeRangesEq contained display '='
130 \ nextgroup=xinetdTimeRanges skipwhite
132 syn match xinetdTimeRanges contained display
133 \ '\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)-\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)'
134 \ nextgroup=xinetdTimeRanges skipwhite
136 syn keyword xinetdAttribute contained log_type nextgroup=xinetdLogTypeEq
139 syn match xinetdLogTypeEq contained display '='
140 \ nextgroup=xinetdLogType skipwhite
142 syn keyword xinetdLogType contained SYSLOG nextgroup=xinetdSyslogType
145 syn keyword xinetdLogType contained FILE nextgroup=xinetdLogFile skipwhite
147 syn keyword xinetdSyslogType contained daemon auth authpriv user mail lpr
148 \ news uucp ftp local0 local1 local2 local3
149 \ local4 local5 local6 local7
150 \ nextgroup=xinetdSyslogLevel skipwhite
152 syn keyword xinetdSyslogLevel contained emerg alert crit err warning notice
155 syn match xinetdLogFile contained display '\S\+'
156 \ nextgroup=xinetdLogSoftLimit skipwhite
158 syn match xinetdLogSoftLimit contained display '\<\d\+\>'
159 \ nextgroup=xinetdLogHardLimit skipwhite
161 syn match xinetdLogHardLimit contained display '\<\d\+\>'
163 syn keyword xinetdAttribute contained log_on_success
164 \ nextgroup=xinetdLogSuccessEq skipwhite
166 syn match xinetdLogSuccessEq contained display '[+-]\=='
167 \ nextgroup=xinetdLogSuccess skipwhite
169 syn keyword xinetdLogSuccess contained PID HOST USERID EXIT DURATION TRAFFIC
170 \ nextgroup=xinetdLogSuccess skipwhite
172 syn keyword xinetdAttribute contained log_on_failure
173 \ nextgroup=xinetdLogFailureEq skipwhite
175 syn match xinetdLogFailureEq contained display '[+-]\=='
176 \ nextgroup=xinetdLogFailure skipwhite
178 syn keyword xinetdLogFailure contained HOST USERID ATTEMPT
179 \ nextgroup=xinetdLogFailure skipwhite
181 syn keyword xinetdReqAttribute contained rpc_version
182 \ nextgroup=xinetdRPCVersionEq skipwhite
184 syn match xinetdRPCVersionEq contained display '='
185 \ nextgroup=xinetdRPCVersion skipwhite
187 syn match xinetdRPCVersion contained display '\d\+\%(-\d\+\)\=\>'
189 syn keyword xinetdReqAttribute contained rpc_number port
190 \ nextgroup=xinetdNumberEq skipwhite
192 syn match xinetdNumberEq contained display '='
193 \ nextgroup=xinetdNumber skipwhite
195 syn keyword xinetdAttribute contained env nextgroup=xinetdEnvEq skipwhite
197 syn match xinetdEnvEq contained display '+\=='
198 \ nextgroup=xinetdEnvName skipwhite
200 syn match xinetdEnvName contained display '[^=]\+'
201 \ nextgroup=xinetdEnvNameEq
203 syn match xinetdEnvNameEq contained display '=' nextgroup=xinetdEnvValue
205 syn match xinetdEnvValue contained display '\S\+'
206 \ nextgroup=xinetdEnvName skipwhite
208 syn keyword xinetdAttribute contained banner banner_success banner_failure
209 \ nextgroup=xinetdPathEq skipwhite
211 syn keyword xinetdPPAttribute include includedir
212 \ nextgroup=xinetdPath skipwhite
214 syn match xinetdPathEq contained display '='
215 \ nextgroup=xinetdPath skipwhite
217 syn match xinetdPath contained display '\S\+'
219 syn keyword xinetdAttribute contained redirect nextgroup=xinetdRedirectEq
222 syn match xinetdRedirectEq contained display '='
223 \ nextgroup=xinetdRedirectIP skipwhite
225 syn match xinetdRedirectIP contained display '\S\+'
226 \ nextgroup=xinetdNumber skipwhite
228 syn keyword xinetdAttribute contained cps nextgroup=xinetdCPSEq skipwhite
230 syn match xinetdCPSEq contained display '='
231 \ nextgroup=xinetdCPS skipwhite
233 syn match xinetdCPS contained display '\<\d\+\>'
234 \ nextgroup=xinetdNumber skipwhite
236 syn keyword xinetdAttribute contained max_load nextgroup=xinetdFloatEq
239 syn match xinetdFloatEq contained display '='
240 \ nextgroup=xinetdFloat skipwhite
242 syn match xinetdFloat contained display '\d\+\.\d*\|\.\d\+'
244 syn keyword xinetdAttribute contained umask nextgroup=xinetdOctalEq
247 syn match xinetdOctalEq contained display '='
248 \ nextgroup=xinetdOctal,xinetdOctalError
251 syn match xinetdOctal contained display '\<0\o\+\>'
252 \ contains=xinetdOctalZero
253 syn match xinetdOctalZero contained display '\<0'
254 syn match xinetdOctalError contained display '\<0\o*[89]\d*\>'
256 syn keyword xinetdAttribute contained rlimit_as nextgroup=xinetdASEq
259 syn match xinetdASEq contained display '='
260 \ nextgroup=xinetdAS,xinetdUnlimited
263 syn match xinetdAS contained display '\d\+' nextgroup=xinetdASMult
265 syn match xinetdASMult contained display '[KM]'
267 syn keyword xinetdAttribute contained deny_time nextgroup=xinetdDenyTimeEq
270 syn match xinetdDenyTimeEq contained display '='
271 \ nextgroup=xinetdDenyTime,xinetdNumber
274 syn keyword xinetdDenyTime contained FOREVER NEVER
276 hi def link xinetdTodo Todo
277 hi def link xinetdComment Comment
278 hi def link xinetdService Keyword
279 hi def link xinetdServiceName String
280 hi def link xinetdDefaults Keyword
281 hi def link xinetdServiceGroupD Delimiter
282 hi def link xinetdReqAttribute Keyword
283 hi def link xinetdAttribute Type
284 hi def link xinetdEq Operator
285 hi def link xinetdStringEq xinetdEq
286 hi def link xinetdString String
287 hi def link xinetdTypeEq xinetdEq
288 hi def link xinetdType Identifier
289 hi def link xinetdFlagsEq xinetdEq
290 hi def link xinetdFlags xinetdType
291 hi def link xinetdDeprFlags WarningMsg
292 hi def link xinetdDisable Special
293 hi def link xinetdBooleanEq xinetdEq
294 hi def link xinetdBoolean Boolean
295 hi def link xinetdSocketTypeEq xinetdEq
296 hi def link xinetdSocketType xinetdType
297 hi def link xinetdUNumberEq xinetdEq
298 hi def link xinetdUnlimited Define
299 hi def link xinetdNumber Number
300 hi def link xinetdSignedNumEq xinetdEq
301 hi def link xinetdSignedNumber xinetdNumber
302 hi def link xinetdStringsEq xinetdEq
303 hi def link xinetdStrings xinetdString
304 hi def link xinetdStringsAdvEq xinetdEq
305 hi def link xinetdTimeRangesEq xinetdEq
306 hi def link xinetdTimeRanges Number
307 hi def link xinetdLogTypeEq xinetdEq
308 hi def link xinetdLogType Keyword
309 hi def link xinetdSyslogType xinetdType
310 hi def link xinetdSyslogLevel Number
311 hi def link xinetdLogFile xinetdPath
312 hi def link xinetdLogSoftLimit xinetdNumber
313 hi def link xinetdLogHardLimit xinetdNumber
314 hi def link xinetdLogSuccessEq xinetdEq
315 hi def link xinetdLogSuccess xinetdType
316 hi def link xinetdLogFailureEq xinetdEq
317 hi def link xinetdLogFailure xinetdType
318 hi def link xinetdRPCVersionEq xinetdEq
319 hi def link xinetdRPCVersion xinetdNumber
320 hi def link xinetdNumberEq xinetdEq
321 hi def link xinetdEnvEq xinetdEq
322 hi def link xinetdEnvName Identifier
323 hi def link xinetdEnvNameEq xinetdEq
324 hi def link xinetdEnvValue String
325 hi def link xinetdPPAttribute PreProc
326 hi def link xinetdPathEq xinetdEq
327 hi def link xinetdPath String
328 hi def link xinetdRedirectEq xinetdEq
329 hi def link xinetdRedirectIP String
330 hi def link xinetdCPSEq xinetdEq
331 hi def link xinetdCPS xinetdNumber
332 hi def link xinetdFloatEq xinetdEq
333 hi def link xinetdFloat xinetdNumber
334 hi def link xinetdOctalEq xinetdEq
335 hi def link xinetdOctal xinetdNumber
336 hi def link xinetdOctalZero PreProc
337 hi def link xinetdOctalError Error
338 hi def link xinetdASEq xinetdEq
339 hi def link xinetdAS xinetdNumber
340 hi def link xinetdASMult PreProc
341 hi def link xinetdDenyTimeEq xinetdEq
342 hi def link xinetdDenyTime PreProc
344 let b:current_syntax = "xinetd"
346 let &cpo = s:cpo_save