aboutsummaryrefslogtreecommitdiffstats
path: root/tests/42-real-life-OK.asn1
blob: 8c1d59e1c060099136dffb269af219145ad0be26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
-- OK: Everything is fine

-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .42

ModuleLAPStorage
	{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
		spelio(9363) software(1) asn1c(5) test(1) 42 }
	DEFINITIONS EXTENSIBILITY IMPLIED ::=
BEGIN

	/*
	 * A package representing a distinguished log line.
	 * It contains
	 *  - a digest of that line (actually, a normalized
	 *    form with bells (\007) in place of variable components),
	 *  - one or more sets of variable parts (presumably with different
	 *    acceptability rules).
	 */
	LogLine ::= SEQUENCE {
		line-digest	IA5String,	-- Log line normal form
		varsets		SEQUENCE SIZE(1..MAX) OF VariablePartSet
	}

	/*
	 * This package contains a set of variable components of a log line.
	 * Each variable component may contain one or more "value samples",
	 * or a range between two samples.
	 */
	VariablePartSet ::= SEQUENCE {
		vparts		SEQUENCE SIZE(0..MAX) OF VariablePart, -- {123,321}
		resolution	ActionItem
	}

	/*
	 * A description of a single variable part.
	 */
	VariablePart ::= CHOICE {
		-- A set of acceptable values
		vset	SET SIZE(1..MAX) OF VisibleString,
		-- A range of acceptable values
		vrange	SEQUENCE {
			from	VisibleString,
			to	VisibleString
		}
	}

	/*
	 * What to do with the log line.
	 */
	ActionItem ::= SEQUENCE {
		accept-as	ENUMERATED {
			unknown,	-- Action yet unknown.
			safe,		-- No action, just move on.
			unsafe,		-- Unsafe message. Inform NOC.
			...
		},
		notify	SEQUENCE {	-- How to notify NOC.
			critical  BOOLEAN,		-- Emit critical message
			email	  SET OF VisibleString,	-- Send emails
			...
		} OPTIONAL
	}

END