aboutsummaryrefslogtreecommitdiff
path: root/acse
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-10-09 19:41:46 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-10-09 19:41:46 +0200
commit3479b3dbacceeb2fdc7591bdb150c10e31299ba4 (patch)
tree8ed0cb7990755c0eda55f4fd07ad189f7ae30dcc /acse
parent5da3820c360e34ef8e7c6b4757783e9514f72f71 (diff)
First real communication
Diffstat (limited to 'acse')
-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
+}