aboutsummaryrefslogtreecommitdiff
path: root/parse
diff options
context:
space:
mode:
Diffstat (limited to 'parse')
-rw-r--r--parse/parse.go61
1 files changed, 59 insertions, 2 deletions
diff --git a/parse/parse.go b/parse/parse.go
index a5ca546..8f53c06 100644
--- a/parse/parse.go
+++ b/parse/parse.go
@@ -3,7 +3,12 @@ package main
import (
"fmt"
- "dim13.org/asn1/ber"
+ //"dim13.org/asn1/ber"
+ "dim13.org/asn1/acse"
+ "dim13.org/asn1/csta"
+ "dim13.org/asn1/rose"
+
+ "github.com/dim13/asn1"
)
var t = map[byte]string{
@@ -19,6 +24,58 @@ var t = map[byte]string{
func main() {
for n, s := range session {
fmt.Println(">>> packet", n, t[s[0]])
- fmt.Println(ber.Dump(s))
+ //fmt.Println(ber.Dump(s))
+ switch s[0] {
+ case 0xa1:
+ v := rose.Invoke{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v, csta.Modules[v.Opcode])
+ case 0xa2:
+ v := rose.ReturnResult{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v, csta.Modules[v.Result.Opcode])
+ case 0x60:
+ v := acse.AARQ{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v)
+ case 0x61:
+ v := acse.AARE{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v)
+ case 0x62:
+ v := acse.RLRQ{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v)
+ case 0x63:
+ v := acse.RLRE{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v)
+ case 0x64:
+ v := acse.ABRT{}
+ _, err := asn1.Unmarshal(s, &v)
+ if err != nil {
+ fmt.Println(err)
+ }
+ fmt.Println(v)
+
+ }
}
}