aboutsummaryrefslogtreecommitdiff
path: root/acse/acse.go
blob: adbb17aa9d0bf6a66c800294653b16dd7d72989e (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
package acse

import "github.com/dim13/asn1"

// 2.2.0.0.1

// A-ASSOCIATE Request
// Application Constructed implicit 0
type AARQ struct {
	asn1.Tag               `asn1:"application,tag:0"`
	ProtocolVersion        asn1.BitString            `asn1:"tag:0"`           // 0 implicit BitString
	ApplicationContextName asn1.ObjectIdentifier     `asn1:"tag:1,explicit"`  // 1
	UserInformation        struct{ asn1.RawContent } `asn1:"tag:30,optional"` // 30 implicit
}

// A-ASSOCIATE Result (Result == 0)
// A-REJECT (Result == 1)
// Application Constructed implicit 1
type AARE struct {
	asn1.Tag               `asn1:"application,tag:1"`
	ProtocolVersion        asn1.BitString            `asn1:"tag:0"`           // 0 implicit BitString
	ApplicationContextName asn1.ObjectIdentifier     `asn1:"tag:1,explicit"`  // 1
	Result                 int                       `asn1:"tag:2,explicit"`  // 2
	ResultSourceDiagnostic AcseServiceUser           `asn1:"tag:3"`           // 3
	UserInformation        struct{ asn1.RawContent } `asn1:"tag:30,optional"` // 30 implicit
}

type AcseServiceUser struct {
	User     int `asn1:"tag:0,optional"`
	Provider int `asn1:"tag:0,optional"`
}

// A-RELEASE Request
// Application Constructed implicit 2
type RLRQ struct {
	asn1.Tag `asn1:"application,tag:2"`
}

// A-RELEASE Result
// Application Constructed implicit 3
type RLRE struct {
	asn1.Tag `asn1:"application,tag:3"`
}

// A-ABORT
// Application Constructed implicit 4
type ABRT struct {
	asn1.Tag    `asn1:"application,tag:4"`
	AbortSource int `asn1:"tag:0"` // 0 implicit
}