]> luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/pf.js
Initial commit.
[flow-web.git] / static / highlight / es / languages / pf.js
1 /*! `pf` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar = (function () {
3 'use strict';
4
5 /*
6 Language: Packet Filter config
7 Description: pf.conf — packet filter configuration file (OpenBSD)
8 Author: Peter Piwowarski <oldlaptop654@aol.com>
9 Website: http://man.openbsd.org/pf.conf
10 Category: config
11 */
12
13 function pf(hljs) {
14 const MACRO = {
15 className: 'variable',
16 begin: /\$[\w\d#@][\w\d_]*/,
17 relevance: 0
18 };
19 const TABLE = {
20 className: 'variable',
21 begin: /<(?!\/)/,
22 end: />/
23 };
24
25 return {
26 name: 'Packet Filter config',
27 aliases: [ 'pf.conf' ],
28 keywords: {
29 $pattern: /[a-z0-9_<>-]+/,
30 built_in: /* block match pass are "actions" in pf.conf(5), the rest are
31 * lexically similar top-level commands.
32 */
33 'block match pass load anchor|5 antispoof|10 set table',
34 keyword:
35 'in out log quick on rdomain inet inet6 proto from port os to route '
36 + 'allow-opts divert-packet divert-reply divert-to flags group icmp-type '
37 + 'icmp6-type label once probability recieved-on rtable prio queue '
38 + 'tos tag tagged user keep fragment for os drop '
39 + 'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin '
40 + 'source-hash static-port '
41 + 'dup-to reply-to route-to '
42 + 'parent bandwidth default min max qlimit '
43 + 'block-policy debug fingerprints hostid limit loginterface optimization '
44 + 'reassemble ruleset-optimization basic none profile skip state-defaults '
45 + 'state-policy timeout '
46 + 'const counters persist '
47 + 'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy '
48 + 'source-track global rule max-src-nodes max-src-states max-src-conn '
49 + 'max-src-conn-rate overload flush '
50 + 'scrub|5 max-mss min-ttl no-df|10 random-id',
51 literal:
52 'all any no-route self urpf-failed egress|5 unknown'
53 },
54 contains: [
55 hljs.HASH_COMMENT_MODE,
56 hljs.NUMBER_MODE,
57 hljs.QUOTE_STRING_MODE,
58 MACRO,
59 TABLE
60 ]
61 };
62 }
63
64 return pf;
65
66 })();
67 ;
68 export default hljsGrammar;