aboutsummaryrefslogtreecommitdiffstats
path: root/BSSMAP.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-06-05 10:53:52 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-06-05 10:53:52 +0200
commit00ee3d0ea0cda615ba58705d08380a116193743d (patch)
tree6148fc3e64aa5a59fce5c90dce4f012be26ba5e1 /BSSMAP.st
parent15be4f4af2f935412305f9e2af0d6a142b2a2093 (diff)
gsm0808: Be able to parse a ciphering mode complete with layer3 contents
Diffstat (limited to 'BSSMAP.st')
-rw-r--r--BSSMAP.st28
1 files changed, 28 insertions, 0 deletions
diff --git a/BSSMAP.st b/BSSMAP.st
index 0e9a8b3..00d9c86 100644
--- a/BSSMAP.st
+++ b/BSSMAP.st
@@ -797,3 +797,31 @@ GSM0808IE subclass: GSM0808Classmark3IE [
aMsg putByteArray: cm.
]
]
+
+GSM0808IE subclass: GSM0808Layer3MessageContents [
+ | layer3Message |
+ <category: 'OsmoGSM'>
+
+ GSM0808Layer3MessageContents class >> elementId [^32]
+ GSM0808Layer3MessageContents class >> initWith: aByteArray [
+ ^self new
+ layer3Message: aByteArray;
+ yourself
+ ]
+
+ GSM0808Layer3MessageContents class >> parseFrom: aStream [
+ | size |
+ size := aStream next.
+ ^self initWith: (aStream next: size)
+ ]
+
+ layer3Message: aByteArray [
+ layer3Message := aByteArray
+ ]
+
+ writeOnDirect: aMsg [
+ aMsg
+ putByte: layer3Message size;
+ putByteArray: layer3Message.
+ ]
+]