aboutsummaryrefslogtreecommitdiff
path: root/acse/acse.go
diff options
context:
space:
mode:
Diffstat (limited to 'acse/acse.go')
-rw-r--r--acse/acse.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/acse/acse.go b/acse/acse.go
index 2552710..5fb1786 100644
--- a/acse/acse.go
+++ b/acse/acse.go
@@ -46,6 +46,12 @@ type RLRE struct {
asn1.Tag `asn1:"application,tag:3"`
}
+// ABRT Source
+const (
+ ABRTServiceUser = iota
+ ABRTServiceProvider
+)
+
// A-ABORT
// Application Constructed implicit 4
type ABRT struct {
@@ -89,3 +95,18 @@ func Associate() ([]byte, error) {
}
return asn1.Marshal(aarq)
}
+
+const (
+ AssociateResultAccepted = iota
+ AssociateResultRejectedPermanent
+ AssociateResultRejectedTransient
+)
+
+func AssociateResult(b []byte) (int, error) {
+ aare := AARE{}
+ _, err := asn1.Unmarshal(b, &aare)
+ if err != nil {
+ return 0, err
+ }
+ return aare.Result, nil
+}